Subject: Re: bug#26537: Problems with Emacs frame (GTK)

From: martin rudalics <[email-masked]>
Date: Tue, 18 Apr 2017 10:07:11 +0200

I looked into your init.el file now.  Your problem can be encapsulated
in the following two forms:

(setq default-frame-alist
       '(
         (width . 110) ; character
         (height . 49) ; lines
         (font . "Monospace-11") ; font
         ))

(add-hook 'emacs-startup-hook 'start-sr-speedbar)

According to its doc-string, ‘emacs-startup-hook’ is run "after loading
init files and handling the command line".  This means that you want to
split a window and give the new window a size of 30 characters.  And
afterwards you want to enlarge the window's frame to 110 characters and
change its default font and at the same time keep the window size at 30
characters.  This is (almost) asking for the impossible.

The hook you want to put ‘start-sr-speedbar’ on is ‘window-setup-hook’.
According to its doc-string:

"This is very similar to `emacs-startup-hook'.  The only difference
is that this hook runs after frame parameters have been set up in
response to any settings from your init file.  Unless this matters
to you, use `emacs-startup-hook' instead."

I'm quite confident that "it matters to you" ;-)

martin