When I run list-packages
on Emacs 24, I get a screen that looks like the following:
The problem is that many packages' names are longer than the package column. How do I make this column wider so that I can see the full package names?
Maybe there is a more elegant solution but I came up with this. You can define the width of the column using following code and changing the variable package-menu-column-width
to your needs. Then, you need to include it to your init file (after (require 'package)
). It is from the package.el
file which defines the format of the table. See the first comment inside the code where you need to modify the width of the column. You can proceed in a similar way for the other columns.
;; <<<< here you have to adapt the number to your needs >>>>
(defcustom package-menu-column-width 18
"Width of the package column."
:type 'number
:group 'package)
(define-derived-mode package-menu-mode tabulated-list-mode "Package Menu"
"Major mode for browsing a list of packages.
Letters do not insert themselves; instead, they are commands.
\\<package-menu-mode-map>
\\{package-menu-mode-map}"
(setq tabulated-list-format
`[("Package" ,package-menu-column-width package-menu--name-predicate)
("Version" 12 nil)
("Status" 10 package-menu--status-predicate)
,@(if (cdr package-archives)
'(("Archive" 10 package-menu--archive-predicate)))
("Description" 0 nil)])
(setq tabulated-list-padding 2)
(setq tabulated-list-sort-key (cons "Status" nil))
(add-hook 'tabulated-list-revert-hook 'package-menu--refresh nil t)
(tabulated-list-init-header))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With