mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-02-17 23:53:15 +01:00
emacs: define notmuch-message-queued-tag-changes as buffer-local
Also improve the doc-string.
This commit is contained in:
parent
d8075ce50b
commit
117501d5ce
2 changed files with 13 additions and 13 deletions
|
@ -50,14 +50,14 @@ the \"inbox\" tag, you would set:
|
||||||
:type '(repeat string)
|
:type '(repeat string)
|
||||||
:group 'notmuch-send)
|
:group 'notmuch-send)
|
||||||
|
|
||||||
(defconst notmuch-message-queued-tag-changes nil
|
(defvar-local notmuch-message-queued-tag-changes nil
|
||||||
"List of messages and corresponding tag-changes to be applied when sending a message.
|
"List of tag changes to be applied when sending a message.
|
||||||
|
|
||||||
This variable is overridden by buffer-local versions in message
|
A list of queries and tag changes that are to be applied to them
|
||||||
buffers where tag changes should be triggered when sending off
|
when the message that was composed in the current buffer is being
|
||||||
the message. Each item in this list is a list of strings, where
|
send. Each item in this list is a list of strings, where the
|
||||||
the first is a notmuch query and the rest are the tag changes to
|
first is a notmuch query and the rest are the tag changes to be
|
||||||
be applied to the matching messages.")
|
applied to the matching messages.")
|
||||||
|
|
||||||
(defun notmuch-message-apply-queued-tag-changes ()
|
(defun notmuch-message-apply-queued-tag-changes ()
|
||||||
;; Apply the tag changes queued in the buffer-local variable
|
;; Apply the tag changes queued in the buffer-local variable
|
||||||
|
|
|
@ -266,8 +266,8 @@ Typically this is added to `notmuch-mua-send-hook'."
|
||||||
;; Create a buffer-local queue for tag changes triggered when
|
;; Create a buffer-local queue for tag changes triggered when
|
||||||
;; sending the reply.
|
;; sending the reply.
|
||||||
(when notmuch-message-replied-tags
|
(when notmuch-message-replied-tags
|
||||||
(setq-local notmuch-message-queued-tag-changes
|
(setq notmuch-message-queued-tag-changes
|
||||||
(list (cons query-string notmuch-message-replied-tags))))
|
(list (cons query-string notmuch-message-replied-tags))))
|
||||||
;; Insert the message body - but put it in front of the signature
|
;; Insert the message body - but put it in front of the signature
|
||||||
;; if one is present, and after any other content
|
;; if one is present, and after any other content
|
||||||
;; message*setup-hooks may have added to the message body already.
|
;; message*setup-hooks may have added to the message body already.
|
||||||
|
@ -507,10 +507,10 @@ the From: address."
|
||||||
;; Create a buffer-local queue for tag changes triggered when
|
;; Create a buffer-local queue for tag changes triggered when
|
||||||
;; sending the message.
|
;; sending the message.
|
||||||
(when notmuch-message-forwarded-tags
|
(when notmuch-message-forwarded-tags
|
||||||
(setq-local notmuch-message-queued-tag-changes
|
(setq notmuch-message-queued-tag-changes
|
||||||
(cl-loop for id in forward-queries
|
(cl-loop for id in forward-queries
|
||||||
collect
|
collect
|
||||||
(cons id notmuch-message-forwarded-tags))))
|
(cons id notmuch-message-forwarded-tags))))
|
||||||
;; `message-forward-make-body' shows the User-agent header. Hide
|
;; `message-forward-make-body' shows the User-agent header. Hide
|
||||||
;; it again.
|
;; it again.
|
||||||
(message-hide-headers)
|
(message-hide-headers)
|
||||||
|
|
Loading…
Add table
Reference in a new issue