mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
notmuch.el: Add bindings for scrolling to notmuch-search mode.
We turn on the scroll-preserve-screen-position option which seems like what's desired here, (though that's not what I normally use when editing files---but I think scrolling through a list of email threads is different).
This commit is contained in:
parent
d47fc17263
commit
50f260a1a3
1 changed files with 4 additions and 0 deletions
|
@ -322,6 +322,7 @@ Does nothing if already on the first message in the buffer."
|
||||||
(defvar notmuch-search-mode-map
|
(defvar notmuch-search-mode-map
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
(define-key map "a" 'notmuch-search-archive-thread)
|
(define-key map "a" 'notmuch-search-archive-thread)
|
||||||
|
(define-key map "b" 'scroll-down)
|
||||||
(define-key map "f" 'notmuch-search-filter)
|
(define-key map "f" 'notmuch-search-filter)
|
||||||
(define-key map "n" 'next-line)
|
(define-key map "n" 'next-line)
|
||||||
(define-key map "p" 'previous-line)
|
(define-key map "p" 'previous-line)
|
||||||
|
@ -335,6 +336,8 @@ Does nothing if already on the first message in the buffer."
|
||||||
(define-key map ">" 'notmuch-search-goto-last-thread)
|
(define-key map ">" 'notmuch-search-goto-last-thread)
|
||||||
(define-key map "=" 'notmuch-search-refresh-view)
|
(define-key map "=" 'notmuch-search-refresh-view)
|
||||||
(define-key map "\M->" 'notmuch-search-goto-last-thread)
|
(define-key map "\M->" 'notmuch-search-goto-last-thread)
|
||||||
|
(define-key map " " 'scroll-up)
|
||||||
|
(define-key map (kbd "<DEL>") 'scroll-down)
|
||||||
map)
|
map)
|
||||||
"Keymap for \"notmuch search\" buffers.")
|
"Keymap for \"notmuch search\" buffers.")
|
||||||
(fset 'notmuch-search-mode-map notmuch-search-mode-map)
|
(fset 'notmuch-search-mode-map notmuch-search-mode-map)
|
||||||
|
@ -351,6 +354,7 @@ Does nothing if already on the first message in the buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(kill-all-local-variables)
|
(kill-all-local-variables)
|
||||||
(make-local-variable 'notmuch-search-query-string)
|
(make-local-variable 'notmuch-search-query-string)
|
||||||
|
(set (make-local-variable 'scroll-preserve-screen-position) t)
|
||||||
(add-to-invisibility-spec 'notmuch-search)
|
(add-to-invisibility-spec 'notmuch-search)
|
||||||
(use-local-map notmuch-search-mode-map)
|
(use-local-map notmuch-search-mode-map)
|
||||||
(setq major-mode 'notmuch-search-mode
|
(setq major-mode 'notmuch-search-mode
|
||||||
|
|
Loading…
Reference in a new issue