[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to pac
From: |
Eli Zaretskii |
Subject: |
bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el) |
Date: |
Tue, 05 May 2020 17:14:50 +0300 |
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Tue, 5 May 2020 03:39:09 +0200
>
> 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
Our style is slightly different, see CONTRIBUTE. (Emacs actually has
commands that will help you format these log entries.) It should look
like this in this case:
Let user adjust the column widths of the package menu.
* lisp/emacs-lisp/package.el (package-name-column-width)
(package-version-column-width, package-status-column-width): New
defcustoms.
(package-menu-mode): Use the values of defcustoms instead of
hardcoded values. (Bug#41086)
> +(defcustom package-name-column-width 30
> + "Column width for the Package name in the package menu."
> + :type 'number
> + :version "28.1")
> +
> +(defcustom package-version-column-width 14
> + "Column width for the Package version in the package menu."
> + :type 'number
> + :version "28.1")
> +
> +(defcustom package-status-column-width 12
> + "Column width for the Package status in the package menu."
> + :type 'number
> + :version "28.1")
These change the default values from the current hard-coded ones. Any
reasons for that change?
> (setq tabulated-list-format
> - `[("Package" 18 package-menu--name-predicate)
> - ("Version" 13 package-menu--version-predicate)
> - ("Status" 10 package-menu--status-predicate)
> + `[("Package" ,package-name-column-width package-menu--name-predicate)
> + ("Version" ,package-version-column-width
> package-menu--version-predicate)
> + ("Status" ,package-status-column-width
> package-menu--status-predicate)
> ,@(if (cdr package-archives)
> '(("Archive" 10 package-menu--archive-predicate)))
Why do we leave the "Archive" column width hard-coded?
Also, I see 13 in at least 2 more places in the code, are they
related? If so, they should be changed to use the defcustom as well.
Finally, I think this warrants a NEWS entry.
Thanks.
- bug#41086: [PATCH] Add user-defined column widths to package-list (package.el), Chris McMahan, 2020/05/04
- bug#41086: Corrcted patch for bug #41086, Chris McMahan, 2020/05/04
- bug#41086: [PATCH] Add user-defined column widths to package-list (package.el), Stefan Kangas, 2020/05/04
- Message not available
- bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el), Stefan Kangas, 2020/05/04
- bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el),
Eli Zaretskii <=
- Message not available
- bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el), Eli Zaretskii, 2020/05/05
- bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el), Chris McMahan, 2020/05/05
- bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el), Noam Postavsky, 2020/05/05
- bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el), Chris McMahan, 2020/05/05
- Message not available
- Message not available
- bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el), Eli Zaretskii, 2020/05/23
Message not available
Message not available