* mu4e-view: don't use RET for opening urls, attachment at-point, use M-RET

(using RET conflicted with using RET for scrolling)
This commit is contained in:
djcb 2012-07-03 21:37:30 +03:00
parent beced7857b
commit 3914731874
3 changed files with 37 additions and 12 deletions

18
TODO
View File

@ -34,11 +34,25 @@
- set/unset flag editing command - set/unset flag editing command
- handling of database upgrades - handling of database upgrades
- restore point after rerunning a search - restore point after rerunning a search
- opening urls is too eager
- make the mu4e-bookmarks format similar to the other ones - make the mu4e-bookmarks format similar to the other ones
- refresh current query after update? - refresh current query after update?
** Done
** Done (0.8.9.6)
- opening urls is too eager (now use M-RET for opening url at point, not just
RET, which conflicted with using RET for scrolling)
** Done (0.8.9.5)
- make next/prev header respect prefix argument (Jacek's patch) - make next/prev header respect prefix argument (Jacek's patch)
- make search results a stack (well, multiple stacks) - make search results a stack (well, multiple stacks)

View File

@ -316,7 +316,7 @@ is nil, and otherwise open it."
(puthash id index mu4e~view-attach-map) (puthash id index mu4e~view-attach-map)
(define-key map [mouse-2] (define-key map [mouse-2]
(mu4e~view-open-save-attach-func msg id nil)) (mu4e~view-open-save-attach-func msg id nil))
(define-key map [?\r] (define-key map [?\M-\r]
(mu4e~view-open-save-attach-func msg id nil)) (mu4e~view-open-save-attach-func msg id nil))
(define-key map [S-mouse-2] (define-key map [S-mouse-2]
(mu4e~view-open-save-attach-func msg id t)) (mu4e~view-open-save-attach-func msg id t))
@ -492,13 +492,20 @@ is nil, and otherwise open it."
(define-key menumap [sepa3] '("--")) (define-key menumap [sepa3] '("--"))
(define-key menumap [query-next] '("Next query" . mu4e-headers-query-next)) (define-key menumap [query-next]
(define-key menumap [query-prev] '("Previous query" . mu4e-headers-query-prev)) '("Next query" . mu4e-headers-query-next))
(define-key menumap [narrow-search] '("Narrow search" . mu4e-headers-search-narrow)) (define-key menumap [query-prev]
(define-key menumap [bookmark] '("Search bookmark" . mu4e-headers-search-bookmark)) '("Previous query" . mu4e-headers-query-prev))
(define-key menumap [jump] '("Jump to maildir" . mu4e~headers-jump-to-maildir)) (define-key menumap [narrow-search]
(define-key menumap [refresh] '("Refresh" . mu4e-headers-rerun-search)) '("Narrow search" . mu4e-headers-search-narrow))
(define-key menumap [search] '("Search" . mu4e-headers-search)) (define-key menumap [bookmark]
'("Search bookmark" . mu4e-headers-search-bookmark))
(define-key menumap [jump]
'("Jump to maildir" . mu4e~headers-jump-to-maildir))
(define-key menumap [refresh]
'("Refresh" . mu4e-headers-rerun-search))
(define-key menumap [search]
'("Search" . mu4e-headers-search))
(define-key menumap [sepa4] '("--")) (define-key menumap [sepa4] '("--"))
@ -626,7 +633,7 @@ number them so they can be opened using `mu4e-view-go-to-url'."
(let ((url (match-string 0)) (let ((url (match-string 0))
(map (make-sparse-keymap))) (map (make-sparse-keymap)))
(define-key map [mouse-2] (mu4e~view-browse-url-func url)) (define-key map [mouse-2] (mu4e~view-browse-url-func url))
(define-key map [?\r] (mu4e~view-browse-url-func url)) (define-key map [?\M-\r] (mu4e~view-browse-url-func url))
(puthash (incf num) url mu4e~view-link-map) (puthash (incf num) url mu4e~view-link-map)
(add-text-properties 0 (length url) (add-text-properties 0 (length url)
`(face mu4e-view-link-face `(face mu4e-view-link-face
@ -634,7 +641,8 @@ number them so they can be opened using `mu4e-view-go-to-url'."
keymap ,map) url) keymap ,map) url)
(replace-match (replace-match
(concat url (concat url
(propertize (format "[%d]" num) 'face 'mu4e-view-url-number-face)))))))) (propertize (format "[%d]" num)
'face 'mu4e-view-url-number-face))))))))
(defun mu4e~view-wrap-lines () (defun mu4e~view-wrap-lines ()

View File

@ -768,6 +768,9 @@ key description
n,p go to next, previous message n,p go to next, previous message
y select the headers view (if it's visible) y select the headers view (if it's visible)
RET scroll down
M-RET open URL at point / attachment at point
searching searching
--------- ---------
s search s search