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

2017-03-11 Thread David Bremner
Mark Walters writes: > We use message-send-hook for two things -- tagging drafts deleted, and > tagging replied the parent message of a reply. We should not use > message-send-hook as that will affect gnus etc too. Moreover, > message-send-hook is run before the message is sent, even before the >

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

2017-03-11 Thread David Bremner
Mark Walters writes: > 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

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

2017-03-10 Thread Mark Walters
On Fri, 10 Mar 2017, David Bremner wrote: > Mark Walters 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 kille

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

2017-03-10 Thread David Bremner
Mark Walters 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. > + (p

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

2016-11-17 Thread Mark Walters
We use message-send-hook for two things -- tagging drafts deleted, and tagging replied the parent message of a reply. We should not use message-send-hook as that will affect gnus etc too. Moreover, message-send-hook is run before the message is sent, even before the user confirms they want to send