diff options
| author | Marc Fargas <telenieko@telenieko.com> | 2024-03-14 15:56:49 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2024-06-15 14:54:04 -0300 |
| commit | 37c022aea000ab586ba2a7ea7bbac4292dda0dd3 (patch) | |
| tree | b79d02ff0fab89c9232831a6e30b4a05cf596b45 /emacs | |
| parent | 0d2a964ea3d0c466d6284dd0b693285941c28440 (diff) | |
Use `without-restriction` in `with-temporary-notmuch-message-buffer`
This ensures that the temporary copy of the current message-mode
buffer is whole and not limited by a current restriction.
An example of such restriction is the default one established by
message-mode when composing a reply, that hides the References,
In-Reply-To and similar headers.
Diffstat (limited to 'emacs')
| -rw-r--r-- | emacs/notmuch-maildir-fcc.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index 51020788..cf50e855 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -145,14 +145,15 @@ Otherwise set it according to `notmuch-fcc-dirs'." (defmacro with-temporary-notmuch-message-buffer (&rest body) "Set-up a temporary copy of the current message-mode buffer." - `(let ((case-fold-search t) - (buf (current-buffer)) - (mml-externalize-attachments message-fcc-externalize-attachments)) - (with-current-buffer (get-buffer-create " *message temp*") - (message-clone-locals buf) ;; for message-encoded-mail-cache - (erase-buffer) - (insert-buffer-substring buf) - ,@body))) + `(without-restriction + (let ((case-fold-search t) + (buf (current-buffer)) + (mml-externalize-attachments message-fcc-externalize-attachments)) + (with-current-buffer (get-buffer-create " *message temp*") + (message-clone-locals buf) ;; for message-encoded-mail-cache + (erase-buffer) + (insert-buffer-substring buf) + ,@body)))) (defun notmuch-maildir-setup-message-for-saving () "Setup message for saving. |
