diff options
| author | David Bremner <david@tethera.net> | 2022-08-04 08:08:33 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-08-07 07:05:49 -0300 |
| commit | 1849c68d0f4de0a2028df5f1708d473e60d87785 (patch) | |
| tree | 805d874444e78383c3a0c5f917f213c11d02e7b1 | |
| parent | 2c7438fe51e13ad3cfd54286f963066c5498af34 (diff) | |
emacs: update notmuch-show-get-filename to handle duplicates
This fixes one of the bugs reported by Gregor in [1].
[1]: id:87edxw8jp4.fsf@no.workgroup
| -rw-r--r-- | emacs/notmuch-show.el | 4 | ||||
| -rwxr-xr-x | test/T450-emacs-show.sh | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 1bc3b319..527db4bb 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1811,10 +1811,10 @@ current thread." ;; dme: Would it make sense to use a macro for many of these? -;; XXX TODO figure out what to do about multiple filenames (defun notmuch-show-get-filename () "Return the filename of the current message." - (car (notmuch-show-get-prop :filename))) + (let ((duplicate (or (notmuch-show-get-prop :duplicate) 1))) + (nth (1- duplicate) (notmuch-show-get-prop :filename)))) (defun notmuch-show-get-header (header &optional props) "Return the named header of the current message, if any." diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh index 2cebd43d..ab611d56 100755 --- a/test/T450-emacs-show.sh +++ b/test/T450-emacs-show.sh @@ -352,7 +352,6 @@ test_expect_equal "$output" "$subject" FILE3=$(notmuch search --output=files --duplicate=3 "id:${ID3}") test_begin_subtest "duplicate=3, stash" -test_subtest_known_broken test_emacs_expect_t \ "(notmuch-show \"id:${ID3}\") (notmuch-show-choose-duplicate 3) |
