]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-show.el
Make keys of notmuch-tag-formats regexps and use caching
[notmuch] / emacs / notmuch-show.el
index 88752f1719306271fc4e276568dae0a904fd4701..019f51d71a678ece8a83b0adc39a295173f9983e 100644 (file)
@@ -1145,6 +1145,7 @@ function is used."
     ;; Don't track undo information for this buffer
     (set 'buffer-undo-list t)
 
+    (notmuch-tag-clear-cache)
     (erase-buffer)
     (goto-char (point-min))
     (save-excursion
@@ -1781,10 +1782,14 @@ message."
       (setq shell-command
            (concat notmuch-command " show --format=raw "
                    (shell-quote-argument (notmuch-show-get-message-id)) " | " command)))
-    (let ((buf (get-buffer-create (concat "*notmuch-pipe*"))))
+    (let ((cwd default-directory)
+         (buf (get-buffer-create (concat "*notmuch-pipe*"))))
       (with-current-buffer buf
        (setq buffer-read-only nil)
        (erase-buffer)
+       ;; Use the originating buffer's working directory instead of
+       ;; that of the pipe buffer.
+       (cd cwd)
        (let ((exit-code (call-process-shell-command shell-command nil buf)))
          (goto-char (point-max))
          (set-buffer-modified-p nil)