unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62524: [PATCH] Support displaying all package maintainers
@ 2023-03-29 15:32 Jonas Bernoulli
  2023-03-29 16:39 ` Jonas Bernoulli
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jonas Bernoulli @ 2023-03-29 15:32 UTC (permalink / raw)
  To: 62524; +Cc: philipk, monnier

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






^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-01 19:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-29 15:32 bug#62524: [PATCH] Support displaying all package maintainers Jonas Bernoulli
2023-03-29 16:39 ` Jonas Bernoulli
2023-04-05 14:50 ` bug#62524: " Jonas Bernoulli
     [not found] ` <jwvpm8rv0fv.fsf-monnier+emacs@gnu.org>
     [not found]   ` <87o7o2jz5j.fsf@bernoul.li>
     [not found]     ` <jwv8reypdd2.fsf-monnier+emacs@gnu.org>
2023-04-27 21:23       ` bug#62524: [PATCH] " Jonas Bernoulli
2023-05-01  2:11         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-01 19:36           ` Stefan Kangas

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).