mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 13:44:12 +01:00
emacs: with prefix argument, notmuch-show-stash-date stashes timestamp
Using timestamp of a message is useful in many Xapian queries.
This commit is contained in:
parent
5f71a4d3e1
commit
427fa5e6e6
1 changed files with 14 additions and 4 deletions
|
@ -1674,6 +1674,9 @@ current thread."
|
||||||
(defun notmuch-show-get-date ()
|
(defun notmuch-show-get-date ()
|
||||||
(notmuch-show-get-header :Date))
|
(notmuch-show-get-header :Date))
|
||||||
|
|
||||||
|
(defun notmuch-show-get-timestamp ()
|
||||||
|
(notmuch-show-get-prop :timestamp))
|
||||||
|
|
||||||
(defun notmuch-show-get-from ()
|
(defun notmuch-show-get-from ()
|
||||||
(notmuch-show-get-header :From))
|
(notmuch-show-get-header :From))
|
||||||
|
|
||||||
|
@ -2239,10 +2242,17 @@ thread from search."
|
||||||
(interactive)
|
(interactive)
|
||||||
(notmuch-common-do-stash (notmuch-show-get-cc)))
|
(notmuch-common-do-stash (notmuch-show-get-cc)))
|
||||||
|
|
||||||
(defun notmuch-show-stash-date ()
|
(put 'notmuch-show-stash-date 'notmuch-prefix-doc
|
||||||
"Copy date of current message to kill-ring."
|
"Copy timestamp of current message to kill-ring.")
|
||||||
(interactive)
|
(defun notmuch-show-stash-date (&optional stash-timestamp)
|
||||||
(notmuch-common-do-stash (notmuch-show-get-date)))
|
"Copy date of current message to kill-ring.
|
||||||
|
|
||||||
|
If invoked with a prefix argument, copy timestamp of current
|
||||||
|
message to kill-ring."
|
||||||
|
(interactive "P")
|
||||||
|
(if stash-timestamp
|
||||||
|
(notmuch-common-do-stash (format "%d" (notmuch-show-get-timestamp)))
|
||||||
|
(notmuch-common-do-stash (notmuch-show-get-date))))
|
||||||
|
|
||||||
(defun notmuch-show-stash-filename ()
|
(defun notmuch-show-stash-filename ()
|
||||||
"Copy filename of current message to kill-ring."
|
"Copy filename of current message to kill-ring."
|
||||||
|
|
Loading…
Reference in a new issue