2

Emacs has been starting up in an extremely small window for some reason. The text size is normal, but the window is something like 3 lines tall x 10 chars wide. Of course I can use my mouse and just resize the window, after which it works totally fine.

I'm using Fedora 38 with Emacs 28.2 installed from dnf (Fedora's package manager). Desktop environment is "Gnome (not classic) with X11". I have nearly zero customizations, except I've hidden the scroll bar, tool bar, and menu bar using the M-` menu. Both my default-frame-alist and initial-frame-alist just has a single vertical-scroll-bars = nil, though there's a second line that says "CHANGED outside Customize", but I think that refers to the M-` menu being not part of the "customize" feature?

Fedora comes with Gnome with Wayland by default, but I switched it to X11 using the "cog" menu in login, and I think but am not 100% that this issue only started happening to me after the switch (on Wayland, I think it was not happening). When I do ls ~ -a I don't see any .Xresources or .Xdefaults.

What's going on?

edit: I tried opening emacs multiple times in a row, and sometimes it opens in a normal-sized window. Maybe half the time. I also tried doing emacs -Q and emacs -q and the issue does not happen: I just get an ordinary-sized window.

for reference, here is my ~/.emacs file (comments omitted for brevity):

(custom-set-variables
 '(custom-enabled-themes '(wheatgrass))
 '(make-backup-files nil)
 '(menu-bar-mode nil)
 '(ring-bell-function 'ignore)
 '(scroll-bar-mode nil)
 '(tool-bar-mode nil))
(custom-set-faces
 '(default ((t (:family "Noto Sans Mono" :foundry "GOOG" :slant normal :weight normal :height 139 :width normal)))))
xdavidliu
  • 143
  • 8
  • Maybe check `site-lisp.el`? Do you see the frame-size problem if you start Emacs using `emacs -Q` (no init file), and you then evaluate your customizations? – Drew Jun 18 '23 at 14:03
  • I updated the question. I'm not sure where site-lisp.el is – xdavidliu Jun 19 '23 at 08:20
  • `emacs -Q` starts Emacs without `site-lisp.el` or your init file. `emacs -q` starts Emacs without (only) your init file. – Drew Jun 19 '23 at 14:33
  • Did the problem start suddenly or has it always existed with your current Emacs build? What's your Emacs version and platform (OS, window mgr)? Bisect your init file, to see which part of it seems to be allowing/causing the problem. – Drew Jun 19 '23 at 14:35
  • seems to always have happened. OS is Fedora 38, desktop environment is "Gnome (not classic) X11" – xdavidliu Jun 20 '23 at 22:47
  • I put the info in the question before I made my previous comment 1 hour ago – xdavidliu Jun 21 '23 at 00:17
  • 1
    Have you seen this? https://www.emacswiki.org/emacs/FrameSize – g-gundam Jun 21 '23 at 03:10
  • yes, I'm aware of frame sizes. That doesn't explain why I'm seeing this problem, especially since my .emacs (included in the question) doesn't say anything about frame sizes – xdavidliu Jun 21 '23 at 16:18

1 Answers1

0

Add this line to your Emacs' configuration file, it should maximize any new frame open :

(add-to-list 'default-frame-alist '(fullscreen . maximized))
Drew
  • 75,699
  • 9
  • 109
  • 225