Search code examples
emacselisp

Resizing root window of a frame to 80 characters


I am trying to find a command that would resize the current frame "only one window is open" to be 80 characters wide.

I am not trying to enlarge or minimize a buffer but instead just readjust the current buffer open to fit 80 character lines.


Solution

  • The following link to the Emacs documentation relating to frames contains explanations of functions dealing with sizing frames:

    https://www.gnu.org/software/emacs/manual/html_node/elisp/Size-and-Position.html

    Height and width can be set in one fell swoop using set-frame-size, which can even be set pixelwise using the additional argument. Or, the height and width can be set separately with functions such as set-frame-height and set-frame-width.