[PATCH] emacs: remove use of message-send-hook

Mark Walters markwalters1009 at gmail.com
Fri Mar 10 17:10:55 PST 2017


On Fri, 10 Mar 2017, David Bremner <david at tethera.net> wrote:
> Mark Walters <markwalters1009 at gmail.com> writes:
>
>> +    (let (tag-change
>> +	  post-send-tag-changes)
>> +      ;; post-send-tag-changes are tag-changes to apply after sending,
>> +      ;; but we need to store them now as the compose buffer is
>> +      ;; typically killed before message-send-and-exit returns.
>> +      (push (notmuch-message-mark-replied t) post-send-tag-changes)
>> +      (push (notmuch-draft--mark-deleted t) post-send-tag-changes)
>> +      (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
>> +	(if exit
>> +	    (message-send-and-exit arg)
>> +	  (message-send arg)))
>> +      (dolist (tag-change post-send-tag-changes)
>> +	(when tag-change
>> +	  (apply #'notmuch-tag tag-change))))))

Hi

> Would it be possible to concatenate the two lists and only call
> notmuch-tag once? It seems like that should be notably faster.

I think that it's not possible as they are tagging different
messages. We could probably do something with --batch but that would
mean some change in notmuch-tag itself.

Best wishes

Mark


More information about the notmuch mailing list