GNU bug report logs - #62524
[PATCH] Support displaying all package maintainers

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Wed, 29 Mar 2023 15:33:01 UTC

Severity: normal

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jonas Bernoulli <jonas <at> bernoul.li>
To: bug-gnu-emacs <at> gnu.org
Cc: philipk <at> posteo.net, monnier <at> iro.umontreal.ca
Subject: [PATCH] Support displaying all package maintainers
Date: Wed, 29 Mar 2023 17:32:14 +0200
If the package's new `:maintainers' extra property is non-nil, then
display all of the specified maintainers, if any, like we already
do for `:authors'.  If the value is nil, then fall back to the old
`:maintainer' property.

We cannot just allow the existing `:maintainer' property to be a
list of maintainers, because that would break older versions of this
function.  We also cannot just ignore `:maintainer', because all ELPAs
still have to be updated to include `:maintainers' in archive-contents.

Even once all ELPAs have been updated to include `:maintainers', they
have to continue to also include `:maintainer', for the benefit of
older versions of this function / package.el / Emacs.  To avoid this
duplication, `package' would have to be distributed on GNU ELPA as a
"core" package.

* lisp/emacs-lisp/package.el (describe-package-1): Use new
:maintainers package extra property from "archive-contents,
if non-nil.
---
 lisp/emacs-lisp/package.el | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index f92afe56b76..487dfac252f 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2696,7 +2696,8 @@ describe-package-1
          (status (if desc (package-desc-status desc) "orphan"))
          (incompatible-reason (package--incompatible-p desc))
          (signed (if desc (package-desc-signed desc)))
-         (maintainer (cdr (assoc :maintainer extras)))
+         (maintainers (or (cdr (assoc :maintainers extras))
+                          (cdr (assoc :maintainer extras))))
          (authors (cdr (assoc :authors extras)))
          (news (and-let* (pkg-dir
                           ((not built-in))
@@ -2831,19 +2832,21 @@ describe-package-1
          'action 'package-keyword-button-action)
         (insert " "))
       (insert "\n"))
-    (when maintainer
-      (package--print-help-section "Maintainer")
-      (package--print-email-button maintainer))
-    (when authors
+    (when maintainers
+      (unless (car-safe (car maintainers))
+        (setq maintainers (list maintainers)))
       (package--print-help-section
-          (if (= (length authors) 1)
-              "Author"
-            "Authors"))
-      (package--print-email-button (pop authors))
-      ;; If there's more than one author, indent the rest correctly.
-      (dolist (name authors)
-        (insert (make-string 13 ?\s))
-        (package--print-email-button name)))
+          (if (cdr maintainers) "Maintainers" "Maintainer"))
+      (dolist (maintainer maintainers)
+        (when (bolp)
+          (insert (make-string 13 ?\s)))
+        (package--print-email-button maintainer)))
+    (when authors
+      (package--print-help-section (if (cdr authors) "Authors" "Author"))
+      (dolist (author authors)
+        (when (bolp)
+          (insert (make-string 13 ?\s)))
+        (package--print-email-button author)))
     (let* ((all-pkgs (append (cdr (assq name package-alist))
                              (cdr (assq name package-archive-contents))
                              (let ((bi (assq name package--builtins)))
-- 
2.39.2





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

Previous Next


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