mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 10:28:09 +01:00
emacs/show: provide a more friendly function to get duplicate num
There is not much code here, but at least we can fix the indexing as 1 based.
This commit is contained in:
parent
67f535332c
commit
05c85290ca
1 changed files with 5 additions and 1 deletions
|
@ -1813,7 +1813,7 @@ current thread."
|
|||
|
||||
(defun notmuch-show-get-filename ()
|
||||
"Return the filename of the current message."
|
||||
(let ((duplicate (or (notmuch-show-get-prop :duplicate) 1)))
|
||||
(let ((duplicate (notmuch-show-get-duplicate)))
|
||||
(nth (1- duplicate) (notmuch-show-get-prop :filename))))
|
||||
|
||||
(defun notmuch-show-get-header (header &optional props)
|
||||
|
@ -1826,6 +1826,10 @@ current thread."
|
|||
(defun notmuch-show-get-date ()
|
||||
(notmuch-show-get-header :Date))
|
||||
|
||||
(defun notmuch-show-get-duplicate ()
|
||||
;; if no duplicate property exists, assume first file
|
||||
(or (notmuch-show-get-prop :duplicate) 1))
|
||||
|
||||
(defun notmuch-show-get-timestamp ()
|
||||
(notmuch-show-get-prop :timestamp))
|
||||
|
||||
|
|
Loading…
Reference in a new issue