From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam =?UTF-8?Q?Sj=C3=B8gren?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#54015: 29.0.50; Cancel error when article has no email in From Date: Tue, 15 Feb 2022 21:09:51 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87bkz7optb.fsf@tullinup.koldfront.dk> Reply-To: Adam =?UTF-8?Q?Sj=C3=B8gren?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8026"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: 54015@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 15 21:11:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nK4AL-0001te-F4 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Feb 2022 21:11:13 +0100 Original-Received: from localhost ([::1]:53376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK4AJ-0006GR-UH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Feb 2022 15:11:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK4AA-0006Dz-Tg for bug-gnu-emacs@gnu.org; Tue, 15 Feb 2022 15:11:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52642) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nK4AA-0004xT-J1 for bug-gnu-emacs@gnu.org; Tue, 15 Feb 2022 15:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nK4AA-0005Zx-AG; Tue, 15 Feb 2022 15:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Adam =?UTF-8?Q?Sj=C3=B8gren?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Tue, 15 Feb 2022 20:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54015 X-GNU-PR-Package: emacs,gnus X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164495580821364 (code B ref -1); Tue, 15 Feb 2022 20:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Feb 2022 20:10:08 +0000 Original-Received: from localhost ([127.0.0.1]:46539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK49H-0005YW-Iv for submit@debbugs.gnu.org; Tue, 15 Feb 2022 15:10:08 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:59422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK49F-0005YM-SO for submit@debbugs.gnu.org; Tue, 15 Feb 2022 15:10:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK49C-0005Jw-JY for bug-gnu-emacs@gnu.org; Tue, 15 Feb 2022 15:10:05 -0500 Original-Received: from virgil.koldfront.dk ([212.237.178.116]:36082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK497-0004ax-6M for bug-gnu-emacs@gnu.org; Tue, 15 Feb 2022 15:10:01 -0500 Original-Received: from tullinup.koldfront.dk (tullinup.koldfront.dk [192.168.1.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by virgil.koldfront.dk (Postfix) with ESMTPS id EBD3F16BF2306 for ; Tue, 15 Feb 2022 21:09:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 virgil.koldfront.dk EBD3F16BF2306 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=koldfront.dk; s=mail; t=1644955791; bh=C0OY7XSQxGTqSylRod1i5kdnyz5OpXDwR+IivJV+nzU=; h=From:To:Subject:Date:From; b=K5dUKhTNuWy1ZjwJ6oCDQQk9MEyVfjHuU3NcTS7owtbU8c7BwHy/2/JNYnuUFyPLO ocojoIyT+onLepJ1NiS+tJKrWEee9Iwqy055k+wMr+kYg1V0BJg0nPbMVTRas3Pmvc swiRg0KCKcCbzbN9rC7ttjapEd89tdsN360Qgpi6iHyN7GEJt2efbqQ8vljCbb8KEi tYV3rRMRDAy7PUzJb9ClRJ4BwLcJmI5gmD/NsLPCsYL9LwLPF4p0jFHnG0kpi4p10G /Qj/JxAMukVOq1ZKifuomFytFyofMnAoWU0s4P4BsiQAss61sFS5Ytb0UqG4OkGdo1 C6ggOZdmRB/PA== Original-Received: by tullinup.koldfront.dk (Postfix, from userid 1000) id AC6C5201A5108; Tue, 15 Feb 2022 21:09:51 +0100 (CET) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227008 Archived-At: I pressed C in a summary buffer to cancel an article, and got this error: Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) message-is-yours-p() message-cancel-news() gnus-summary-cancel-article(nil nil) funcall-interactively(gnus-summary-cancel-article nil nil) command-execute(gnus-summary-cancel-article) The problem is that message-is-yours-p assumes that the From: line contains an email-address, but in this case it only has a name: ;; Email address in From field equals to our address (and (setq from (message-fetch-field "from")) (string-equal (downcase (car (mail-header-parse-address from))) (downcase (car (mail-header-parse-address (message-make-from)))))) The (mail-header-parse-address from) is nil when there is no email: (mail-header-parse-address "Andi Duferense") =E2=86=92 nil so the (downcase nil) fails with (wrong-type-argument char-or-string-p nil). This fixes the problem for me: diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 869ab3f82b..faf22ea85f 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -7485,7 +7485,7 @@ message-is-yours-p ;; Email address in From field equals to our address (and (setq from (message-fetch-field "from")) (string-equal - (downcase (car (mail-header-parse-address from))) + (downcase (or (car (mail-header-parse-address from)) "")) (downcase (car (mail-header-parse-address (message-make-from)))))) ;; Email address in From field matches There is probably a better way to fix it. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, c= airo version 1.16.0) of 2022-02-14 built on tullinup Repository revision: 0c53f0db3b7d1a01076cd51dbccd41ec547716d8 Repository branch: master System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --with-pgtk --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Group Minor modes in effect: gnus-topic-mode: t gnus-undo-mode: t global-magit-file-mode: t magit-auto-revert-mode: t global-git-commit-mode: t dumb-jump-mode: t shell-dirtrack-mode: t which-function-mode: t global-auto-complete-mode: t save-place-mode: t jabber-activity-mode: t winner-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t Load-path shadows: ~/elisp/let-alist/let-alist hides ~/elisp/extra/let-alist /usr/share/emacs/site-lisp/elpa-src/boxquote-2.2/boxquote hides ~/elisp/ext= ra/boxquote ~/elisp/transient/transient hides /usr/src/emacs/lisp/transient ~/elisp/let-alist/let-alist hides /usr/src/emacs/lisp/emacs-lisp/let-alist Features: (shadow emacsbug cl-print debug backtrace find-func bbdb-message sendmail url-http url-gw url-auth gnus-gravatar gravatar sort smiley gnus-cite gnus-async gnus-bcklg gnus-dup gnus-ml disp-table cus-start gnus-topic utf-7 imap rfc2104 epa-file network-stream nsm nnml bbdb-gnus bbdb-mua nnnil gnus-demon gnus-twit gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache nndraft nnmh mail-extr spam spam-stat bbdb-com gnus-uu yenc gnus-msg gnus-html url-queue help-fns radix-tree url-cache mm-url bbdb-picture gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-fun hashcash gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader range face-remap time gopher shr pixel-fill kinsoku svg litable magithub magithub-ci magithub-issue magithub-cache magithub-core magit-submodule magit-obsolete magit-popup magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode diff magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit recentf tree-widget magit-git magit-section benchmark magit-utils vc-git diff-mode ido crm log-edit message yank-media rmc rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util with-editor markdown-mode color noutline outline rg pcase rg-info-hack rg-menu transient rg-ibuffer ibuf-macs rg-result wgrep-rg rg-history rg-header ibuf-ext ibuffer ibuffer-loaddefs wgrep grep compile text-property-search dumb-jump f dash s etags fileloop generator xref project tramp tramp-loaddefs trampver tramp-integration cus-edit pp cus-load files-x tramp-compat shell pcomplete parse-time iso8601 ls-lisp auto-loads tex-site expand-region subword-mode-expansions cperl-mode-expansions text-mode-expansions html-mode-expansions er-basic-expansions thingatpt expand-region-core expand-region-custom which-func cperl-mode auto-complete-config auto-complete edmacro kmacro popup debian-changelog-mode imenu add-log dpkg-dev-el saveplace vc vc-dispatcher bbdb bbdb-site timezone bbdb-loaddefs boxquote rect jabber-last-message-correction jabber-http-file-upload jabber-print-html jabber-otr jabber jabber-notifications notifications jabber-libnotify dbus jabber-awesome jabber-osd jabber-wmii jabber-xmessage jabber-festival jabber-sawfish jabber-ratpoison jabber-tmux jabber-screen jabber-socks5 jabber-ft-server jabber-si-server jabber-ft-client jabber-ft-common jabber-si-client jabber-si-common jabber-feature-neg jabber-truncate jabber-time jabber-autoaway time-date jabber-vcard-avatars jabber-chatstates jabber-events jabber-vcard jabber-avatar jabber-activity jabber-watch jabber-modeline easy-mmode advice jabber-ahc-presence jabber-ahc jabber-version jabber-ourversion jabber-muc-nick-completion hippie-exp comint ansi-color jabber-browse jabber-search jabber-register jabber-roster format-spec jabber-presence jabber-muc jabber-bookmarks jabber-private jabber-muc-nick-coloring hexrgb jabber-widget jabber-disco wid-edit jabber-chat jabber-history jabber-chatbuffer jabber-alert jabber-iq jabber-core jabber-console derived sgml-mode facemenu dom ewoc jabber-keymap jabber-sasl sasl sasl-anonymous sasl-login sasl-plain fsm jabber-logon jabber-conn srv dns starttls tls jabber-xml xml jabber-menu jabber-util cl winner ring gnutls puny comp comp-cstr warnings rx cl-extra help-mode find-file-from-selection find-lisp dired dired-loaddefs cap-words superword subword server finder-inf package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 856378 61025) (symbols 48 38150 20) (strings 32 231006 15196) (string-bytes 1 9980301) (vectors 16 53919) (vector-slots 8 1672621 192833) (floats 8 522 138) (intervals 56 734 0) (buffers 992 27)) --=20 "Yes, this sled is truly a hazard to life and limb." Adam Sj=C3=B8gr= en "WHEEEE! OOMPH! EEEEEEE!" asjo@koldfront.dk