GNU bug report logs -
#25169
26.0.50; display-buffer doesn't set window width correctly
Previous Next
Reported by: Liu Hui <liuhui1610 <at> gmail.com>
Date: Sun, 11 Dec 2016 12:21:02 UTC
Severity: normal
Found in version 26.0.50
Done: martin rudalics <rudalics <at> gmx.at>
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 25169 in the body.
You can then email your comments to 25169 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#25169
; Package
emacs
.
(Sun, 11 Dec 2016 12:21:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Liu Hui <liuhui1610 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 11 Dec 2016 12:21:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Recipe 1:
1. Emacs -Q
2. evaluate the following code in *scratch*:
(display-buffer (get-buffer-create "aaa")
'(display-buffer-pop-up-window
(window-width . 20)))
;; => correct window width for buffer "aaa"
(display-buffer (get-buffer-create "bbb")
'(display-buffer-pop-up-window
(window-width . 20)))
;; => changed and larger window width for buffer "bbb"
Recipe 2:
1. Emacs -Q
2. evaluate the following code in *scratch*:
(display-buffer (get-buffer-create "aaa")
'(display-buffer-in-side-window
(window-width . 20)
(side . right)))
;; => correct window width for buffer "aaa"
(display-buffer (get-buffer-create "bbb")
'(display-buffer-in-side-window
(window-width . 20)
(side . left)))
;; => correct width for buffer "bbb", but the window width of
;; buffer "aaa" is changed and becomes larger
In GNU Emacs 26.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
of 2016-12-10 built on lgw01-57
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Ubuntu 16.04.1 LTS
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25169
; Package
emacs
.
(Sun, 11 Dec 2016 16:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 25169 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks for the report.
> Recipe 1:
>
> 1. Emacs -Q
> 2. evaluate the following code in *scratch*:
>
> (display-buffer (get-buffer-create "aaa")
> '(display-buffer-pop-up-window
> (window-width . 20)))
> ;; => correct window width for buffer "aaa"
>
> (display-buffer (get-buffer-create "bbb")
> '(display-buffer-pop-up-window
> (window-width . 20)))
> ;; => changed and larger window width for buffer "bbb"
Recipe 1 is difficult to reproduce here. I made my initial frame 169
columns wide to get a side-by-side split when displaying aaa and to
_not_ get another side-by-side split when displaying bbb. What happens
is that ‘display-buffer-pop-up-window’ refuses to make a new window for
bbb (you can reduce the value of ‘split-width-threshold’ to get a split)
so ‘display-buffer’ rather uses aaa's window to display bbb via
‘display-buffer-use-some-window’. The latter ignores the ‘window-width’
entry but applies ‘window--even-window-sizes’ instead.
So this is not a bug but admittedly a very confusing sequence of events.
> Recipe 2:
>
> 1. Emacs -Q
> 2. evaluate the following code in *scratch*:
>
> (display-buffer (get-buffer-create "aaa")
> '(display-buffer-in-side-window
> (window-width . 20)
> (side . right)))
> ;; => correct window width for buffer "aaa"
>
> (display-buffer (get-buffer-create "bbb")
> '(display-buffer-in-side-window
> (window-width . 20)
> (side . left)))
> ;; => correct width for buffer "bbb", but the window width of
> ;; buffer "aaa" is changed and becomes larger
This is a bug and I attached a fix for it. Please try it.
Note, however, that in general you can rely on Emacs to preserve the
size of a window like that of aaa in recipe 2 if and only if you run
‘window-preserve-size’ on that window - either explicitly or via a
`preserve-size' argument.
martin
(BTW: Does the ibuffer scenario from bug#25115 work orderly now?)
[window.el.diff (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25169
; Package
emacs
.
(Mon, 12 Dec 2016 04:54:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 25169 <at> debbugs.gnu.org (full text, mbox):
> Recipe 1 is difficult to reproduce here. I made my initial frame 169
> columns wide to get a side-by-side split when displaying aaa and to
> _not_ get another side-by-side split when displaying bbb. What happens
> is that ‘display-buffer-pop-up-window’ refuses to make a new window for
> bbb (you can reduce the value of ‘split-width-threshold’ to get a split)
> so ‘display-buffer’ rather uses aaa's window to display bbb via
> ‘display-buffer-use-some-window’. The latter ignores the ‘window-width’
> entry but applies ‘window--even-window-sizes’ instead.
>
> So this is not a bug but admittedly a very confusing sequence of events.
I see. Thanks for the explanation.
> This is a bug and I attached a fix for it. Please try it.
>
> Note, however, that in general you can rely on Emacs to preserve the
> size of a window like that of aaa in recipe 2 if and only if you run
> ‘window-preserve-size’ on that window - either explicitly or via a
> `preserve-size' argument.
The problem is fixed. Thanks again!
> (BTW: Does the ibuffer scenario from bug#25115 work orderly now?)
Yes, and I'll add some information in that thread.
Reply sent
to
martin rudalics <rudalics <at> gmx.at>
:
You have taken responsibility.
(Mon, 12 Dec 2016 10:01:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Liu Hui <liuhui1610 <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 12 Dec 2016 10:01:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 25169-done <at> debbugs.gnu.org (full text, mbox):
> The problem is fixed. Thanks again!
Installed on master. Closing this bug.
Thanks, martin
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 09 Jan 2017 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 223 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.