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

From: martin rudalics <[email-masked]>
Date: Mon, 17 Apr 2017 14:06:47 +0200

> As you can see, in the init.el file I had attached I have
 >
 > (setq default-frame-alist
 >        '(
 >          (width . 110) ; character
 >          (height . 49) ; lines
 >          (font . "Monospace-11") ; font
 >          ))
 >
 > and
 >
 > (setq sr-speedbar-default-width 30)
 > (setq sr-speedbar-width 30)
 > (setq sr-speedbar-max-width 30)
 >
 > which should give a frame 110 characters wide and a sr-speedbar 30
 > chs. wide.. Why then, at first start, without desktop file, I have the
 > frame in screen-no-desktop.png?

But you said that screen-no-desktop.png is from an "Emacs-2017-03-10 [1]
without desktop file" and you also said that this "worked fine (more or
less) up to the builds I did on March 10 and 27".  So I can't yet figure
out what you mean here.  Also, you didn't tell me the results of
‘window--dump-frame’ for that frame so how can I find out how widths
like 110 and 30 were interpreted?  Please clarify.

 >> Instead of "init file" I suppose you mean "desktop" here, i.e., the file
 >> written by desktop.el.  Right?  Or do you mean something like "what the
 >
 > No, init.el. The settings for sr-speedbar I cited before should set
 > (and up to the builds <= 20170327, they SET) to a frame with a
 > sr-speedbar window of about 30 chs. Instead now it is of about 40 chs.

You didn't tell me the other results of ‘window--dump-frame’ I asked for
either.  But FWIW the pngs of screen-with-desktop-NOT_OK and
screen-with-desktop-OK you attached seem at least to exhibit the same
frame width, so a change appears there only with the width of
sr-speedbar-window.  Now if I look at the desktop file you attached,
then I see there a (total-width . 41) entry for the "*SPEEDBAR*" window
and I think a "width" of 40 chs is much more appropriate than one of 30
chs.  Again it's impossible to tell anything without more exact figures
like those returned by ‘window--dump-frame’.

 > Notice I do not resize the frame or windows inside it, so I would
 > expect more or less the width specified in init.el.

I don't know enough about desktop but IIUC its ideology is to restore
the configuration from the saved desktop and to _not_ care about
`default-frame-alist'.  If there is another opinion about this I would
like to hear or read about it somwhere.

Thanks, martin