* bug#59007: rmail-forward generates wrong-type-argument error
@ 2022-11-03 21:49 Nicolas Graner
2022-11-05 12:02 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Graner @ 2022-11-03 21:49 UTC (permalink / raw)
To: 59007
In Emacs 29.0.50 master, the command rmail-forward always generates an
error.
To reproduce, open any Rmail file with rmail and type "f".
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("\\`[^ @]+@[^ @]+\\'" nil nil t)
message-mail(nil "[nicolas@graner.name: testing]" ((In-Reply-To) ("cc")) nil nil (rmail-yank-current-message #<buffer bug-test>) ((rmail-mark-message #<buffer bug-test> (1) 5)) (rmail-mail-return #<buffer bug-test>))
compose-mail(nil "[nicolas@graner.name: testing]" ((In-Reply-To) ("cc")) nil nil (rmail-yank-current-message #<buffer bug-test>) ((rmail-mark-message #<buffer bug-test> (1) 5)) (rmail-mail-return #<buffer bug-test>))
rmail-start-mail(nil nil "[nicolas@graner.name: testing]" nil nil #<buffer bug-test> ((rmail-mark-message #<buffer bug-test> (1) 5)) t)
rmail-forward(nil)
funcall-interactively(rmail-forward nil)
call-interactively(rmail-forward nil nil)
command-execute(rmail-forward)
Explanation:
In message-mail, code was added to fix incorrect In-Reply-To headers
sent by Firefox. This code assumes that the value of the header is a
string, but in messages generated by rmail-forward, the value of
In-Reply-To is nil.
Suggested patch:
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 24cba97718..3bbd68bdcd 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -7034,6 +7034,7 @@ message-mail
;; Firefox sends us In-Reply-To headers that are Message-IDs
;; without <> around them. Fix that.
(when (and (eq (car h) 'In-Reply-To)
+ (stringp (cdr h))
;; Looks like a Message-ID.
(string-match-p "\\`[^ @]+@[^ @]+\\'" (cdr h))
(not (string-match-p "\\`<.*>\\'" (cdr h))))
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#59007: rmail-forward generates wrong-type-argument error
2022-11-03 21:49 bug#59007: rmail-forward generates wrong-type-argument error Nicolas Graner
@ 2022-11-05 12:02 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2022-11-05 12:02 UTC (permalink / raw)
To: Nicolas Graner; +Cc: 59007-done
> From: Nicolas Graner <nicolas@graner.name>
> Date: Thu, 03 Nov 2022 22:49:43 +0100
>
> In Emacs 29.0.50 master, the command rmail-forward always generates an
> error.
>
> To reproduce, open any Rmail file with rmail and type "f".
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> string-match("\\`[^ @]+@[^ @]+\\'" nil nil t)
> message-mail(nil "[nicolas@graner.name: testing]" ((In-Reply-To) ("cc")) nil nil (rmail-yank-current-message #<buffer bug-test>) ((rmail-mark-message #<buffer bug-test> (1) 5)) (rmail-mail-return #<buffer bug-test>))
> compose-mail(nil "[nicolas@graner.name: testing]" ((In-Reply-To) ("cc")) nil nil (rmail-yank-current-message #<buffer bug-test>) ((rmail-mark-message #<buffer bug-test> (1) 5)) (rmail-mail-return #<buffer bug-test>))
> rmail-start-mail(nil nil "[nicolas@graner.name: testing]" nil nil #<buffer bug-test> ((rmail-mark-message #<buffer bug-test> (1) 5)) t)
> rmail-forward(nil)
> funcall-interactively(rmail-forward nil)
> call-interactively(rmail-forward nil nil)
> command-execute(rmail-forward)
>
> Explanation:
>
> In message-mail, code was added to fix incorrect In-Reply-To headers
> sent by Firefox. This code assumes that the value of the header is a
> string, but in messages generated by rmail-forward, the value of
> In-Reply-To is nil.
>
> Suggested patch:
Thanks, installed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-05 12:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 21:49 bug#59007: rmail-forward generates wrong-type-argument error Nicolas Graner
2022-11-05 12:02 ` Eli Zaretskii
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.