* bug#69712: Package author/maintainer printing fix
@ 2024-03-10 17:03 Juri Linkov
2024-03-12 4:55 ` J.P.
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Juri Linkov @ 2024-03-10 17:03 UTC (permalink / raw)
To: 69712
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: package--print-email-button.patch --]
[-- Type: text/x-diff, Size: 1469 bytes --]
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")))
\f
;;;; Package menu mode.
^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-10 17:03 bug#69712: Package author/maintainer printing fix Juri Linkov
@ 2024-03-12 4:55 ` J.P.
2024-03-22 8:47 ` Philip Kaludercic
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: J.P. @ 2024-03-12 4:55 UTC (permalink / raw)
To: Juri Linkov; +Cc: 69712
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-10 17:03 bug#69712: Package author/maintainer printing fix Juri Linkov
2024-03-12 4:55 ` J.P.
@ 2024-03-22 8:47 ` Philip Kaludercic
2024-03-22 11:38 ` Eli Zaretskii
2024-03-22 16:07 ` Juri Linkov
2024-03-22 12:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-22 19:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
3 siblings, 2 replies; 11+ messages in thread
From: Philip Kaludercic @ 2024-03-22 8:47 UTC (permalink / raw)
To: Juri Linkov; +Cc: 69712
Juri Linkov <juri@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")))
>
> \f
> ;;;; Package menu mode.
>
--
Philip Kaludercic on peregrine
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-22 8:47 ` Philip Kaludercic
@ 2024-03-22 11:38 ` Eli Zaretskii
2024-03-22 16:07 ` Juri Linkov
1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2024-03-22 11:38 UTC (permalink / raw)
To: Philip Kaludercic, Stefan Monnier; +Cc: 69712, juri
> Cc: 69712@debbugs.gnu.org
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Fri, 22 Mar 2024 08:47:38 +0000
>
> Juri Linkov <juri@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")))
> >
> > \f
> > ;;;; Package menu mode.
> >
>
> --
> Philip Kaludercic on peregrine
>
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-10 17:03 bug#69712: Package author/maintainer printing fix Juri Linkov
2024-03-12 4:55 ` J.P.
2024-03-22 8:47 ` Philip Kaludercic
@ 2024-03-22 12:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-22 16:08 ` Juri Linkov
2024-03-22 19:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
3 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-03-22 12:10 UTC (permalink / raw)
To: Juri Linkov; +Cc: 69712
> There are many packages with non-dot author/maintainer format that fail with
Could you give some examples?
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-22 8:47 ` Philip Kaludercic
2024-03-22 11:38 ` Eli Zaretskii
@ 2024-03-22 16:07 ` Juri Linkov
1 sibling, 0 replies; 11+ messages in thread
From: Juri Linkov @ 2024-03-22 16:07 UTC (permalink / raw)
To: Philip Kaludercic; +Cc: 69712
>> 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?
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-22 12:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-03-22 16:08 ` Juri Linkov
0 siblings, 0 replies; 11+ messages in thread
From: Juri Linkov @ 2024-03-22 16:08 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 69712
>> 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-10 17:03 bug#69712: Package author/maintainer printing fix Juri Linkov
` (2 preceding siblings ...)
2024-03-22 12:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-03-22 19:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-23 18:24 ` Juri Linkov
3 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-03-22 19:02 UTC (permalink / raw)
To: Juri Linkov; +Cc: 69712
> 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"))
^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-22 19:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-03-23 18:24 ` Juri Linkov
2024-03-23 20:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <86le4cgaad.fsf@mail.linkov.net>
0 siblings, 2 replies; 11+ messages in thread
From: Juri Linkov @ 2024-03-23 18:24 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 69712
> 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
2024-03-23 18:24 ` Juri Linkov
@ 2024-03-23 20:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <86le4cgaad.fsf@mail.linkov.net>
1 sibling, 0 replies; 11+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-03-23 20:12 UTC (permalink / raw)
To: Juri Linkov; +Cc: 69712-done
>> 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#69712: Package author/maintainer printing fix
[not found] ` <86le4cgaad.fsf@mail.linkov.net>
@ 2024-05-16 15:05 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-16 15:05 UTC (permalink / raw)
To: Juri Linkov; +Cc: 69712
> (: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
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-05-16 15:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-10 17:03 bug#69712: Package author/maintainer printing fix Juri Linkov
2024-03-12 4:55 ` J.P.
2024-03-22 8:47 ` Philip Kaludercic
2024-03-22 11:38 ` Eli Zaretskii
2024-03-22 16:07 ` Juri Linkov
2024-03-22 12:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-22 16:08 ` Juri Linkov
2024-03-22 19:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-23 18:24 ` Juri Linkov
2024-03-23 20:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <86le4cgaad.fsf@mail.linkov.net>
2024-05-16 15:05 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).