[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hook run just in message-mode just before user begins composing/repl
From: |
Eric Abrahamsen |
Subject: |
Re: hook run just in message-mode just before user begins composing/replying? |
Date: |
Tue, 09 May 2023 10:40:05 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Gregor Zattler <telegraph@gmx.net> writes:
> Hi Tim, Manuel,
> * Tim Landscheidt <tim@tim-landscheidt.de> [2023-05-09; 13:20 GMT]:
>> Gregor Zattler <telegraph@gmx.net> wrote:
>>> I wrote two functions which, manually called in a
>>> buffer just set up by message-mode for me to start
>>> typing my message/reply, manipulate the headers of said
>>> message.
>>
>>> ATM I call them in message-send-hook but then I do not
>>> see the result of the manipulations and sometimes I would
>>> like to adjust headers after these functions run.
>>
>>> I did not find a hook for this purpose. I experimented
>>> with message-signature-setup-hook but then one function
>>> mangles the headers, the other function does nothing,
>>> indicating that the headers are not setup or not
>>> accessible as at the moment the user (I) starts to
>>> type.
>>
>>> Any ideas how to solve this puzzle?
>>
>> There are also (in Emacs 28.2) message-header-setup-hook and
>> message-setup-hook that look promising. Do they work for
>> you?
>
> sadly no. These are the hooks I already tested (should
> have be more specific in my original post). Somehow
> the functions don't work there. The more basic one
> simply does nothing, the other one mangles the headers
> which it does not, if called manually in the
> "*unsent mail to..." buffer.
>
> Any ideas how to actually see the buffer when the hooks
> are run? Then I could adjust my functions or decide
> that it's simply the wrong hook.
>
> A message-just-before-user-is-allowed-to-type-hook
> would be great...
Maybe just the `message-mode-hook'?
- hook run just in message-mode just before user begins composing/replying?, Gregor Zattler, 2023/05/09
- Re: hook run just in message-mode just before user begins composing/replying?, Tim Landscheidt, 2023/05/09
- Re: hook run just in message-mode just before user begins composing/replying?, Gregor Zattler, 2023/05/09
- Re: hook run just in message-mode just before user begins composing/replying?, Tim Landscheidt, 2023/05/09
- Re: hook run just in message-mode just before user begins composing/replying?, Gregor Zattler, 2023/05/10
- Re: hook run just in message-mode just before user begins composing/replying?, Manuel Giraud, 2023/05/10
- Re: hook run just in message-mode just before user begins composing/replying?, Gregor Zattler, 2023/05/10
Re: hook run just in message-mode just before user begins composing/replying?, Manuel Giraud, 2023/05/09