This commit is contained in:
djcb 2012-10-01 21:18:42 +03:00
parent 3e522598d2
commit 1a785abdca
3 changed files with 21 additions and 37 deletions

View File

@ -87,7 +87,9 @@ Some notes on the format:
:attachments. :body-txt or :body-html fields. Message in the
Message view use the actual message file, and do include these fields."
;; after all this documentation, the spectacular implementation
(plist-get msg field))
(if msg
(plist-get msg field)
(mu4e-error "message must be non-nil")))
(defsubst mu4e-message-at-point (&optional noerror)
"Get the message s-expression for the message at point in either

View File

@ -213,13 +213,9 @@ regexp."
"Your folder for draft messages, relative to `mu4e-maildir',
e.g. \"/drafts\". Instead of a string, may also be a function that
takes a message (a msg plist, see `mu4e-message-get-field'), and
returns a folder.
Note, the message parameter refers to the
original message being replied to / being forwarded / re-edited and is nil
otherwise.
`mu4e-drafts-folder' is evaluated once when composing the message,
and the value is used throughout the message composition. When re-editing messages,
the value of `mu4e-drafts-folder' is ignored."
returns a folder. Note, the message parameter refers to the
original message being replied to / being forwarded / re-edited and
is nil otherwise. `mu4e-drafts-folder' is only evaluated once."
:type 'string
:safe 'stringp
:group 'mu4e-folders)
@ -228,8 +224,8 @@ the value of `mu4e-drafts-folder' is ignored."
"Your folder for refiling messages, relative to `mu4e-maildir',
e.g. \"/Archive\". Instead of a string, may also be a function that
takes a message (a msg plist, see `mu4e-message-get-field'), and
returns a folder.
Note, the message parameter refers to the message-at-point."
returns a folder. Note that the message parameter refers to the
message-at-point."
:type 'string
:safe 'stringp
:group 'mu4e-folders)
@ -238,12 +234,9 @@ Note, the message parameter refers to the message-at-point."
"Your folder for sent messages, relative to `mu4e-maildir',
e.g. \"/Sent Items\". Instead of a string, may also be a function
that takes a message (a msg plist, see `mu4e-message-get-field'),
and returns a folder.
Note, the message parameter refers to the
original message being replied to / being forwarded / re-edited, and is nil
otherwise.
`mu4e-sent-folder' is evaluated once when composing the message,
and the value is used throughout the message composition."
and returns a folder. Note that the message parameter refers to
the original message being replied to / being forwarded /
re-edited, and is nil otherwise."
:type 'string
:safe 'stringp
:group 'mu4e-folders)
@ -253,14 +246,11 @@ and the value is used throughout the message composition."
e.g. \"/trash\". Instead of a string, may also be a function that
takes a message (a msg plist, see `mu4e-message-get-field'), and
returns a folder. When using `mu4e-trash-folder' in the headers
view (when marking messages for trash).
Note, the message parameter
refers to the message-at-point. When using it when composing a
message (see `mu4e-sent-messages-behavior'), this refers to the
original message being replied to / being forwarded / re-edited, and is nil
otherwise.
`mu4e-trash-folder' is evaluated once when composing the message,
and the value is used throughout the message composition."
view (when marking messages for trash). Note that the message
parameter refers to the message-at-point. When using it when
composing a message (see `mu4e-sent-messages-behavior'), this
refers to the original message being replied to / being forwarded /
re-edited, and is nil otherwise."
:type 'string
:safe 'stringp
:group 'mu4e-folders)

View File

@ -501,12 +501,12 @@ at POINT, or if nil, at (point)."
(define-key map "a" 'mu4e-view-action)
;; change the number of headers
(define-key map (kbd "C-+") 'mu4e~view-split-view-resize)
(define-key map (kbd "C-+") 'mu4e-headers-split-view-resize)
(define-key map (kbd "C--")
(lambda () (interactive) (mu4e~view-split-view-resize -1)))
(define-key map (kbd "<C-kp-add>") 'mu4e~view-split-view-resize)
(lambda () (interactive) (mu4e-headers-split-view-resize -1)))
(define-key map (kbd "<C-kp-add>") 'mu4e-headers-split-view-resize)
(define-key map (kbd "<C-kp-subtract>")
(lambda () (interactive) (mu4e~view-split-view-resize -1)))
(lambda () (interactive) (mu4e-headers-split-view-resize -1)))
;; intra-message navigation
(define-key map (kbd "SPC") 'scroll-up)
@ -1053,15 +1053,7 @@ attachments) in response to a (mu4e~proc-extract 'temp ... )."
(defun mu4e~view-split-view-p ()
"Return t if we're in split-view, nil otherwise."
(member mu4e-split-view '(horizontal vertical)))
(defun mu4e~view-split-view-resize (n)
"In horizontal split-view, increase the number of lines shown by
N; in vertical split-view, increase the number of columns shown by
N. Otherwise, don't do anything."
(interactive "P")
(mu4e~view-in-headers-context
(mu4e-headers-split-view-resize n)))
(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."