bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#74658: Remove the Mail-Followup-To header when empty


From: Tomas Volf
Subject: bug#74658: Remove the Mail-Followup-To header when empty
Date: Tue, 03 Dec 2024 00:17:10 +0100

Tags: patch

According to the info manual (message)Mailing Lists, the
Mail-Followup-To header should be removed when it is empty:

> If there is one, it is left alone.  (Except if it’s empty; in that
> case, the field is removed and is not replaced with an automatically
> generated one.  This lets you disable MFT generation on a per-message
> basis.)

While the code attempted to do that, the call to `message-remove-header'
passed wrong arguments.  Since the IS-REGEXP argument was not passed,
the HEADER was considered a full header name (if I read the code right)
and therefore failed to match (since the code passed in a regexp instead
of a fixed string).

The fix is simple, remove the leading ^ and trailing :.

Change log entry as requested:

Actually remove the Mail-Followup-To header iff empty in
message-send-mail.

* lisp/gnus/message.el (message-send-mail)
[(equal "" (mail-fetch-field "mail-followup-to")]: Pass a fixed string
instead of regexp to `message-remove-header'.



In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
cairo version 1.18.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101012
System Description: Guix System

Configured using:
 'configure
 
CONFIG_SHELL=/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bin/bash
 SHELL=/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bin/bash
 --prefix=/gnu/store/s8757iarmns4dpklil8pgdikmb68v7bf-emacs-29.4
 --enable-fast-install --with-cairo --with-modules
 --with-native-compilation=aot --disable-build-details'

Attachment: mail-followup-to.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]