diff options
| author | David Bremner <david@tethera.net> | 2022-08-04 08:48:08 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-08-07 07:05:49 -0300 |
| commit | 6d6d2a5fe7a04cc8de43d6b27844c50f02d749ed (patch) | |
| tree | f37fc08f90fb82386cbe4ee0e746243f6620e2af | |
| parent | 05c85290ca43a22d99bc65f5b40e6b8027081ce8 (diff) | |
emacs: add duplicate support to notmuch-show-view-raw-message
This fixes one of the bugs reported by Gregor in [1]
[1]: id:87edxw8jp4.fsf@no.workgroup
| -rw-r--r-- | emacs/notmuch-show.el | 8 | ||||
| -rwxr-xr-x | test/T450-emacs-show.sh | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index e9a9ac2c..a6650678 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -2143,12 +2143,16 @@ to show, nil otherwise." "View the original source of the current message." (interactive) (let* ((id (notmuch-show-get-message-id)) - (buf (get-buffer-create (concat "*notmuch-raw-" id "*"))) + (duplicate (notmuch-show-get-duplicate)) + (args (if (> duplicate 1) + (list (format "--duplicate=%d" duplicate) id) + (list id))) + (buf (get-buffer-create (format "*notmuch-raw-%s-%d*" id duplicate))) (inhibit-read-only t)) (pop-to-buffer-same-window buf) (erase-buffer) (let ((coding-system-for-read 'no-conversion)) - (notmuch--call-process notmuch-command nil t nil "show" "--format=raw" id)) + (apply #'notmuch--call-process notmuch-command nil t nil "show" "--format=raw" args)) (goto-char (point-min)) (set-buffer-modified-p nil) (setq buffer-read-only t) diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh index 83e902f1..c4202e0a 100755 --- a/test/T450-emacs-show.sh +++ b/test/T450-emacs-show.sh @@ -383,7 +383,6 @@ test_expect_equal_file_nonempty $EXPECTED/notmuch-show-duplicate-4 OUTPUT FILE4=$(notmuch search --output=files --duplicate=4 "id:${ID3}") test_begin_subtest "duplicate=4, raw" -test_subtest_known_broken test_emacs "(notmuch-show \"id:${ID3}\") (notmuch-show-choose-duplicate 4) (notmuch-show-view-raw-message) |
