* mm updates
This commit is contained in:
@ -103,12 +103,13 @@ or if not available, :body-html converted to text)."
|
|||||||
. \"a@example.com\") (\"B\" . \"B@example.com\") (nil
|
. \"a@example.com\") (\"B\" . \"B@example.com\") (nil
|
||||||
. \"c@example.com\")) into a string of form \"A <@aexample.com>, B
|
. \"c@example.com\")) into a string of form \"A <@aexample.com>, B
|
||||||
<b@example.com>, c@example.com\."
|
<b@example.com>, c@example.com\."
|
||||||
(mapconcat
|
(when lst
|
||||||
(lambda (recip)
|
(mapconcat
|
||||||
(let ((name (car recip)) (email (cdr recip)))
|
(lambda (recip)
|
||||||
(if name
|
(let ((name (car recip)) (email (cdr recip)))
|
||||||
(format "%s <%s>" name email)
|
(if name
|
||||||
(format "%s" email)))) lst ", "))
|
(format "%s <%s>" name email)
|
||||||
|
(format "%s" email)))) lst ", ")))
|
||||||
|
|
||||||
|
|
||||||
(defun mm/msg-header (hdr val)
|
(defun mm/msg-header (hdr val)
|
||||||
@ -132,14 +133,14 @@ return nil."
|
|||||||
|
|
||||||
(defun mm/msg-to-create (msg)
|
(defun mm/msg-to-create (msg)
|
||||||
"Construct the To: header for a reply-message based on some
|
"Construct the To: header for a reply-message based on some
|
||||||
message MSG. This the the Reply-To address of MSG if it exist, or
|
message MSG. This takes the Reply-To address of MSG if it exist, or
|
||||||
the From:-address otherwise. The result is either nil or a string
|
the From:-address otherwise. The result is either nil or a string
|
||||||
which can be used for the To:-field."
|
which can be used for the To:-field. Note, when it's present,
|
||||||
(let ((to-lst (plist-get msg :to))
|
Reply-To contains a string of one or more addresses,
|
||||||
(reply-to (plist-get msg :reply-to))
|
comma-separated."
|
||||||
(from (plist-get msg :from)))
|
(or
|
||||||
(setq to-lst (or reply-to from))
|
(plist-get msg :reply-to)
|
||||||
(mm/msg-recipients-to-string to-lst)))
|
(mm/msg-recipients-to-string (plist-get msg :from))))
|
||||||
|
|
||||||
|
|
||||||
(defun mm/msg-cc-create (msg reply-all)
|
(defun mm/msg-cc-create (msg reply-all)
|
||||||
|
|||||||
@ -472,9 +472,9 @@ maildirs under `mm/maildir."
|
|||||||
(kar (read-char (concat prompt fnames))))
|
(kar (read-char (concat prompt fnames))))
|
||||||
(if (= kar ?o) ;; user chose 'other'?
|
(if (= kar ?o) ;; user chose 'other'?
|
||||||
(ido-completing-read prompt (mm/get-sub-maildirs mm/maildir))
|
(ido-completing-read prompt (mm/get-sub-maildirs mm/maildir))
|
||||||
(unless (car-safe
|
(or
|
||||||
(find-if (lambda (item) (= kar (cdr item))) mm/maildir-shortcuts))
|
(car-safe (find-if (lambda (item) (= kar (cdr item))) mm/maildir-shortcuts))
|
||||||
(error "Invalid shortcut"))))))
|
(error "Invalid shortcut '%c'" kar))))))
|
||||||
|
|
||||||
|
|
||||||
(defun mm/new-buffer (bufname)
|
(defun mm/new-buffer (bufname)
|
||||||
|
|||||||
Reference in New Issue
Block a user