Skip to content
Show minibuffer in child frame on read-from-minibuffer
Emacs Lisp
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
screenshots removed full-size screenshot Feb 18, 2020
.gitignore
LICENSE Added license Mar 15, 2020
README.md
mini-frame.el Also handle mini-frame-completions-focus in temp-buffer-window-show-hook Apr 3, 2020

README.md

License GPL 3 MELPA

emacs-mini-frame

Place minibuffer at the top of the current frame on read-from-minibuffer.

While it's fine for me to have eldoc, flymake and other messages to appear at the bottom of the screen, editing minibuffer (find file, create VC branch, etc.) feels more comfortable in the upper area of the screen.

mini-frame-mode makes an advice around read-from-minibuffer function to create and show minibuffer-only child frame to accept input.

How it looks like

By default mini-frame is placed at the top of the current frame and occupied full width. Here is execute-extended-command (M-x) with icomplete-mode enabled:

icomplete-m-x

Those who use vertical completion candidates list may configure mini-frame not to occupy full width:

(custom-set-variables
 '(mini-frame-show-parameters
   '((top . 10)
     (width . 0.7)
     (left . 0.5))))

Here is switch-to-buffer (C-x b) with ido-vertical-mode:

ido-vertical-buffers

And execute-extended-command (M-x) with ivy-mode:

ivy-m-x

mini-frame-mode also create separate child frame to display completions list:

completions-frame

Mini-frame size

Users of Emacs 27 will benefits the most because of resize-mini-frames variable: mini-frame will be resized vertically to fit content.

Users of Emacs 26 will need to configure frame height explicitly, e.g.:

(custom-set-variables
 '(mini-frame-show-parameters
   '((top . 0)
     (width . 1.0)
     (left . 0.5)
     (height . 15))))

Ignore commands

One can configure the list of commands that must not be shown in the child frame by customizing the mini-frame-ignore-commands. The eval-expression command is there by default because mini-frame have no modeline to display eldoc hints. And because there must be some place to turn mini-frame-mode off if something goes wrong (I hope not) :)

Installation and usage

mini-frame is available on MELPA.

Alternatively, you can download mini-frame.el and run:

M-x package-install-file RET <path-to-mini-frame-el> RET

M-x mini-frame-mode RET

You can’t perform that action at this time.