* mu4e: scrolling down takes you to next msg (but see mu4e-view-scroll-to-next)

This commit is contained in:
djcb
2012-10-17 12:07:57 +03:00
parent 269fc5374d
commit 29a94c4b2f
4 changed files with 90 additions and 60 deletions

View File

@ -79,6 +79,11 @@ contact."
`mu4e-show-image' is non-nil."
:group 'mu4e-view)
(defcustom mu4e-view-scroll-to-next t
"If non-nil, move to the next message when calling
`mu4e-view-scroll-up-or-next' (typically bound to SPC) when at the
end of a message. Otherwise, don't move to the next message.")
(defvar mu4e-view-actions
'( ("capture message" . mu4e-action-capture-message)
("view as pdf" . mu4e-action-view-as-pdf))
@ -510,7 +515,7 @@ at POINT, or if nil, at (point)."
(lambda () (interactive) (mu4e-headers-split-view-resize -1)))
;; intra-message navigation
(define-key map (kbd "SPC") 'scroll-up)
(define-key map (kbd "SPC") 'mu4e-view-scroll-up-or-next)
(define-key map (kbd "<home>")
#'(lambda () (interactive) (goto-char (point-min))))
(define-key map (kbd "<end>")
@ -1059,6 +1064,15 @@ attachments) in response to a (mu4e~proc-extract 'temp ... )."
"Return t if we're in split-view, nil otherwise."
(member mu4e-split-view '(horizontal vertical)))
(defun mu4e-view-scroll-up-or-next ()
"Scroll-up the current message; if mu4e-view-scroll-to-next is
non-nil, and we can't scroll-up anymore, go the next message."
(interactive)
(if (and mu4e-view-scroll-to-next
(zerop (- (point-max) (window-end nil t))))
(mu4e-view-headers-next)
(scroll-up)))
(defun mu4e-view-unmark-all ()
"If we're in split-view, unmark all messages. Otherwise, warn
user that unmarking only works in the header list."

View File

@ -945,6 +945,9 @@ using @code{mu4e-view-hide-cited}, bound to @key{h}. If you want to do this
automatically for every message, invoke the function in your
@code{mu4e-view-mode-hook}.
@item For search-related operations, see @ref{Searching}.
@item You can scroll down the message using @key{SPC}; if you do this at the
end of a message,it automatically takes you to the next one. If you want to
prevent this behavior, set @code{mu4e-view-scroll-to-next} to @code{nil}.
@end itemize
@node MSGV Keybindings
@ -962,6 +965,8 @@ y select the headers view (if it's visible)
RET scroll down
M-RET open URL at point / attachment at point
SPC scroll down, if at end, move to next message
searching
---------
s search