GNU bug report logs -
#19869
25.0.50; default-frame-alist: width versus fullheight
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Sat, 14 Feb 2015 23:26:02 UTC
Severity: normal
Tags: moreinfo
Found in version 25.0.50
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19869 in the body.
You can then email your comments to 19869 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19869
; Package
emacs
.
(Sat, 14 Feb 2015 23:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
michael_heerdegen <at> web.de
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 14 Feb 2015 23:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19869
; Package
emacs
.
(Sun, 15 Feb 2015 11:37:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 19869 <at> debbugs.gnu.org (full text, mbox):
> 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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19869
; Package
emacs
.
(Sun, 15 Feb 2015 16:32:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 19869 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19869
; Package
emacs
.
(Sun, 15 Feb 2015 20:33:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 19869 <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19869
; Package
emacs
.
(Sun, 15 Feb 2015 20:56:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 19869 <at> debbugs.gnu.org (full text, mbox):
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 <at> drachen 0xf99350>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19869
; Package
emacs
.
(Sun, 15 Feb 2015 21:06:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 19869 <at> debbugs.gnu.org (full text, mbox):
Michael Heerdegen <michael_heerdegen <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19869
; Package
emacs
.
(Sun, 15 Feb 2015 21:38:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 19869 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19869
; Package
emacs
.
(Mon, 16 Feb 2015 18:37:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 19869 <at> debbugs.gnu.org (full text, mbox):
> 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
Added tag(s) moreinfo.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 16 Feb 2015 19:15:01 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
19869 <at> debbugs.gnu.org and michael_heerdegen <at> web.de
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 16 Feb 2015 19:15:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 17 Mar 2015 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 95 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.