hook for notmuch-show-reply?

classic Classic list List threaded Threaded
2 messages Options
Linus Arver Linus Arver
Reply | Threaded
Open this post in threaded view
|

hook for notmuch-show-reply?

Hello,

I want to make the "notmuch-show-reply" function compose messages with
different signature styles depending on some arbitrary logic of the
email being replied to. E.g., if I am responding to a message tagged
"+mailinglist", I want to append a signature like the one in this email.
On the other hand, for emails not tagged as such, I want to change the
signature style (and also set message-cite-reply-position to 'above).
How would I go about this? I tried using "message-signature-setup-hook"
and "also message-setup-hook" but these hooks are run before the
response body (yanked text) is inserted into the buffer. I don't really
want to use "message-send-hook" or "message-send-mail-hook" because
these are run just before sending messages, and I really want to see the
signature in the buffer before sending the message.

I found an old email from this list back in 2010 [1] proposing a hook to
notmuch-reply and it seems relevant, but I am not sure if that patch is
still recommended.

[1]: https://notmuchmail.org/pipermail/notmuch/2010/002399.html

--
Best,
Linus
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: hook for notmuch-show-reply?

Linus Arver <[hidden email]> writes:

> Hello,
>
> I want to make the "notmuch-show-reply" function compose messages with
> different signature styles depending on some arbitrary logic of the
> email being replied to. E.g., if I am responding to a message tagged
> "+mailinglist", I want to append a signature like the one in this
> email.

this probably needs to be done (or at least set up) before the reply
composition buffer is generated, since access to tag data is not easy in
the composition buffer.

> I don't really
> want to use "message-send-hook" or "message-send-mail-hook" because
> these are run just before sending messages, and I really want to see the
> signature in the buffer before sending the message.
>

I use message-templ for this

  http://pivot.cs.unb.ca/git?p=message-templ.git;a=summary

Unfortunately it's not very widely available in package repos (melpa and
friends). It is in debian testing/unstable as elpa-message-templ.

> I found an old email from this list back in 2010 [1] proposing a hook to
> notmuch-reply and it seems relevant, but I am not sure if that patch is
> still recommended.
>
> [1]: https://notmuchmail.org/pipermail/notmuch/2010/002399.html

I don't remember the details, but I doubt it still applies / works at
this point. There have been many changes to the way reply works in
notmuch-emacs.

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch