* bug#19869: 25.0.50; default-frame-alist: width versus fullheight
@ 2015-02-14 23:24 Michael Heerdegen
2015-02-15 11:35 ` martin rudalics
0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2015-02-14 23:24 UTC (permalink / raw)
To: 19869
Hello,
There is some inconsistent behavior when setting the with of new
frames depending on whether fullheight is specified:
(progn
(set-face-attribute 'default nil :height 175)
(setq default-frame-alist
'((width . 100)
;; (fullscreen . fullheight)
))
(frame-width (make-frame))) ==> 100
OTOH:
(progn
(set-face-attribute 'default nil :height 175)
(setq default-frame-alist
'((width . 100)
(fullscreen . fullheight)
))
(frame-width (make-frame))) ==> 63
I would expect that the results are equal.
A related bug was #1522, btw.
Thanks!
Michael.
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
of 2015-02-06 on drachen
Repository revision: 5c9ad35f1e5fd8ee5561ef48baac1f6ff20ae679
Windowing system distributor `The X.Org Foundation', version 11.0.11602901
System Description: Debian GNU/Linux 8.0 (jessie)
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB
Important settings:
value of $LC_ALL: de_DE.utf8
value of $LC_COLLATE: C
value of $LC_TIME: C
value of $LANG: de_DE.utf8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#19869: 25.0.50; default-frame-alist: width versus fullheight
2015-02-14 23:24 bug#19869: 25.0.50; default-frame-alist: width versus fullheight Michael Heerdegen
@ 2015-02-15 11:35 ` martin rudalics
2015-02-15 16:31 ` Michael Heerdegen
2015-02-15 20:32 ` Michael Heerdegen
0 siblings, 2 replies; 8+ messages in thread
From: martin rudalics @ 2015-02-15 11:35 UTC (permalink / raw)
To: michael_heerdegen, 19869
> There is some inconsistent behavior when setting the with of new
> frames depending on whether fullheight is specified:
>
>
> (progn
> (set-face-attribute 'default nil :height 175)
> (setq default-frame-alist
> '((width . 100)
> ;; (fullscreen . fullheight)
> ))
> (frame-width (make-frame))) ==> 100
>
>
> OTOH:
>
> (progn
> (set-face-attribute 'default nil :height 175)
> (setq default-frame-alist
> '((width . 100)
> (fullscreen . fullheight)
> ))
> (frame-width (make-frame))) ==> 63
>
>
> I would expect that the results are equal.
They are here (Gtk+, Lucid, Motif and Windows) so probably your window
manager interferes in some way. I tried with your second form as my
.emacs and by evaluating it in *scratch* with emacs -Q.
> A related bug was #1522, btw.
I'm not sure. Doesn't your behavior depend on doing
`set-face-attribute' first?.
Anyway, this gives us a good case for doing some forensics. Please
evaluate
(setq frame-size-history '(1000))
(defun window-display-history ()
"..."
(interactive)
(with-current-buffer-window
"*history*" nil nil
(let ((history (cdr frame-size-history))
element sizes rest)
(while history
(setq element (car history))
(when (eq (car element) (selected-frame))
(when (setq sizes (nth 2 element))
(insert (format "%sx%s -> %sx%s "
(nth 0 sizes) (nth 1 sizes)
(nth 2 sizes) (nth 3 sizes))))
(insert (format "%s" (nth 1 element)))
(when (setq rest (nth 3 element))
(while rest
(insert (format " %s" (car rest)))
(setq rest (cdr rest))))
(insert "\n"))
(setq history (cdr history)))))
'history)
in *scratch* and evaluate your second form (the one where you set
fullheight). Go to the new frame you created this way, type
M-x: window-display-history
in it and post the contents of the *history* buffer here.
If you want to do the same when that form is in your .emacs we'll have
to proceed in a slightly different way. Let's do that later.
Thanks, martin
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#19869: 25.0.50; default-frame-alist: width versus fullheight
2015-02-15 11:35 ` martin rudalics
@ 2015-02-15 16:31 ` Michael Heerdegen
2015-02-15 20:32 ` Michael Heerdegen
1 sibling, 0 replies; 8+ messages in thread
From: Michael Heerdegen @ 2015-02-15 16:31 UTC (permalink / raw)
To: martin rudalics; +Cc: 19869
Hello Martin,
I'll do what you suggested later today, thanks. One comment to what you wrote:
> They are here (Gtk+, Lucid, Motif and Windows) so probably your window
> manager interferes in some way.
I don't think so. I already did some edebug yesterday, and I saw that
the width of the frame had already been changed when the frame was not
yet displayed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#19869: 25.0.50; default-frame-alist: width versus fullheight
2015-02-15 11:35 ` martin rudalics
2015-02-15 16:31 ` Michael Heerdegen
@ 2015-02-15 20:32 ` Michael Heerdegen
2015-02-15 20:55 ` Michael Heerdegen
1 sibling, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2015-02-15 20:32 UTC (permalink / raw)
To: martin rudalics; +Cc: 19869
martin rudalics <rudalics@gmx.at> writes:
> M-x: window-display-history
The buffer is empty, probably because you never push something to
`frame-size-history' (is there a part missing in your code?).
Anyway, I think I'm able to debug this myself a bit, as far as it's
Elisp and not C.
Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#19869: 25.0.50; default-frame-alist: width versus fullheight
2015-02-15 20:32 ` Michael Heerdegen
@ 2015-02-15 20:55 ` Michael Heerdegen
2015-02-15 21:05 ` Michael Heerdegen
0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2015-02-15 20:55 UTC (permalink / raw)
To: martin rudalics; +Cc: 19869
Hello again,
I forgot to mention that this is all reproducible here with emacs -Q.
Apparently the frame is created with the correct width, then the width
changes while calling `face-set-after-frame-default'. This happens
before the frame is actually displayed.
Here is what I evaluated in emacs -Q:
--8<---------------cut here---------------start------------->8---
(progn
(set-face-attribute 'default nil :height 175)
(setq default-frame-alist
'((width . 100)
(fullscreen . fullheight)))
(advice-add
'face-set-after-frame-default :around
(lambda (f frame &rest args)
(message "Width before face-set-after-frame-default: %S" (frame-width frame))
(apply f frame args)
(message "Width after face-set-after-frame-default: %S" (frame-width frame))))
(make-frame))
--8<---------------cut here---------------end--------------->8---
In *Messages* I get
Width before face-set-after-frame-default: 98
Width after face-set-after-frame-default: 63
#<frame emacs@drachen 0xf99350>
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#19869: 25.0.50; default-frame-alist: width versus fullheight
2015-02-15 20:55 ` Michael Heerdegen
@ 2015-02-15 21:05 ` Michael Heerdegen
2015-02-15 21:37 ` Michael Heerdegen
0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2015-02-15 21:05 UTC (permalink / raw)
To: martin rudalics; +Cc: 19869
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Here is what I evaluated in emacs -Q:
Next round, now with `internal-merge-in-global-face':
--8<---------------cut here---------------start------------->8---
(progn
(set-face-attribute 'default nil :height 175)
(setq default-frame-alist
'((width . 100)
(fullscreen . fullheight)))
(advice-add
'internal-merge-in-global-face :around
(lambda (f face frame)
(message "Width before merging %S: %S" face (frame-width frame))
(funcall f face frame)
(message "Width after merging %S: %S" face (frame-width frame))))
(make-frame))
--8<---------------cut here---------------end--------------->8---
==>
Width before merging default: 98
Width after merging default: 63
Width before merging bold: 63
Width after merging bold: 63
...
So it seems `internal-merge-in-global-face' is the culprit. That's a C
function now.
Thanks,
Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#19869: 25.0.50; default-frame-alist: width versus fullheight
2015-02-15 21:05 ` Michael Heerdegen
@ 2015-02-15 21:37 ` Michael Heerdegen
2015-02-16 18:36 ` martin rudalics
0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2015-02-15 21:37 UTC (permalink / raw)
To: martin rudalics; +Cc: 19869
Hello,
just to be sure, I have rebuilt Emacs. My built of trunk was very few
days old, and I think I already saw the problem a very long time before
that. That's why I didn't check with a more recent built. Anyway, the
bug is gone in the new built, it must have been fixed in one of the last
days.
Sorry for the noise, I guess I have to be more careful in the future.
Thanks,
Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#19869: 25.0.50; default-frame-alist: width versus fullheight
2015-02-15 21:37 ` Michael Heerdegen
@ 2015-02-16 18:36 ` martin rudalics
0 siblings, 0 replies; 8+ messages in thread
From: martin rudalics @ 2015-02-16 18:36 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: 19869
> just to be sure, I have rebuilt Emacs. My built of trunk was very few
> days old, and I think I already saw the problem a very long time before
> that. That's why I didn't check with a more recent built. Anyway, the
> bug is gone in the new built, it must have been fixed in one of the last
> days.
Too bad. I wanted to test whether `frame-size-history' could be used
for remote diagnostics ;-)
martin
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-02-16 18:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-14 23:24 bug#19869: 25.0.50; default-frame-alist: width versus fullheight Michael Heerdegen
2015-02-15 11:35 ` martin rudalics
2015-02-15 16:31 ` Michael Heerdegen
2015-02-15 20:32 ` Michael Heerdegen
2015-02-15 20:55 ` Michael Heerdegen
2015-02-15 21:05 ` Michael Heerdegen
2015-02-15 21:37 ` Michael Heerdegen
2015-02-16 18:36 ` martin rudalics
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).