reddit / emacs

Cannot maximize Emacs frame on MacOS; 10pixels missing at the bottom

pragmat1c1 · 2022-06-08 14:42
I am using Emacs 28.1 on a Mac: (emacs-version) "GNU Emacs 28.1 (build 1, x86_64-apple-darwin21.4.0, NS appkit-2113.40 Version 12.3.1 (Build 21E258)) of 2022-04-20" After updating MacOS to Monterey v. 12.4 two days ago, I cannot maximize the Emacs frame anymore. At the bottom of my frame are 10pixels missing. See attached screenshot. Here are my frame settings: ;; center frame 2/3 of the screen size (progn (setq initial-frame-alist '((top . 25) (left . 426) (width . 241) (height . 100))) (setq default-frame-alist '((top . 25) (left . 426) (width . 241) (height . 110))) (add-to-list 'default-frame-alist (cons 'vertical-scroll-bars nil))) Here are my monitor-attributes and frame parameters: (display-monitor-attributes-list) (((geometry 0 0 2560 1440) (workarea 0 25 2560 1415) (mm-size 596 335) (frames #<frame *scratch* 0x7fb0dc8b8430> #<frame workspace: PLANNER 0x7fb0e28bf7b0> #<frame workspace: Emacs Lisp 0x7fb0e44d4e00>) (source . "NS"))) (frame-parameters) ((tool-bar-position . top) (parent-id) (explicit-name . t) (display . "pragmat1c1s-MBP") (visibility . t) (icon-name) (window-id . "3") (top . 25) (left . 1280) (buried-buffer-list #<buffer *Backtrace*> #<buffer TAGS>) (buffer-list #<buffer *scratch*> #<buffer *Minibuf-1*> #<buffer init.el> #<buffer *Help*> #<buffer *Org Agenda*>) (unsplittable) ...) &#x200B; https://preview.redd.it/hwioy9yite491.png?width=2560&format=png&auto=webp&s=1839b798a3e0a36d698cdeaed41873d559dd6037
alternateved · 2022-06-08 14:54
Not sure if that would help in your case, but you might wanna try setting: (setq frame-resize-pixelwise t)
pragmat1c1 · 2022-06-08 14:57
Wow, that did the trick! Thank you very much! What was I doing wrong?
alternateved · 2022-06-08 15:03
I think it would be best to refer to the [manual](https://www.gnu.org/software/emacs/manual/html_node/elisp/Frame-Size.html#index-frame_002dresize_002dpixelwise): > If this option is nil (the default), a frame’s text pixel size is usually rounded to a multiple of the current values of that frame’s frame-char-height and frame-char-width whenever the frame is resized. If this is non-nil, no rounding occurs, hence frame sizes can increase/decrease by one pixel.
pragmat1c1 · 2022-06-08 15:13
Now I get it: After your comment and this post here \[1\] I realized I wasn't dealing with pixels but frame-char-height/-width. And I was wondering all the time what the unit of my width/height numbers was. \[1\] [https://emacs.stackexchange.com/a/17354/29404](https://emacs.stackexchange.com/a/17354/29404)
BettaGeorge · 2022-06-08 15:31
FYI, I solved this by carefully covering the bottom 10 pixels of my screen with duct tape. Works great so far.
your_sweetpea · 2022-06-15 18:44
Wow, this is a great customize option that I've been wanting my whole life but never realized existed.