When pressing C-u m, the user will be prompted for the identity to use.
(define-key map "=" 'notmuch-hello-update)
(define-key map "G" 'notmuch-hello-poll-and-update)
(define-key map (kbd "<C-tab>") 'widget-backward)
- (define-key map "m" 'notmuch-mua-mail)
+ (define-key map "m" 'notmuch-mua-new-mail)
(define-key map "s" 'notmuch-hello-goto-search)
map)
"Keymap for \"notmuch hello\" buffers.")
(ido-completing-read "Send mail From: " collection
nil 'confirm nil 'notmuch-mua-sender-history (car collection))))
+(defun notmuch-mua-new-mail (&optional prompt-for-sender)
+ "Invoke the notmuch mail composition window.
+
+If PROMPT-FOR-SENDER is non-nil, the user will be prompted for
+the From: address first."
+ (interactive "P")
+ (let ((other-headers
+ (when prompt-for-sender
+ (list (cons 'from (notmuch-mua-prompt-for-sender))))))
+ (notmuch-mua-mail nil nil other-headers)))
+
(defun notmuch-mua-send-and-exit (&optional arg)
(interactive "P")
(message-send-and-exit arg))
(define-key map (kbd "<backtab>") 'notmuch-show-previous-button)
(define-key map (kbd "TAB") 'notmuch-show-next-button)
(define-key map "s" 'notmuch-search)
- (define-key map "m" 'notmuch-mua-mail)
+ (define-key map "m" 'notmuch-mua-new-mail)
(define-key map "f" 'notmuch-show-forward-message)
(define-key map "r" 'notmuch-show-reply)
(define-key map "|" 'notmuch-show-pipe-message)
(define-key map "p" 'notmuch-search-previous-thread)
(define-key map "n" 'notmuch-search-next-thread)
(define-key map "r" 'notmuch-search-reply-to-thread)
- (define-key map "m" 'notmuch-mua-mail)
+ (define-key map "m" 'notmuch-mua-new-mail)
(define-key map "s" 'notmuch-search)
(define-key map "o" 'notmuch-search-toggle-order)
(define-key map "c" 'notmuch-search-stash-map)