3

I am using these commands in order to customize the height and the width of the Emacs frames when it starts:

(add-to-list 'default-frame-alist '(height . 50))
(add-to-list 'default-frame-alist '(width . 120))

My goal was to have Emacs use all the available height of my screen. The problem is that up to height 50 (circa) the frame is getting bigger as expected but from that point on it stops, although its height hasn't reached the maximum, as you can see in the image below:

enter image description here

After the start-up I can maximize it with the mouse. Why is that happening and after a number the frames can't even reach their maximum? How can I make it cover the whole screen's height?

  • If you want control every pixel precisely and have it always be perfect, then you will need to use set-frame-size (using the optional pixelwise argument) and set-frame-position. If you are happy with almost perfect and just about right, then the other forum participants will recommend things like toggle-frame-maximized. Here is the link to the relevant documentation: gnu.org/software/emacs/manual/html_node/elisp/… Here is what I use for OSX and Windows: stackoverflow.com/a/18711628/2112489 – lawlist May 11 '15 at 5:05
  • I don't understand what you are trying to do. If you just want to set the height and width of a new frame by default then what you tried should do that. However, a better way to do that is to customize option default-frame-alist - that's why it's a user option. But I fear that you are trying to do something else, which I haven't fathomed... – Drew May 11 '15 at 5:12
  • @Drew I just want to make Emacs maximized at startup but only vertically in my screen. What I do does that but not fully. As you see in the image it doesn't cover the whole height. – Adam May 11 '15 at 5:17
  • @lawlist I will check out your proposals. Thanks – Adam May 11 '15 at 5:18
  • 1
    @Dan Can you add that as an answer so that we have one more answered question :) – Kaushal Modi Jul 10 '15 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.