1

XQuartz 2.7.11 (xorg-server 1.18.4)

From Mac, I ssh-login to Ubuntu 18.04 and XigmaNAS, and start emacs. The emacs windows shows up as it should.

The emacs window pops out as normal size, then resizes itself to 5 or 6 lines. This is pretty inconvenient as the pane only shows emacs splash frame as it starts.

MacPort's emacs (+x11) does not have this problem when running natively on Mac. The problem happens to emacs over SSH on Ubuntu 18.04LTS and XigmaNAS which is FreeBSD.

Interestingly, if I use --geometry 80x60 where the height (60) is large enough (probably larger than the pixel height), the emacs window stays as the max height. On my Mac, if I use 80x57, the window goes back to 5-line height. If I use 80x58, the window height fills my screen. Width seems correct as far as I can tell.

Since this happens for both Ubuntu and FreeBSD over SSH, it's emacs's or Xquartz's problem. Most likely culprit is emacs's window height math is messed up.

Note that, the same problem happens with "emacs -q", so it's not related to ~/.emacs file I use.

So, the question is probably two parts but the ultimately I'm looking for a solution. The culprit is likely emacs height calc is confused, and defaulting to the small window.

A remedy is to set the window size in my .emacs file. I did that but the damage is done by then. If I start emacs with a file in the command line, it doesn't show up in the pane as the emacs splash becomes the first pane. This means that if I do something like "git commit", I have to switch the pane to the commit comment pane every time.

It's been driving me crazy. Someone out there must be in the same boat, so I came here to ask. If you've solved this, I'd really like to know and appreciate.

0

I compiled emacs from source. I installed -dev libs for jpeg, gif, tiff, and xaw, x11, etc. but not with gtk.

This solves the problem, and probably there is some interaction between emacs and gtk lib is the issue. If you are frustrated, compiling from source with minimal X11 lib is a solution.

0

I've also seen this issue for a while now, and finally did some investigation. I tried running emacs with -q and --no-site-file and observed the same behavior (resizing to 3 lines shortly after displaying). The threshold for the number of lines in an explicitly specified geometry is slightly different; in my case, 53 lines was the magic number. This is on Emacs 26.1 running on Ubuntu 19.04 using XQuartz 2.7.11.

For now, I've added a workaround to my init.el to explicitly detect this situation and force the window to a reasonable height, via:

(if (< (frame-height) 4)
    (set-frame-height (window-frame) 24))

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.