GNU bug report logs - #64454
30.0.50; In-Reply-To header obsolete content

Previous Next

Package: emacs;

Reported by: Andrew Cohen <acohen <at> ust.hk>

Date: Tue, 4 Jul 2023 06:18:01 UTC

Severity: normal

Found in version 30.0.50

To reply to this bug, email your comments to 64454 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#64454; Package emacs. (Tue, 04 Jul 2023 06:18:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Cohen <acohen <at> ust.hk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 04 Jul 2023 06:18:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrew Cohen <acohen <at> ust.hk>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; In-Reply-To header obsolete content
Date: Tue, 04 Jul 2023 14:11:35 +0800
When replying to an email, gnus constructs an In-Reply-To: header that
contains the message-id of the originating email followed by a phrase of
the form:

(User's  message of "Wed, 17 Nov 2021 22:16:04 -0800")

While allowed, the addition of this parenthetical phrase has been made
obsolete as of RFC5322. I suggest removing it, or wrapping it in a
defcustom 'message-strict-rfc5322. Any preferences?

-- 
Andrew Cohen




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64454; Package emacs. (Tue, 04 Jul 2023 08:54:01 GMT) Full text and rfc822 format available.

Message #8 received at 64454 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Andrew Cohen <acohen <at> ust.hk>
Cc: 64454 <at> debbugs.gnu.org
Subject: Re: bug#64454: 30.0.50; In-Reply-To header obsolete content
Date: Tue, 04 Jul 2023 10:53:28 +0200
>>>>> On Tue, 04 Jul 2023 14:11:35 +0800, Andrew Cohen <acohen <at> ust.hk> said:

    Andrew> When replying to an email, gnus constructs an In-Reply-To: header that
    Andrew> contains the message-id of the originating email followed by a phrase of
    Andrew> the form:

    Andrew> (User's  message of "Wed, 17 Nov 2021 22:16:04 -0800")

    Andrew> While allowed, the addition of this parenthetical phrase has been made
    Andrew> obsolete as of RFC5322. I suggest removing it, or wrapping it in a
    Andrew> defcustom 'message-strict-rfc5322. Any preferences?

Iʼd remove it, document its removal, but have a defcustom to get it
back.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64454; Package emacs. (Tue, 04 Jul 2023 11:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 64454 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrew Cohen <acohen <at> ust.hk>
Cc: 64454 <at> debbugs.gnu.org
Subject: Re: bug#64454: 30.0.50; In-Reply-To header obsolete content
Date: Tue, 04 Jul 2023 14:27:05 +0300
> From: Andrew Cohen <acohen <at> ust.hk>
> Date: Tue, 04 Jul 2023 14:11:35 +0800
> 
> 
> When replying to an email, gnus constructs an In-Reply-To: header that
> contains the message-id of the originating email followed by a phrase of
> the form:
> 
> (User's  message of "Wed, 17 Nov 2021 22:16:04 -0800")
> 
> While allowed, the addition of this parenthetical phrase has been made
> obsolete as of RFC5322. I suggest removing it, or wrapping it in a
> defcustom 'message-strict-rfc5322. Any preferences?

If you decide to remove it, please make that conditional on a
defcustom, so that interested users will have a way to get back old
behavior, when they need that.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64454; Package emacs. (Sat, 16 Sep 2023 23:52:01 GMT) Full text and rfc822 format available.

Message #14 received at 64454 <at> debbugs.gnu.org (full text, mbox):

From: Björn Bidar <bjorn.bidar <at> thaodan.de>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Andrew Cohen <acohen <at> ust.hk>, 64454 <at> debbugs.gnu.org
Subject: Re: bug#64454: 30.0.50; In-Reply-To header obsolete content
Date: Sun, 17 Sep 2023 02:51:00 +0300
Robert Pluim <rpluim <at> gmail.com> writes:

>>>>>> On Tue, 04 Jul 2023 14:11:35 +0800, Andrew Cohen <acohen <at> ust.hk> said:
>
>     Andrew> When replying to an email, gnus constructs an In-Reply-To: header that
>     Andrew> contains the message-id of the originating email followed by a phrase of
>     Andrew> the form:
>
>     Andrew> (User's  message of "Wed, 17 Nov 2021 22:16:04 -0800")
>
>     Andrew> While allowed, the addition of this parenthetical phrase has been made
>     Andrew> obsolete as of RFC5322. I suggest removing it, or wrapping it in a
>     Andrew> defcustom 'message-strict-rfc5322. Any preferences?
>
> Iʼd remove it, document its removal, but have a defcustom to get it
> back.
>
> Robert

Could it still be relevant when interacting with clients that confirm to
that rfc?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64454; Package emacs. (Mon, 18 Sep 2023 10:00:02 GMT) Full text and rfc822 format available.

Message #17 received at 64454 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Björn Bidar <bjorn.bidar <at> thaodan.de>
Cc: Andrew Cohen <acohen <at> ust.hk>, 64454 <at> debbugs.gnu.org
Subject: Re: bug#64454: 30.0.50; In-Reply-To header obsolete content
Date: Mon, 18 Sep 2023 11:59:25 +0200
>>>>> On Sun, 17 Sep 2023 02:51:00 +0300, Björn Bidar <bjorn.bidar <at> thaodan.de> said:

    Björn> Robert Pluim <rpluim <at> gmail.com> writes:
    >>>>>>> On Tue, 04 Jul 2023 14:11:35 +0800, Andrew Cohen <acohen <at> ust.hk> said:
    >> 
    Andrew> When replying to an email, gnus constructs an In-Reply-To: header that
    Andrew> contains the message-id of the originating email followed by a phrase of
    Andrew> the form:
    >> 
    Andrew> (User's  message of "Wed, 17 Nov 2021 22:16:04 -0800")
    >> 
    Andrew> While allowed, the addition of this parenthetical phrase has been made
    Andrew> obsolete as of RFC5322. I suggest removing it, or wrapping it in a
    Andrew> defcustom 'message-strict-rfc5322. Any preferences?
    >> 
    >> Iʼd remove it, document its removal, but have a defcustom to get it
    >> back.
    >> 
    >> Robert

    Björn> Could it still be relevant when interacting with clients that confirm to
    Björn> that rfc?

I donʼt see how: that RFC makes that phrasing obsolete, so there will
no doubt be a client that at some point interprets the header
strictly, in which you donʼt want to be outputting the old format, so
we should output the new one by default.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64454; Package emacs. (Tue, 04 Feb 2025 01:52:02 GMT) Full text and rfc822 format available.

Message #20 received at 64454 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Cohen <acohen <at> ust.hk>
To: 64454 <at> debbugs.gnu.org
Cc: Robert Pluim <rpluim <at> gmail.com>
Subject: Re: bug#64454: 30.0.50; In-Reply-To header obsolete content
Date: Tue, 04 Feb 2025 09:50:55 +0800
I fixed this in my tree but never got around to pushing the result. I'll
push the following unless there are changes that are needed.

Best,
Andy

da900f025e9ed5e8d0e5aa9fb6bf9f5d54436c6c
Author:     Andrew G Cohen <cohen <at> andy.bu.edu>
AuthorDate: Wed Jul 5 15:21:16 2023 +0800
Commit:     Andrew G Cohen <cohen <at> andy.bu.edu>
CommitDate: Tue Feb 4 09:45:29 2025 +0800

Parent:     2dc8c54341e Fix crashes on XI devices being disabled (bug#75870)
Merged:     master
Contained:  feature/igc
Follows:    emacs-29.1.90 (176367)

Don't use obsolete In-Reply-To header format in messages

When creating a new message, message-send-mail uses an obsolete format
for the In-Reply-To header that includes additional information about
the originating message.  This patch changes the default to use the
rfc5322 approved format, but allow the obsolete format through a
defcustom.

* lisp/gnus/message.el (message-make-in-reply-to): Return only the
message-id of the originating message (the default) unless the new
custom variable message-header-use-obsolete-in-reply-to is non-nil.
* doc/misc/message.texi: Document the new custom variable
message-header-use-obsolete-in-reply-to.

2 files changed, 44 insertions(+), 28 deletions(-)
doc/misc/message.texi |  6 +++++
lisp/gnus/message.el  | 66 +++++++++++++++++++++++++++++----------------------

modified   doc/misc/message.texi
@@ -1791,6 +1791,12 @@ Message Headers
 @code{message-carefully-insert-headers} will not insert a @code{To}
 header when the message is already @code{CC}ed to the recipient.
 
+@item message-header-use-obsolete-in-reply-to
+@vindex message-header-use-obsolete-in-reply-to
+Use an obsolete form of the @code{In-Reply-To} header that includes a
+parenthetical phrase with details of the originating email following
+the message id.  The default is @code{nil}.
+
 @item message-syntax-checks
 @vindex message-syntax-checks
 Controls what syntax checks should not be performed on outgoing posts.
modified   lisp/gnus/message.el
@@ -113,6 +113,13 @@ message-faces
   :group 'message
   :group 'faces)
 
+(defcustom message-header-use-obsolete-in-reply-to nil
+  "Include extra information in the In-Reply-To header (this form
+has been obsolete since RFC 2822.)"
+  :group 'message-headers
+  :version "31.1"
+  :type 'boolean)
+
 (defcustom message-directory "~/Mail/"
   "Directory from which all other mail file variables are derived."
   :group 'message-various
@@ -5993,35 +6000,38 @@ message-make-in-reply-to
   "Return the In-Reply-To header for this message."
   (when message-reply-headers
     (let ((from (mail-header-from message-reply-headers))
-	  (date (mail-header-date message-reply-headers))
-	  (msg-id (mail-header-id message-reply-headers)))
+          (date (mail-header-date message-reply-headers))
+          (msg-id (mail-header-id message-reply-headers)))
       (when from
-	(let ((name (mail-extract-address-components from)))
-	  (concat
-	   msg-id (if msg-id " (")
-	   (if (car name)
-	       (if (string-match "[^[:ascii:]]" (car name))
-		   ;; Quote a string containing non-ASCII characters.
-		   ;; It will make the RFC2047 encoder cause an error
-		   ;; if there are special characters.
-                   (mm-with-multibyte-buffer
-                     (insert (car name))
-                     (goto-char (point-min))
-                     (while (search-forward "\"" nil t)
-                       (when (prog2
-                                 (backward-char)
-                                 (zerop (% (skip-chars-backward "\\\\") 2))
-                               (goto-char (match-beginning 0)))
-                         (insert "\\"))
-                       (forward-char))
-                     ;; Those quotes will be removed by the RFC2047 encoder.
-                     (concat "\"" (buffer-string) "\""))
-		 (car name))
-	     (nth 1 name))
-	   "'s message of \""
-	   (if (or (not date) (string= date ""))
-	       "(unknown date)" date)
-	   "\"" (if msg-id ")")))))))
+        (let ((name (mail-extract-address-components from)))
+          (concat
+           msg-id
+           (when message-header-use-obsolete-in-reply-to
+             (concat
+              (if msg-id " (")
+              (if (car name)
+                  (if (string-match "[^[:ascii:]]" (car name))
+                      ;; Quote a string containing non-ASCII characters.
+                      ;; It will make the RFC2047 encoder cause an error
+                      ;; if there are special characters.
+                      (mm-with-multibyte-buffer
+                        (insert (car name))
+                        (goto-char (point-min))
+                        (while (search-forward "\"" nil t)
+                          (when (prog2
+                                    (backward-char)
+                                    (zerop (% (skip-chars-backward "\\\\") 2))
+                                  (goto-char (match-beginning 0)))
+                            (insert "\\"))
+                          (forward-char))
+                        ;; Those quotes will be removed by the RFC2047 encoder.
+                        (concat "\"" (buffer-string) "\""))
+                    (car name))
+                (nth 1 name))
+              "'s message of \""
+              (if (or (not date) (string= date ""))
+                  "(unknown date)" date)
+              "\"" (if msg-id ")")))))))))
 
 (defun message-make-distribution ()
   "Make a Distribution header."



-- 
Andrew Cohen




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64454; Package emacs. (Tue, 04 Feb 2025 09:01:02 GMT) Full text and rfc822 format available.

Message #23 received at 64454 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Andrew Cohen <acohen <at> ust.hk>
Cc: 64454 <at> debbugs.gnu.org
Subject: Re: bug#64454: 30.0.50; In-Reply-To header obsolete content
Date: Tue, 04 Feb 2025 10:00:35 +0100
>>>>> On Tue, 04 Feb 2025 09:50:55 +0800, Andrew Cohen <acohen <at> ust.hk> said:

    Andrew> I fixed this in my tree but never got around to pushing the result. I'll
    Andrew> push the following unless there are changes that are needed.

Only minor comments below.

    Andrew> Best,
    Andrew> Andy

    Andrew> da900f025e9ed5e8d0e5aa9fb6bf9f5d54436c6c
    Andrew> Author:     Andrew G Cohen <cohen <at> andy.bu.edu>
    Andrew> AuthorDate: Wed Jul 5 15:21:16 2023 +0800
    Andrew> Commit:     Andrew G Cohen <cohen <at> andy.bu.edu>
    Andrew> CommitDate: Tue Feb 4 09:45:29 2025 +0800

    Andrew> Parent:     2dc8c54341e Fix crashes on XI devices being disabled (bug#75870)
    Andrew> Merged:     master
    Andrew> Contained:  feature/igc
    Andrew> Follows:    emacs-29.1.90 (176367)

    Andrew> Don't use obsolete In-Reply-To header format in messages

    Andrew> When creating a new message, message-send-mail uses an obsolete format
    Andrew> for the In-Reply-To header that includes additional information about
    Andrew> the originating message.  This patch changes the default to use the
    Andrew> rfc5322 approved format, but allow the obsolete format through a
    Andrew> defcustom.

    Andrew> * lisp/gnus/message.el (message-make-in-reply-to): Return only the
    Andrew> message-id of the originating message (the default) unless the new
    Andrew> custom variable message-header-use-obsolete-in-reply-to is non-nil.
    Andrew> * doc/misc/message.texi: Document the new custom variable
    Andrew> message-header-use-obsolete-in-reply-to.

This new user option, its default value, and the behaviour change
should be documented in NEWS

Also please put (Bug#64454) somewhere in the commit message

    Andrew> 2 files changed, 44 insertions(+), 28 deletions(-)
    Andrew> doc/misc/message.texi |  6 +++++
    Andrew> lisp/gnus/message.el  | 66 +++++++++++++++++++++++++++++----------------------

    Andrew> modified   doc/misc/message.texi
    Andrew> @@ -1791,6 +1791,12 @@ Message Headers
    Andrew>  @code{message-carefully-insert-headers} will not insert a @code{To}
    Andrew>  header when the message is already @code{CC}ed to the recipient.
 
    Andrew> +@item message-header-use-obsolete-in-reply-to
    Andrew> +@vindex message-header-use-obsolete-in-reply-to
    Andrew> +Use an obsolete form of the @code{In-Reply-To} header that includes a
    Andrew> +parenthetical phrase with details of the originating email following
    Andrew> +the message id.  The default is @code{nil}.
    Andrew> +

"When non-@code{nil}, " or similar

    Andrew>  @item message-syntax-checks
    Andrew>  @vindex message-syntax-checks
    Andrew>  Controls what syntax checks should not be performed on outgoing posts.
    Andrew> modified   lisp/gnus/message.el
    Andrew> @@ -113,6 +113,13 @@ message-faces
    Andrew>    :group 'message
    Andrew>    :group 'faces)
 
    Andrew> +(defcustom message-header-use-obsolete-in-reply-to nil
    Andrew> +  "Include extra information in the In-Reply-To header (this form
    Andrew> +has been obsolete since RFC 2822.)"
    Andrew> +  :group 'message-headers
    Andrew> +  :version "31.1"
    Andrew> +  :type 'boolean)
    Andrew> +

The first sentence of the docstring should fit on a single line. The
reference to RFC 2822 can go in the body

    Andrew>  (defcustom message-directory "~/Mail/"
    Andrew>    "Directory from which all other mail file variables are derived."
    Andrew>    :group 'message-various
    Andrew> @@ -5993,35 +6000,38 @@ message-make-in-reply-to
    Andrew>    "Return the In-Reply-To header for this message."
    Andrew>    (when message-reply-headers
    Andrew>      (let ((from (mail-header-from message-reply-headers))
    Andrew> -	  (date (mail-header-date message-reply-headers))
    Andrew> -	  (msg-id (mail-header-id message-reply-headers)))
    Andrew> +          (date (mail-header-date message-reply-headers))
    Andrew> +          (msg-id (mail-header-id
    Andrew>    message-reply-headers)))

Ah, the side-effects of `indent-tabs-mode' being nil for
`emacs-lisp-mode' now 🙂 (no change needed)

Robert
-- 




This bug report was last modified 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.