mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 13:44:12 +01:00
emacs: add keybind and function to stash Message-ID without prefix
Add function `notmuch-show-stash-message-id-stripped' which stashes a Message-ID after ripping off the prefix and quotes, add bind it to "I" key in `notmuch-show-stash-map'. Simplifying `notmuch-show-get-message-id' instead might seem better, but that would require concat'ing in 9 places instead of 1. Signed-off-by: Pieter Praet <pieter@praet.org>
This commit is contained in:
parent
fd700ec961
commit
f9764bfacc
1 changed files with 6 additions and 0 deletions
|
@ -896,6 +896,7 @@ logic of the notmuch-crypto-process-mime customization variable."
|
||||||
(define-key map "F" 'notmuch-show-stash-filename)
|
(define-key map "F" 'notmuch-show-stash-filename)
|
||||||
(define-key map "f" 'notmuch-show-stash-from)
|
(define-key map "f" 'notmuch-show-stash-from)
|
||||||
(define-key map "i" 'notmuch-show-stash-message-id)
|
(define-key map "i" 'notmuch-show-stash-message-id)
|
||||||
|
(define-key map "I" 'notmuch-show-stash-message-id-stripped)
|
||||||
(define-key map "s" 'notmuch-show-stash-subject)
|
(define-key map "s" 'notmuch-show-stash-subject)
|
||||||
(define-key map "T" 'notmuch-show-stash-tags)
|
(define-key map "T" 'notmuch-show-stash-tags)
|
||||||
(define-key map "t" 'notmuch-show-stash-to)
|
(define-key map "t" 'notmuch-show-stash-to)
|
||||||
|
@ -1440,6 +1441,11 @@ buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(notmuch-common-do-stash (notmuch-show-get-message-id)))
|
(notmuch-common-do-stash (notmuch-show-get-message-id)))
|
||||||
|
|
||||||
|
(defun notmuch-show-stash-message-id-stripped ()
|
||||||
|
"Copy message ID of current message (sans `id:' prefix) to kill-ring."
|
||||||
|
(interactive)
|
||||||
|
(notmuch-common-do-stash (substring (notmuch-show-get-message-id) 4 -1)))
|
||||||
|
|
||||||
(defun notmuch-show-stash-subject ()
|
(defun notmuch-show-stash-subject ()
|
||||||
"Copy Subject field of current message to kill-ring."
|
"Copy Subject field of current message to kill-ring."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Reference in a new issue