From unknown Sat Aug 16 21:15:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#59007 <59007@debbugs.gnu.org> To: bug#59007 <59007@debbugs.gnu.org> Subject: Status: rmail-forward generates wrong-type-argument error Reply-To: bug#59007 <59007@debbugs.gnu.org> Date: Sun, 17 Aug 2025 04:15:49 +0000 retitle 59007 rmail-forward generates wrong-type-argument error reassign 59007 emacs submitter 59007 Nicolas Graner severity 59007 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 03 17:50:00 2022 Received: (at submit) by debbugs.gnu.org; 3 Nov 2022 21:50:00 +0000 Received: from localhost ([127.0.0.1]:50943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqi63-0000HG-Ry for submit@debbugs.gnu.org; Thu, 03 Nov 2022 17:50:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:60828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqi5z-0000H4-Ip for submit@debbugs.gnu.org; Thu, 03 Nov 2022 17:49:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqi5z-00042N-Dw for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 17:49:55 -0400 Received: from ouvsmtp1.octopuce.fr ([194.36.166.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqi5x-0001XY-05 for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 17:49:54 -0400 Received: from panel.vitry.ouvaton.coop (unknown [194.36.166.20]) by ouvsmtp1.octopuce.fr (Postfix) with ESMTPS id 2FD121E8 for ; Thu, 3 Nov 2022 22:49:45 +0100 (CET) Received: from hypra-graner (215.124.67.86.rev.sfr.net [86.67.124.215]) by panel.vitry.ouvaton.coop (Postfix) with ESMTPSA id CAE395E1764 for ; Thu, 3 Nov 2022 22:49:44 +0100 (CET) From: Nicolas Graner To: bug-gnu-emacs@gnu.org Subject: rmail-forward generates wrong-type-argument error Date: Thu, 03 Nov 2022 22:49:43 +0100 Message-ID: <87v8nv4sjs.fsf@universite-paris-saclay.fr> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=194.36.166.50; envelope-from=nicolas@graner.name; helo=ouvsmtp1.octopuce.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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 #) ((rmail-mark-message # (1) 5)) (rmail-mail-return #)) compose-mail(nil "[nicolas@graner.name: testing]" ((In-Reply-To) ("cc")) nil nil (rmail-yank-current-message #) ((rmail-mark-message # (1) 5)) (rmail-mail-return #)) rmail-start-mail(nil nil "[nicolas@graner.name: testing]" nil nil # ((rmail-mark-message # (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)))) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 05 08:02:48 2022 Received: (at 59007-done) by debbugs.gnu.org; 5 Nov 2022 12:02:48 +0000 Received: from localhost ([127.0.0.1]:55798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orHsu-0004dc-0B for submit@debbugs.gnu.org; Sat, 05 Nov 2022 08:02:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orHso-0004dM-Jt for 59007-done@debbugs.gnu.org; Sat, 05 Nov 2022 08:02:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orHsi-0000N2-AJ; Sat, 05 Nov 2022 08:02:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=emUM8dUntj+JsT1I9RgYw0qhnoi0Rd0QkKH/3ar3eJ0=; b=iFLoCUSUvoyF 4x8wDH59H9fXtXp/nEr5Ja32Mrg1osmQiVDV/aGV/KGrX1bsi5GY5MWBzqvqdGGXdjRFMSkXHkZrI 546e8RokG5gNkNOWhiE59MlSgWQ1URGS6tMe29VE1DT+CZYsAaHFze1kZQ0KvzFDl38u6eCfEvM0a Wj3Q+7FbrAZ6DARiWP7JFf8boTv6BPyUwy4owyqXEh0hhd22L0zET9vZa0eX4yGesLw+hG20I4tdS 7/UFRs6S/FGLKEdwhq3P4MFAkvdNko04dkS+jbSAGkXCfG0NXMgprUOUNvqce3aN8D/AqL2cSPLRu QYlVho0WMoUEj5a1KP2CSA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orHsh-0001l8-NA; Sat, 05 Nov 2022 08:02:36 -0400 Date: Sat, 05 Nov 2022 14:02:32 +0200 Message-Id: <8335ax4njb.fsf@gnu.org> From: Eli Zaretskii To: Nicolas Graner In-Reply-To: <87v8nv4sjs.fsf@universite-paris-saclay.fr> (message from Nicolas Graner on Thu, 03 Nov 2022 22:49:43 +0100) Subject: Re: bug#59007: rmail-forward generates wrong-type-argument error References: <87v8nv4sjs.fsf@universite-paris-saclay.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59007-done Cc: 59007-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Nicolas Graner > 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 #) ((rmail-mark-message # (1) 5)) (rmail-mail-return #)) > compose-mail(nil "[nicolas@graner.name: testing]" ((In-Reply-To) ("cc")) nil nil (rmail-yank-current-message #) ((rmail-mark-message # (1) 5)) (rmail-mail-return #)) > rmail-start-mail(nil nil "[nicolas@graner.name: testing]" nil nil # ((rmail-mark-message # (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. From unknown Sat Aug 16 21:15:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 03 Dec 2022 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator