Search code examples
emacsemacs23

increase 'buffer' column width in buffer list view


I am working with rather longish file names and when viewing the buffer list, the width of the Buffer column is too short for my purposes.

How can I increase that width (at the expense of, say, the width of the Mode or the File columns).

Width I am trying to increase marked with yellow in the screenshot below: enter image description here


Solution

  • In Emacs 24.3 and later, this is controlled by the variable Buffer-menu-name-width, which defaults to 19 on my system. Something like

    (setq Buffer-menu-name-width 40)
    

    should help. Alternatively, you can use something like M-x customize-variable to change it.

    In older Emacs versions, Buffer-menu-buffer+size-width should be modified instead. Thanks to the OP for his edit pointing this out.

    It looks like the File column fills up whatever space is left over, so this change should take space away from it. If you prefer to take space from the Mode column, you could also modify the Buffer-menu-mode-width variable to something smaller.