GNU bug report logs - #69712
Package author/maintainer printing fix

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 10 Mar 2024 17:36:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#69712: closed (Package author/maintainer printing fix)
Date: Sat, 23 Mar 2024 20:13:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 23 Mar 2024 16:12:01 -0400
with message-id <jwvh6gw7lof.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#69712: Package author/maintainer printing fix
has caused the debbugs.gnu.org bug report #69712,
regarding Package author/maintainer printing fix
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
69712: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69712
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Package author/maintainer printing fix
Date: Sun, 10 Mar 2024 19:03:16 +0200
[Message part 3 (text/plain, inline)]
There are many packages with non-dot author/maintainer format that fail with

Debugger entered--Lisp error: (wrong-type-argument listp "XXIV")
  car("XXIV")
  package--print-email-button("XXIV")
  describe-package-1(#s(package-desc :name chaos-mode ((:authors ("XXIV")) (:maintainers ("XXIV")) (:maintainer "XXIV"))))
  describe-package(#s(package-desc :name chaos-mode ((:authors ("XXIV")) (:maintainers ("XXIV")) (:maintainer "XXIV"))))
  package-menu-describe-package(#<marker (moves after insertion) at 67389 in *Packages*>)
  button-activate(#<marker (moves after insertion) at 67389 in *Packages*> nil)
  push-button(67389)
  funcall-interactively(push-button 67389)
  command-execute(push-button)

Here is the fix:

[package--print-email-button.patch (text/x-diff, inline)]
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index fe7b10f569a..790860df2a7 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -3082,19 +3082,21 @@ package--print-email-button
   "Insert a button whose action will send an email to RECIPIENT.
 NAME should have the form (FULLNAME . EMAIL) where FULLNAME is
 either a full name or nil, and EMAIL is a valid email address."
-  (when (car recipient)
-    (insert (car recipient)))
-  (when (and (car recipient) (cdr recipient))
-    (insert " "))
-  (when (cdr recipient)
-    (insert "<")
-    (insert-text-button (cdr recipient)
-                        'follow-link t
-                        'action (lambda (_)
-                                  (compose-mail
-                                   (format "%s <%s>" (car recipient) (cdr recipient)))))
-    (insert ">"))
-  (insert "\n"))
+  (if (stringp recipient)
+      (insert recipient "\n")
+    (when (car recipient)
+      (insert (car recipient)))
+    (when (and (car recipient) (cdr recipient))
+      (insert " "))
+    (when (cdr recipient)
+      (insert "<")
+      (insert-text-button (cdr recipient)
+                          'follow-link t
+                          'action (lambda (_)
+                                    (compose-mail
+                                     (format "%s <%s>" (car recipient) (cdr recipient)))))
+      (insert ">"))
+    (insert "\n")))
 
 
 ;;;; Package menu mode.
[Message part 5 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> linkov.net>
Cc: 69712-done <at> debbugs.gnu.org
Subject: Re: bug#69712: Package author/maintainer printing fix
Date: Sat, 23 Mar 2024 16:12:01 -0400
>> I suggest the following fix instead.
>> Can you confirm that it fixes the problem for you as well?
>>
>> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
>> @@ -2941,7 +2941,7 @@ describe-package-1
>>          (insert " "))
>>        (insert "\n"))
>>      (when maintainers
>> -      (unless (proper-list-p maintainers)
>> +      (when (stringp (car maintainers))
>>          (setq maintainers (list maintainers)))
>
> I confirm this completely fixes the problem.

Thanks, pushed to `master`.


        Stefan



This bug report was last modified 1 year and 55 days ago.

Previous Next


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