* bug#74658: Remove the Mail-Followup-To header when empty
@ 2024-12-02 23:17 Tomas Volf
2024-12-03 14:02 ` Robert Pluim
0 siblings, 1 reply; 4+ messages in thread
From: Tomas Volf @ 2024-12-02 23:17 UTC (permalink / raw)
To: 74658
[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]
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'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mail-followup-to.patch --]
[-- Type: text/patch, Size: 603 bytes --]
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index b49e3f9d9ca..b4c5a1e2436 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4900,7 +4900,7 @@ If you always want Gnus to send messages in one piece, set
message-required-mail-headers))
;; otherwise, delete the MFT header if the field is empty
(when (equal "" (mail-fetch-field "mail-followup-to"))
- (message-remove-header "^Mail-Followup-To:")))
+ (message-remove-header "Mail-Followup-To")))
;; Insert some headers.
(let ((message-deletable-headers
(if news nil message-deletable-headers)))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#74658: Remove the Mail-Followup-To header when empty
2024-12-02 23:17 bug#74658: Remove the Mail-Followup-To header when empty Tomas Volf
@ 2024-12-03 14:02 ` Robert Pluim
2024-12-03 14:18 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Robert Pluim @ 2024-12-03 14:02 UTC (permalink / raw)
To: Tomas Volf; +Cc: 74658
>>>>> On Tue, 03 Dec 2024 00:17:10 +0100, Tomas Volf <~@wolfsden.cz> said:
Tomas> Tags: patch
Tomas> According to the info manual (message)Mailing Lists, the
Tomas> 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.)
Tomas> While the code attempted to do that, the call to `message-remove-header'
Tomas> passed wrong arguments. Since the IS-REGEXP argument was not passed,
Tomas> the HEADER was considered a full header name (if I read the code right)
Tomas> and therefore failed to match (since the code passed in a regexp instead
Tomas> of a fixed string).
Tomas> The fix is simple, remove the leading ^ and trailing :.
Yep. I can apply this to master. Maintainers, is adding
Copyright-paperwork-exempt: yes enough here? Or do we need a copyright
assignment from Tomas?
Robert
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#74658: Remove the Mail-Followup-To header when empty
2024-12-03 14:02 ` Robert Pluim
@ 2024-12-03 14:18 ` Eli Zaretskii
2024-12-03 15:22 ` Robert Pluim
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-12-03 14:18 UTC (permalink / raw)
To: Robert Pluim; +Cc: 74658, ~
> Cc: 74658@debbugs.gnu.org
> From: Robert Pluim <rpluim@gmail.com>
> Date: Tue, 03 Dec 2024 15:02:58 +0100
>
> >>>>> On Tue, 03 Dec 2024 00:17:10 +0100, Tomas Volf <~@wolfsden.cz> said:
>
> Tomas> Tags: patch
> Tomas> According to the info manual (message)Mailing Lists, the
> Tomas> 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.)
>
> Tomas> While the code attempted to do that, the call to `message-remove-header'
> Tomas> passed wrong arguments. Since the IS-REGEXP argument was not passed,
> Tomas> the HEADER was considered a full header name (if I read the code right)
> Tomas> and therefore failed to match (since the code passed in a regexp instead
> Tomas> of a fixed string).
>
> Tomas> The fix is simple, remove the leading ^ and trailing :.
>
> Yep. I can apply this to master. Maintainers, is adding
> Copyright-paperwork-exempt: yes enough here? Or do we need a copyright
> assignment from Tomas?
"Copyright-paperwork-exempt: yes" is enough.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#74658: Remove the Mail-Followup-To header when empty
2024-12-03 14:18 ` Eli Zaretskii
@ 2024-12-03 15:22 ` Robert Pluim
0 siblings, 0 replies; 4+ messages in thread
From: Robert Pluim @ 2024-12-03 15:22 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74658, ~
tags 74658 fixed
close 74658 31.1
quit
>>>>> On Tue, 03 Dec 2024 16:18:06 +0200, Eli Zaretskii <eliz@gnu.org> said:
Eli> "Copyright-paperwork-exempt: yes" is enough.
Thanks.
Closing.
Committed as 0033ce9ef8e
(with a slightly amended log message, mainly mentioning the bug
number).
Robert
--
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-03 15:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 23:17 bug#74658: Remove the Mail-Followup-To header when empty Tomas Volf
2024-12-03 14:02 ` Robert Pluim
2024-12-03 14:18 ` Eli Zaretskii
2024-12-03 15:22 ` Robert Pluim
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.