how to use signatures in mu v1.12.2?

43 views
Skip to first unread message

Vlad Maraev

unread,
Mar 31, 2024, 7:30:20 AM3/31/24
to mu-discuss
Hello!

Now when "mu4e-compose-signature" is obsolete, how can the signature be configured depending on whether I am composing a message or replying? The signature set with "message-signature" is applied everywhere. I know that gnus recommends configuring this with "gnus-posting-styles", but it doesn't seem to be supported by mu4e.

All the best,
Vlad

Dirk-Jan C. Binnema

unread,
Mar 31, 2024, 12:07:13 PM3/31/24
to mu-di...@googlegroups.com
Don't think much has changed; but you can just set `message-signature'
to a function (or even just a form), and use `mu4e-compose-type' to
choose the desired signature text.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
gpg: 6987 9CED 1745 9375 0F14 DA98 11DD FEA9 DCC4 A036

Jerry Lee Daniel

unread,
May 7, 2024, 5:41:15 AM5/7/24
to mu-discuss

Loans, Project and Digital Investment financing available up to $150m.
Have a Business Plan, Fundable Project and Collateral.

Contact: danielj...@gmail.com
Whatsapp: ‪+1 (918) 707‑0858

Kourosh Kalayeh

unread,
Mar 5, 2025, 9:36:44 PM3/5/25
to Dirk-Jan C. Binnema, mu-di...@googlegroups.com
On Mar 31, 2024, at 12:07-0400 "Dirk-Jan C. Binnema" <dj...@djcbsoftware.nl> wrote:

> On Sunday Mar 31 2024, Vlad Maraev wrote:
>
>> Hello!
>>
>> Now when "mu4e-compose-signature" is obsolete, how can the signature be
>> configured depending on whether I am composing a message or replying? The
>> signature set with "message-signature" is applied everywhere. I know that
>> gnus recommends configuring this with "gnus-posting-styles", but it doesn't
>> seem to be supported by mu4e.
>
> Don't think much has changed; but you can just set `message-signature'
> to a function (or even just a form), and use `mu4e-compose-type' to
> choose the desired signature text.
>

Hi Dirk,

I followed your suggestion to use mu4e-compose-type, but it seems this variable is always nil when evaluated in the function assigned to message-signature. Specifically, my debug message shows:

DEBUG: kk-mu4e-signature called with mu4e-compose-type = nil

Here's the minimal example of my function:

(defun kk-mu4e-signature ()
"Insert signature only for new messages."
(message "DEBUG: kk-mu4e-signature called with mu4e-compose-type = %s"
mu4e-compose-type)
(if (eq mu4e-compose-type 'new)
"My Signature"
nil))

Is there a recommended way to ensure mu4e-compose-type is available when message-signature is evaluated? Am I missing something?

Thanks,
Kourosh

Dirk-Jan C. Binnema

unread,
Mar 8, 2025, 3:35:09 AM3/8/25
to Kourosh Kalayeh, mu-di...@googlegroups.com
Hi Kourosh,

On Wednesday Mar 05 2025, Kourosh Kalayeh wrote:

> On Mar 31, 2024, at 12:07-0400 "Dirk-Jan C. Binnema" <dj...@djcbsoftware.nl> wrote:

<snip>

> I followed your suggestion to use mu4e-compose-type, but it seems this variable is always nil when evaluated in the function assigned to message-signature. Specifically, my debug message shows:
>
> DEBUG: kk-mu4e-signature called with mu4e-compose-type = nil
>
> Here's the minimal example of my function:
>
> (defun kk-mu4e-signature ()
> "Insert signature only for new messages."
> (message "DEBUG: kk-mu4e-signature called with mu4e-compose-type = %s"
> mu4e-compose-type)
> (if (eq mu4e-compose-type 'new)
> "My Signature"
> nil))
>
> Is there a recommended way to ensure mu4e-compose-type is available
> when message-signature is evaluated? Am I missing something?

It worked for reply/forward/.. but not for new (probably after the
compose rework). Anyway, pushed a fix, thanks!

Kourosh Kalayeh

unread,
Mar 9, 2025, 12:06:06 PM3/9/25
to Dirk-Jan C. Binnema, mu-di...@googlegroups.com

On Mar 08, 2025, at 03:34-0500 "Dirk-Jan C. Binnema" <dj...@djcbsoftware.nl> wrote:

> Hi Kourosh,
>
> On Wednesday Mar 05 2025, Kourosh Kalayeh wrote:
>
>> On Mar 31, 2024, at 12:07-0400 "Dirk-Jan C. Binnema" <dj...@djcbsoftware.nl> wrote:
>
> <snip>
>
>> I followed your suggestion to use mu4e-compose-type, but it seems this variable is always nil when evaluated in the function assigned to message-signature. Specifically, my debug message shows:
>>
>> DEBUG: kk-mu4e-signature called with mu4e-compose-type = nil
>>
>> Here's the minimal example of my function:
>>
>> (defun kk-mu4e-signature ()
>> "Insert signature only for new messages."
>> (message "DEBUG: kk-mu4e-signature called with mu4e-compose-type = %s"
>> mu4e-compose-type)
>> (if (eq mu4e-compose-type 'new)
>> "My Signature"
>> nil))
>>
>> Is there a recommended way to ensure mu4e-compose-type is available
>> when message-signature is evaluated? Am I missing something?
>
> It worked for reply/forward/.. but not for new (probably after the
> compose rework). Anyway, pushed a fix, thanks!
>

Thanks!
Kourosh
Reply all
Reply to author
Forward
0 new messages