GNU bug report logs -
#69712
Package author/maintainer printing fix
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69712 in the body.
You can then email your comments to 69712 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Sun, 10 Mar 2024 17:36:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> linkov.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 10 Mar 2024 17:36:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Tue, 12 Mar 2024 04:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 69712 <at> debbugs.gnu.org (full text, mbox):
Hi Juri,
Don't mind me. Just wanted to note a somewhat related bug:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68660
Thanks,
J.P.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Fri, 22 Mar 2024 08:56:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 69712 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
> 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:
Is there any reason not to apply this? It makes sense to me.
> 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.
>
--
Philip Kaludercic on peregrine
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Fri, 22 Mar 2024 11:41:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 69712 <at> debbugs.gnu.org (full text, mbox):
> Cc: 69712 <at> debbugs.gnu.org
> From: Philip Kaludercic <philipk <at> posteo.net>
> Date: Fri, 22 Mar 2024 08:47:38 +0000
>
> Juri Linkov <juri <at> linkov.net> writes:
>
> > 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:
>
> Is there any reason not to apply this? It makes sense to me.
Stefan, any comments on the proposal below?
> > 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.
> >
>
> --
> Philip Kaludercic on peregrine
>
>
>
>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Fri, 22 Mar 2024 12:12:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 69712 <at> debbugs.gnu.org (full text, mbox):
> There are many packages with non-dot author/maintainer format that fail with
Could you give some examples?
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Fri, 22 Mar 2024 16:19:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 69712 <at> debbugs.gnu.org (full text, mbox):
>> Here is the fix:
>
> Is there any reason not to apply this? It makes sense to me.
I waited until the related bug#68660 will be fixed, as J.P. noted.
But maybe fixing doesn't depend on bug#68660?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Fri, 22 Mar 2024 16:19:03 GMT)
Full text and
rfc822 format available.
Message #23 received at 69712 <at> debbugs.gnu.org (full text, mbox):
>> There are many packages with non-dot author/maintainer format that fail with
>
> Could you give some examples?
An example is chaos-mode on MELPA. There are many more.
For example, few of them near chaos-mode:
challenger-deep-theme, chatgpt-shell, etc.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Fri, 22 Mar 2024 19:11:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 69712 <at> debbugs.gnu.org (full text, mbox):
> Here is the fix:
I suggest the following fix instead.
Can you confirm that it fixes the problem for you as well?
Stefan
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index fe7b10f569a..ab1731aeb54 100644
--- 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)))
(package--print-help-section
(if (cdr maintainers) "Maintainers" "Maintainer"))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Sat, 23 Mar 2024 18:36:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 69712 <at> debbugs.gnu.org (full text, mbox):
> 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.
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Sat, 23 Mar 2024 20:13:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Juri Linkov <juri <at> linkov.net>
:
bug acknowledged by developer.
(Sat, 23 Mar 2024 20:13:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 69712-done <at> debbugs.gnu.org (full text, mbox):
>> 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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 21 Apr 2024 11:24:11 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Tue, 14 May 2024 06:50:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69712
; Package
emacs
.
(Thu, 16 May 2024 15:06:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 69712 <at> debbugs.gnu.org (full text, mbox):
> (:maintainers (nil . "Drew Adams (concat \"drew.adams\" \"@\" \"oracle\" \".com\")"))
Hmm... I pushed a further fix which should hopefully fix this without
re-introducing another problem.
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 14 Jun 2024 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.