[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69712: Package author/maintainer printing fix
From: |
Eli Zaretskii |
Subject: |
bug#69712: Package author/maintainer printing fix |
Date: |
Fri, 22 Mar 2024 13:38:38 +0200 |
> 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")))
> >
> >
> > ;;;; Package menu mode.
> >
>
> --
> Philip Kaludercic on peregrine
>
>
>
>