unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Xiyue Deng <manphiz@gmail.com>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: Hooks for sending/replying to set a custom header
Date: Sun, 06 Oct 2024 22:37:54 -0700	[thread overview]
Message-ID: <875xq4wk0d.fsf@debian-hx90.lan> (raw)
In-Reply-To: <877cam3af8.fsf@tethera.net>

David Bremner <david@tethera.net> writes:

> Xiyue Deng <manphiz@gmail.com> writes:
>
>>>
>>> There is also message-server-alist, which does not need a header.
>>
>> Thanks for the tip!  I think that should work, though I'd like a more
>> notmuch-ish solution if possible.  And in fact I had some success on
>> advising `notmuch-mua-mail' and reacting on 'From from `other-headers'.
>>
>> I wonder whether notmuch may consider adding an abnormal hook that pass
>> in `headers' as an argument so that we don't need to use an advice?
>
> I'd consider message-server-alist to be the "notmuch-ish" solution,
> since we generally expect message-mode configuration to work for
> notmuch-message-mode.

Thanks for the suggestion!  I wasn't aware of this variable and I think
this does exactly what I intend to do.

One slight inconvenience is that the settings are used to set the header
during `message-send', which means you may not see the header being set
when you are editing the mail.  So if there is an error in your setting
you may not notice it until it is sent, which could be a bit late.  I
wish there is something that can be used to do this in
`message-mode-hook', but I guess I can settle for this for now.

Again, thanks for the tip and the work on notmuch!

-- 
Xiyue Deng

      reply	other threads:[~2024-10-07  5:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03  7:00 Hooks for sending/replying to set a custom header Xiyue Deng
2024-10-03 15:44 ` David Bremner
2024-10-03 17:22   ` Xiyue Deng
2024-10-05 14:13     ` David Bremner
2024-10-07  5:37       ` Xiyue Deng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875xq4wk0d.fsf@debian-hx90.lan \
    --to=manphiz@gmail.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).