I Want to make the emacs minibuffer (where we type emacs command) vertical. Just the way we open a window by using
C-x 3
Is there a way to do this?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI Want to make the emacs minibuffer (where we type emacs command) vertical. Just the way we open a window by using
C-x 3
Is there a way to do this?
Normally, each frame has its own minibuffer window at the bottom, which is used whenever that frame is selected. If the frame has a minibuffer, you can get it with minibuffer-window.
Well, apparently there's a way. Creating a dedicated minibuffer frame using the oneonone. This method didn't work how I was expecting on Emacs 24 where I tried as the 1on1-emacs
. You need to load hexrgb.el
first, otherwise it will not work. This is how it's shown:
As can be seen, it opens a new frame for completions, and for the minibuffer. I haven't figured out why when I switch to the minibuffer it doesn't change the scope to the minibuffer frame and instead tries to reuse the one that I have below. Maybe I'm not using the correct libraries but at least is the start.
Then I used instead a new minibuffer window. The usability of the new minibuffer window was rather null, since I had two minibuffers (and haven't found a way to remove the original) and the auto-completition was done in the main frame instead of the minibuffer frame.
This is the farest I went:
(setq default-minibuffer-frame
(make-frame
'((name . "minibuffer")
(width . 20)
(height . 80)
(minibuffer . only)
(top . 0)
(right . 0)
)))
(setq-default mode-line-format nil)
load-file
instead of just dropping the thing in a path (the previous problem was "Cannot open load file: hexrgb"). Now it loads, but is not the expected behavior. When I use M-x 1on1-emacs
it just open a new window with the minibuffer, but doesn't remove the minibuffer of the main frame (same as the previous solution) and whenever I press M-x
it doesn't change the scope.
As the Commentary in file oneonone.el
says, just put this in your ~/.emacs
:
(require 'oneonone)
(1on1-emacs)
You can also invoke 1on1-emacs
from the command line:
runemacs -l "oneonone.el" -f "1on1-emacs"
(You might need to provide an absolute file name for runemacs
or oneonone.el
, depending on your directory etc.)
If you call 1on1-emacs
any other way than during startup, it will be too late, as Emacs will have already created another minibuffer in its initial frame. That's the behavior you describe above.
Tip: If you use a 3rd-party library, it never hurts to look in the source-code Commentary for installation/startup instructions. ;-)
To respond to the original question: if you want a minibuffer that is to the side of some other buffer, then no, it is not possible in the same frame, AFAIK. But yes, you can use a standalone minibuffer for that, i.e., a separate minibuffer frame. And yes, oneonone.el
lets you do that --- just customize the position and size of the minibuffer frame using the options in the library.
That said, I do not see why anyone would want a minibuffer on the side. Keep in mind that text is written horizontally. So it generally makes sense to have a window/frame that is used for typed input and displayed output message (echo area) to be wider than it is tall, not tall and narrow.