Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs mini-buffer command with parameter

Tags:

emacs

I'd like to use the command to resize split windows via the mini-buffer. In the GNU documentation I found the description (Resizing-Windows):

Example: enlarge-window-horizontally size &optional horizontal. 

If I type M-x enlarge-window-horizontally the window will get resized by one column. But it is not possible to add a number for the size in the mini-buffer, as on pressing spacebar emacs tries to complete the command.

Does someone know how to use the optional parameters in mini-buffer? Respectively how to resize a window by more than one column at once.

Thanks.

like image 936
Scott Bold Avatar asked Nov 19 '10 14:11

Scott Bold


People also ask

What is a minibuffer in Emacs?

The minibuffer is the facility used by Emacs commands to read arguments more complicated than a single number. Minibuffer arguments can be file names, buffer names, Lisp function names, Emacs command names, Lisp expressions, and many other things, depending on the command reading the argument.

What are command line arguments in GNU Emacs?

GNU Emacs supports command line arguments to request various actions when invoking Emacs. These are for compatibility with other editors and for sophisticated activities. We don't recommend using them for ordinary editing. Arguments starting with `-'are options. Other arguments specify files to visit.

What is a minibuffer in Linux?

The minibuffer is a special buffer for entering command s or input arguments to commands. It appears either in a separate, standalone frame or at the bottom of each frame. Sometimes, the area where you input commands is used to display informative messages without requesting input (i.e., not just a prompt).

How to start Emacs from terminal?

The normal actions of Emacs are to first load `site-start.el' if it exists, then your own init file `~/.emacs' if it exists, and finally `default.el' if it exists; certain options prevent loading of some of these files or substitute other files for them. Use device as the device for terminal input and output.


1 Answers

Passing parameters to interactive command like this uses the universal argument.

You can enlarge the window by 10 columns by typing C-u 10 M-x enlarge-window-horizontally. You can change 10 to any integer. By the way, typing C-u num to supply a numeric argument works with all interactive emacs commands that expect an argument.

Note there is also a keyboard short cut: C-u 10 C-x }. And to shrink the window: C-u 10 C-x {.

You can also specify numbers by typing holding down the meta key M-10 C-x {

like image 172
unutbu Avatar answered Nov 10 '22 09:11

unutbu