Altering the font size for the Emacs minibuffer separately from default emacs?
Asked Answered
F

2

8

I've been attempting to alter the font / face for the emacs minibuffer separately from emacs default fonts, but without much luck.

Specifically, I'm interested in making the minibuffer font size larger for use with the emacs MULE as, with my current font setting or if I'm using emacs on a "netbook" screen, sometimes the character selection options in the MULE are a bit small.

Options easily accessed within emacs are the minibuffer-prompt & minibuffer-prompt-properties, but these are only for command prompts and not the regular minibuffer text.

There seem to be a number of minibuffer variables listed in emacs for creating minibuffer frames, or getting contents from minibuffer windows, etc.. but these do not pertain to altering the minibuffer face. Is it even possible to alter the minibuffer face separately from the default emacs?

An interesting option is the oneonone emacs http://www.emacswiki.org/emacs/OneOnOneEmacs project. But could the dedicated minibuffer frame be altered? Also before I alter my current emacs set-up that drastically, I'd hope to be able to just alter fonts first or create my own alterable minibuffer frame, etc...

Any help and/or creative ideas would be greatly appreciated.

Fettling answered 23/10, 2011 at 21:41 Comment(0)
D
10

You can add customization to the minibuffer through the minibuffer-setup-hook. In there, you can do some face remapping like so:

(add-hook 'minibuffer-setup-hook 'my-minibuffer-setup)
(defun my-minibuffer-setup ()
       (set (make-local-variable 'face-remapping-alist)
          '((default :height 2.0))))

Change the body of the my-minibuffer-setup as desired. The above doubles the height of the default face.

Dorison answered 24/10, 2011 at 3:12 Comment(2)
This is a wonderful help, however, it only changes some aspects. I made the errors of assuming the MULE completion entries are inn the minibuffer, but this appears to not be true. The code affects the minibuffer which occurs when I input something, say using C-x C-f to find a file. I used the same code to alter emacs' echoarea, however this also is not the window the MULE uses to list its completions. Is there a method to find out the name of the window created by the MULE? Perhaps knowing this, the above code can be altered to affect this item.Fettling
It seems the MULE opens a buffer called Quail Completions. This buffer is empty upon swapping to it, but it is definitely created when emacs dislpays the character completions.Fettling
U
1

Yes, you can easily customize the properties of a standalone minibuffer frame, including its default face and font.

You can customize the OneOnOneEmacs user option 1on1-minibuffer-frame-alist. (Or you can customize the standard option minibuffer-frame-alist -- its frame parameter values are used as defaults by 1on1-minibuffer-frame-alist.)

The font frame parameter is the one that controls the font (duh). So you would customize option 1on1-minibuffer-frame-alist, changing its setting for the font.

Alternatively, you can just set 1on1-minibuffer-frame-font to the font you want -- it is used as the default value for the font setting by 1on1-minibuffer-frame-alist whenever there is no explicit font setting in minibuffer-frame-alist. For example:

    (setq 1on1-minibuffer-frame-font
          "-*-Lucida Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1")

If you do not want to use a standalone minibuffer frame then see Trey's answer.

Ureter answered 24/10, 2011 at 14:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.