From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el) Date: Tue, 5 May 2020 03:39:09 +0200 Message-ID: References: <87imhbo1ku.fsf@stefankangas.se> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000076563d05a4dcb7b1" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="112093"; mail-complaints-to="usenet@ciao.gmane.io" To: 41086@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 05 03:40:17 2020 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 1jVmZE-000T2q-Rg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 May 2020 03:40:16 +0200 Original-Received: from localhost ([::1]:53824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVmZD-000104-R7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 May 2020 21:40:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVmZ1-0000yv-4r for bug-gnu-emacs@gnu.org; Mon, 04 May 2020 21:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVmZ0-0006jx-RO for bug-gnu-emacs@gnu.org; Mon, 04 May 2020 21:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVmZ0-0001q2-O2 for bug-gnu-emacs@gnu.org; Mon, 04 May 2020 21:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 May 2020 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41086-submit@debbugs.gnu.org id=B41086.15886427696976 (code B ref 41086); Tue, 05 May 2020 01:40:02 +0000 Original-Received: (at 41086) by debbugs.gnu.org; 5 May 2020 01:39:29 +0000 Original-Received: from localhost ([127.0.0.1]:34350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVmYS-0001oS-Sg for submit@debbugs.gnu.org; Mon, 04 May 2020 21:39:29 -0400 Original-Received: from mail-yb1-f196.google.com ([209.85.219.196]:33492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVmYR-0001oE-Ca for 41086@debbugs.gnu.org; Mon, 04 May 2020 21:39:28 -0400 Original-Received: by mail-yb1-f196.google.com with SMTP id b8so469099ybn.0 for <41086@debbugs.gnu.org>; Mon, 04 May 2020 18:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=auvyZhE8Tc1hE28n5Y1WjwuIwSIn0BTHDASl5XA3RFI=; b=GE6ruooI/bg+wlp8qkiqY2D83tnLzHch/4/Gi8SDKaPp/grB/80jU6sdIWfTWQQPmz FwEKXueJAW9EakVkJ104dBwMcmfP5gVcpG95Our7yIcEJq6SbD89prdkJo5sg/vvzsQf d5geXhngEqu+Pv9M99Kxx1GDMZ26HmECeWdNKMfIGeigbHLat2XGsPhO2lMDzFWyUIc6 4LQHsR0v4cD1LwWelnD7I4O13iLt3WowjqO8I1f0vsNIIiA/uxE8SMyB+Af34fBkrQ+J /ZCGBZHNxo6JV3lTeMsQJPinbXrDgDyyFEFGFqhh+1wz+pE38Ddv6LssCtt5u0LXvT+H a1sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=auvyZhE8Tc1hE28n5Y1WjwuIwSIn0BTHDASl5XA3RFI=; b=h1pryX8gW+NxpSX3QSo60N33nqPUlyD4E6Z0MxwxgmnmC9si7FfXjM1Ua4wdMp3tEV TXypI/x22/RPNMjcJpIbjEd3G9Bx3JseNqZhn8HeTSU/EXTdiPPBs08kzTB0IshFDse7 JyK+b50gTWHKTCq5/6j+bu6Pt9XKCWcWrBSBUuFUYsKcukpQmteA0B15cmjI7MbuREmA rE3lVU39E0UrRJ8noSv4fZbNT28ImUGsq5t2IP0xjeqkgV/gm5xS2Tv8MHsOzoHxMLco /uogV9jS3KAJZraljljgwqLcZtyt1BKksuxbh8xEvvJ+YZOG+Xk/Pgc6pI85UqIm5q33 lwrA== X-Gm-Message-State: AGi0PuZMqrpQ4wFW2h1u/X6Ki1UqD9cf3d8FyeralZ8DAodAS7Uo73cn bd21Q/57fi1Oz9F62022ksKjQAb2krhhlFyLrdVCfw== X-Google-Smtp-Source: APiQypKFTOugfXpwCtTfKCcmO2pWkiPV2PAMMDL/DhbD5PzEcuT3YVMmNs6aDS8Jwce03CBVOR1y4O5PmkEDmQyCHA0= X-Received: by 2002:a25:fc08:: with SMTP id v8mr1109664ybd.389.1588642761257; Mon, 04 May 2020 18:39:21 -0700 (PDT) In-Reply-To: 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" Xref: news.gmane.io gmane.emacs.bugs:179707 Archived-At: --00000000000076563d05a4dcb7b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ---------- Forwarded message --------- Fr=C3=A5n: Chris McMahan Date: m=C3=A5n 4 maj 2020 kl 23:53 Subject: Re: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el) To: Stefan Kangas Hell Stefan, Yes, this is my first patch. I've been implementing this fix in my emacs configs for at least 5 years, just assuming someone else would see it. Thank you very much for you comments. They were most helpful. I have no problem signing the copyright. I just need some guidance on the process. The revised patch is attached, made with the command git format-patch -1 against savannah.org repository. The changelog entry follows: * package.el (package-menu-mode): User can now adjust the column widths of the package menu by setting the values of the following defcustoms. (package-name-column-width) New defcustom (package-version-column-width) New defcustom (package-status-column-width) New defcustom Hopefully, that covered all of the changes. Thanks again for your help! - Chris McMahan On Mon, May 4, 2020 at 5:03 PM Stefan Kangas wrote= : > > Chris McMahan writes: > > > When executing the function `package-list-packages', the column widths = are > > too narrow, cutting off a significant > > portion of the package names. > > > > This minor patch adds four variables that can be set by the user to adj= ust > > the width of each column within the package list. > > Thanks for the patch, this makes sense. I have some comments below. > > Is this your first patch to Emacs? I can't find your name in the git > log, but maybe I missed it. Since your patch is over 15 lines, we > would need a copyright assignment from you to be able to apply it. > Would you be willing to sign such papers? > > Please see here for more: https://www.gnu.org/licenses/why-assign.html > > --- > > Now, here are my technical comments. > > Could you send your patch as formatted by 'git format-patch -1' > instead? It will make it easier for us to apply it. > > > Changelog entry > > -------------------------------- > > 2020-05-04 Chris McMahan > > > > * package.el ((define-derived-mode package-menu-mode tabulated-list-mod= e > > "Package Menu"): > > User can now adjust column widths of the package list by setting the va= lues > > of the following: > > This is better formatted like: > > * package.el (package-menu-mode): User can now adjust column widths of > the package list by setting the values of the below defcustoms. > > > package-name-column-width (defaults to 30 columns) > > package-version-column-width (14 column) > > package-status-column-width (12 columns) > > package-archive-column-width (14 columns) > > This should be formatted like so: > > (package-archive-column-width): New defcustom. > > > +(defcustom package-name-column-width 30 > > + "Column width of the 'Package' name within the package list > > +invoked through `package-list-packages'." > > + :type 'number > > + :version "27.1") > > Should be :version "28.1", since this will most likely not go to the > emacs-27 branch this close to the release. > > Also the first line should be a complete sentence in this defcustom > and the others. Please see M-x customize-group RET package RET if you > want to see why. > > We prefer "package menu" to "package list". I'm not sure why, but I > think it has historical reasons. Ideal or not, I think we should try > to stay consistent. > > Possibly the docstrings could look something much like: > > "Column width for the Package name in the package menu." > > Refer to Info node `(elisp) Documentation Tips' for more. > > > -Letters do not insert themselves; instead, they are commands. > > -\\ > > -\\{package-menu-mode-map}" > > + Letters do not insert themselves; instead, they are commands. > > + \\ > > + \\{package-menu-mode-map}" > > Why this reformatting? This will make the docstring look unusual in > C-h f, I think. > > Thanks again for your patch. > > Best regards, > Stefan Kangas --=20 Chris McMahan --00000000000076563d05a4dcb7b1 Content-Type: application/x-patch; name="0001-Allow-user-to-adjust-column-widths-in-the-package-me.patch" Content-Disposition: attachment; filename="0001-Allow-user-to-adjust-column-widths-in-the-package-me.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k9t0qryu0 RnJvbSBkZGVkNjIzMTE5Nzk4OTRhMTJiMjAzZjBkNTc5ZTJmNGFjOGZkZTlmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBDaHJpcyBNY01haGFuIDxjbWNtYWhhbkBnbWFpbC5jb20+CkRh dGU6IE1vbiwgNCBNYXkgMjAyMCAxNzoyNTozMyAtMDQwMApTdWJqZWN0OiBbUEFUQ0hdIEFsbG93 IHVzZXIgdG8gYWRqdXN0IGNvbHVtbiB3aWR0aHMgaW4gdGhlIHBhY2thZ2UgbWVudQoKLS0tCiBs aXNwL2VtYWNzLWxpc3AvcGFja2FnZS5l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giRGVzY3JpcHRpb24iIDAgcGFja2FnZS1tZW51LS1kZXNjcmlwdGlvbi1w cmVkaWNhdGUpXSkKLS0gCjIuMjAuMQoK --00000000000076563d05a4dcb7b1--