From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.bugs Subject: bug#62524: [PATCH] Support displaying all package maintainers Date: Wed, 29 Mar 2023 17:32:14 +0200 Message-ID: <20230329153214.752-1-jonas@bernoul.li> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20510"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, monnier@iro.umontreal.ca To: 62524@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 29 17:33:22 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phXne-00057o-Jv for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Mar 2023 17:33:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phXnO-00037U-6l; Wed, 29 Mar 2023 11:33:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phXnK-00037I-EI for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2023 11:33:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phXnK-0000Rr-3v for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2023 11:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phXnJ-0003o7-UP for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2023 11:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Mar 2023 15:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168010396914614 (code B ref -1); Wed, 29 Mar 2023 15:33:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Mar 2023 15:32:49 +0000 Original-Received: from localhost ([127.0.0.1]:54754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phXn7-0003ne-EZ for submit@debbugs.gnu.org; Wed, 29 Mar 2023 11:32:49 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phXn5-0003nV-IH for submit@debbugs.gnu.org; Wed, 29 Mar 2023 11:32:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phXmz-00036H-Rq for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2023 11:32:43 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phXmx-0000Ji-N7 for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2023 11:32:41 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 23893164B4; Wed, 29 Mar 2023 17:32:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-transfer-encoding:mime-version:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=sel2011a; t=1680103937; bh=n4PrNlVEqiW6moyq76XWZc7dFZZJWKOjKzLYgLnw1Lw=; b= yX9hmSJfoXTcaArF+0T7VDgMT6GLiE17cQSGI3sTXejoFMOTCuevNfe3MXgz8SrK h/e7xYr+OVbNVE3muUArqQbYKtW3Yo0xcMKPKl5aHKsBqlR3cCfKhtM65Jg6UwDX 4fJKSooMzdk+6CsLvdl+v5BgAtBoo8DoDBK4mDhWyD8= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id tw6DMU5TSqaP; Wed, 29 Mar 2023 17:32:17 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id BB6D5164DF; Wed, 29 Mar 2023 17:32:17 +0200 (CEST) X-Mailer: git-send-email 2.39.2 Received-SPF: none client-ip=212.243.197.30; envelope-from=jonas@bernoul.li; helo=mail.hostpark.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258855 Archived-At: 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