GNU bug report logs - #25115
26.0.50; ibuffer fails to show confirmation buffer when there are side windows

Previous Next

Package: emacs;

Reported by: Liu Hui <liuhui1610 <at> gmail.com>

Date: Mon, 5 Dec 2016 03:29:01 UTC

Severity: normal

Found in version 26.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.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 25115 in the body.
You can then email your comments to 25115 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Mon, 05 Dec 2016 03:29: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. (Mon, 05 Dec 2016 03:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Liu Hui <liuhui1610 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; ibuffer fails to show confirmation buffer when there are
 side windows
Date: Mon, 5 Dec 2016 11:28:15 +0800
Hello,

When there are side windows, ibuffer fails to show the comfirmation 
buffer for buffers to be killed.

1. emacs -Q & create a side window by
(pop-to-buffer "test"
               '(display-buffer-in-side-window
                 (side . right)
                 (width . 0.2)))
2. switch to another buffer and M-x ibuffer
3. press 'D', mark two or more buffers for killing
4. press 'x'

then an error 'ibuffer-confirm-operation-on: Cannot split side window or 
parent of side window' is issued.


In GNU Emacs 26.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-12-03 built on lgw01-50
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#25115; Package emacs. (Mon, 05 Dec 2016 07:32:01 GMT) Full text and rfc822 format available.

Message #8 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Liu Hui <liuhui1610 <at> gmail.com>, 25115 <at> debbugs.gnu.org
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Mon, 05 Dec 2016 08:31:19 +0100
> When there are side windows, ibuffer fails to show the comfirmation buffer for buffers to be killed.
>
> 1. emacs -Q & create a side window by
> (pop-to-buffer "test"
>                 '(display-buffer-in-side-window
>                   (side . right)
>                   (width . 0.2)))
> 2. switch to another buffer and M-x ibuffer
> 3. press 'D', mark two or more buffers for killing
> 4. press 'x'
>
> then an error 'ibuffer-confirm-operation-on: Cannot split side window or parent of side window' is issued.
>
>
> In GNU Emacs 26.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
>   of 2016-12-03 built on lgw01-50
> Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
> System Description:    Ubuntu 16.04.1 LTS

Thanks for the report.  Since I don't use ibuffer I just tried to follow
your recipe.  In (2) I switched to *Messages* in the side window by
selecting it with the mouse from the Buffers menu.  If, after M-x
ibuffer, I now type ‘D’ in the side window, ibuffer prompts me whether I
really want to kill *Messages* so I miserably failed to "mark two or
more buffers for killing".

If instead in (3) I repeatedly type ‘m’ to mark all buffers listed in
the side window and then type ‘D’, my main window gets split, in the
window at the bottom I get a list of the selected buffers and in the
minibuffer I'm asked whether I really want to kill 3 buffers.  When,
instead of ‘D’ I type ‘x’, I am asked in the minibuffer whether I really
want to kill the buffer at the current line of the side window.

I don't understand the ibuffer code (partly because I don't understand
what an interactive Lisp closure is and how it works).  So if you can't
give me a recipe I can follow it might be best if you debug the ibuffer
code yourself to find out why and how it tries to split the side window.

Finally note that side windows are preferably populated via
‘display-buffer’, so the "switch to another buffer" and "M-x ibuffer" in
step (2) already sound like a bad idea.

Thanks, martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Mon, 05 Dec 2016 10:17:01 GMT) Full text and rfc822 format available.

Message #11 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Liu Hui <liuhui1610 <at> gmail.com>
Cc: 25115 <at> debbugs.gnu.org
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Mon, 05 Dec 2016 11:16:38 +0100
> Steps to reproduce:
>
> 1. emacs -Q
> 2. eval the following code in *scratch* to create a side window.
> (pop-to-buffer "test"
>                 '(display-buffer-in-side-window
>                   (side . right)
>                   (width . 0.2)))
> 3. Now the side window has been created and selected. Press 'C-x o' to switch to the other window in the left, which displays *scratch*.
> 4. M-x ibuffer. Then press 'd' to mark two or more buffers for killing.
> 5. Press 'x'. Then an error 'ibuffer-confirm-operation-on: Cannot split side window or parent of side window' is issued.

Confirmed.  ‘ibuffer-confirm-operation-on’ selects the last window of
the selected frame's ‘window-list’ and tries to split that window.  In
your scenario the last window is the side window and cannot be split by
‘split-window’.

I pushed a fix for that on master, please have a look.

But someone who's using ibuffer on a regular basis should really try to
make it use ‘display-buffer’ instead.  There is absolutely no evidence
that the last window of a frame can be split more easily than the one
used by ibuffer itself and if no window can be split some other window
should be reused for displaying the buffer list.

Thanks again, martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Mon, 05 Dec 2016 15:09:02 GMT) Full text and rfc822 format available.

Message #14 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: Mark Oteiza <mvoteiza <at> udel.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Liu Hui <liuhui1610 <at> gmail.com>, 25115 <at> debbugs.gnu.org
Subject: Re: bug#25115: 26.0.50;
 ibuffer fails to show confirmation buffer when there are side windows
Date: Mon, 05 Dec 2016 10:08:32 -0500
martin rudalics <rudalics <at> gmx.at> writes:

>> Steps to reproduce:
>>
>> 1. emacs -Q
>> 2. eval the following code in *scratch* to create a side window.
>> (pop-to-buffer "test"
>>                 '(display-buffer-in-side-window
>>                   (side . right)
>>                   (width . 0.2)))
>> 3. Now the side window has been created and selected. Press 'C-x o' to switch to the other window in the left, which displays *scratch*.
>> 4. M-x ibuffer. Then press 'd' to mark two or more buffers for killing.
>> 5. Press 'x'. Then an error 'ibuffer-confirm-operation-on: Cannot split side window or parent of side window' is issued.
>
> Confirmed.  ‘ibuffer-confirm-operation-on’ selects the last window of
> the selected frame's ‘window-list’ and tries to split that window.  In
> your scenario the last window is the side window and cannot be split by
> ‘split-window’.
>
> I pushed a fix for that on master, please have a look.
>
> But someone who's using ibuffer on a regular basis should really try to
> make it use ‘display-buffer’ instead.  There is absolutely no evidence
> that the last window of a frame can be split more easily than the one
> used by ibuffer itself and if no window can be split some other window
> should be reused for displaying the buffer list.

I don't use ibuffer often, but I have been changing instances of
switch-to-buffer to pop-to-buffer-same-window since reading Bug#22244.

Makes me wonder about switch-to-buffer's future




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Mon, 05 Dec 2016 16:25:02 GMT) Full text and rfc822 format available.

Message #17 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Mark Oteiza <mvoteiza <at> udel.edu>
Cc: Liu Hui <liuhui1610 <at> gmail.com>, 25115 <at> debbugs.gnu.org
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Mon, 05 Dec 2016 17:24:22 +0100
> I don't use ibuffer often, but I have been changing instances of
> switch-to-buffer to pop-to-buffer-same-window since reading Bug#22244.
>
> Makes me wonder about switch-to-buffer's future

This is not primarily about ‘switch-to-buffer’.  It's about displaying a
list of items (file or buffer names, completions, ispell's choices, ...)
in a buffer, temporarily showing that buffer in a window and then
proceeding in reaction to user input.  ‘dired-mark-pop-up’ is a typical
function for this purpose.

ibuffer apparently uses the last window in ‘window-list’ to show the
buffer at the bottom of the frame, something ‘display-buffer-at-bottom’
should handle well.  But I'd like to hear the opinion of a long time
user of ‘ibuffer’ before actually changing this.

Also, ‘ibuffer-confirm-operation-on’ does ‘fit-window-to-buffer’ and I'd
prefer fixing bug#25055 first before reintroducing it somewhere else ;-)

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Tue, 06 Dec 2016 10:21:01 GMT) Full text and rfc822 format available.

Message #20 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Mark Oteiza <mvoteiza <at> udel.edu>, Liu Hui <liuhui1610 <at> gmail.com>,
 25115 <at> debbugs.gnu.org
Subject: Re: bug#25115: 26.0.50;
 ibuffer fails to show confirmation buffer when there are side windows
Date: Tue, 06 Dec 2016 19:20:17 +0900
martin rudalics <rudalics <at> gmx.at> writes:

>> I don't use ibuffer often, but I have been changing instances of
>> switch-to-buffer to pop-to-buffer-same-window since reading Bug#22244.
>>
>> Makes me wonder about switch-to-buffer's future
>
> ibuffer apparently uses the last window in ‘window-list’ to show the
> buffer at the bottom of the frame, something ‘display-buffer-at-bottom’
> should handle well.  But I'd like to hear the opinion of a long time
> user of ‘ibuffer’ before actually changing this.
Your patch has perfect sense to me.  Indeed i wrote an almost identical
fix but you were faster than me.

Regards,
Tino




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Tue, 06 Dec 2016 14:29:02 GMT) Full text and rfc822 format available.

Message #23 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: Mark Oteiza <mvoteiza <at> udel.edu>, Liu Hui <liuhui1610 <at> gmail.com>,
 25115 <at> debbugs.gnu.org
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Tue, 06 Dec 2016 15:28:31 +0100
> Your patch has perfect sense to me.  Indeed i wrote an almost identical
> fix but you were faster than me.

Damn.  Next time I'll wait a day or two :-(

But we still don't know what this ‘window-list’ stuff is all about.  I'd
rather have asked ‘walk-window-tree-1’ on the main window to return the
last window it sees, but consider the following emacs -Q scenario:

C-x 2
C-x o
M-x ibuffer
m
m
D

The confirmation buffer appears above the ibuffer buffer.  I doubt that
such behavior is intentional but since I'm no ibuffer user ...

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Tue, 06 Dec 2016 22:46:02 GMT) Full text and rfc822 format available.

Message #26 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 25115 <at> debbugs.gnu.org, Liu Hui <liuhui1610 <at> gmail.com>,
 Mark Oteiza <mvoteiza <at> udel.edu>, Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Wed, 7 Dec 2016 07:45:14 +0900 (JST)
[Message part 1 (text/plain, inline)]

On Tue, 6 Dec 2016, martin rudalics wrote:

>> Your patch has perfect sense to me.  Indeed i wrote an almost identical
>> fix but you were faster than me.
>
> Damn.  Next time I'll wait a day or two :-(
>
> But we still don't know what this ‘window-list’ stuff is all about.  I'd
> rather have asked ‘walk-window-tree-1’ on the main window to return the
> last window it sees, but consider the following emacs -Q scenario:
>
> C-x 2
> C-x o
> M-x ibuffer
> m
> m
> D
>
> The confirmation buffer appears above the ibuffer buffer.  I doubt that
> such behavior is intentional but since I'm no ibuffer user ...

I think it shows the author preference for, if possible,
display *Ibuffer confirmation* in other window that
the one showing Ibuffer.

If the current frame just has a window showing
Ibuffer, then *Ibuffer confirmation* is shown in that
same window:

emacs -Q
M-x ibuffer RET
d d x

emacs -Q
C-x b test RET
M-x ibuffer RET
H
M-x other-frame RET
d d x

If we cannot show *Ibuffer confirmation* in the side window,
because it's not allow to split it, it's more useful to chose
another window, i.e., to follow your patch, instead of signal
an error.

Tino

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Wed, 07 Dec 2016 08:16:02 GMT) Full text and rfc822 format available.

Message #29 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: Mark Oteiza <mvoteiza <at> udel.edu>, Liu Hui <liuhui1610 <at> gmail.com>,
 25115 <at> debbugs.gnu.org
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Wed, 07 Dec 2016 09:15:19 +0100
>> The confirmation buffer appears above the ibuffer buffer.  I doubt that
>> such behavior is intentional but since I'm no ibuffer user ...
>
> I think it shows the author preference for, if possible,
> display *Ibuffer confirmation* in other window that
> the one showing Ibuffer.

Then why not simply split the Ibuffer window itself instead of the last
window of ‘window-list’?

> If the current frame just has a window showing
> Ibuffer, then *Ibuffer confirmation* is shown in that
> same window:
>
> emacs -Q
> M-x ibuffer RET
> d d x

Not here.  That single window gets split.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Mon, 12 Dec 2016 05:23:01 GMT) Full text and rfc822 format available.

Message #32 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: Liu Hui <liuhui1610 <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Mark Oteiza <mvoteiza <at> udel.edu>, 25115 <at> debbugs.gnu.org,
 Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Mon, 12 Dec 2016 13:22:25 +0800
> C-x 2
> C-x o
> M-x ibuffer
> m
> m
> D
>
> The confirmation buffer appears above the ibuffer buffer.  I doubt that
> such behavior is intentional but since I'm no ibuffer user ...

I have seldom noticed this because I usually do C-x 1 
(delete-other-windows) before operating buffers using ibuffer, but 
displaying the confirmation buffer above, or in other unrelated windows, 
is strange indeed.

IMO, displaying the confirmation buffer just above the minibuffer 
waiting for user input, or by splitting ibuffer itself (like Dired*), is 
better.


--------
* I just found Dired seems not to preserve the window height with the 
similar steps, and have submitted a bug report.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Mon, 12 Dec 2016 10:01:01 GMT) Full text and rfc822 format available.

Message #35 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Liu Hui <liuhui1610 <at> gmail.com>
Cc: Mark Oteiza <mvoteiza <at> udel.edu>, 25115 <at> debbugs.gnu.org,
 Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Mon, 12 Dec 2016 10:59:56 +0100
> IMO, displaying the confirmation buffer just above the minibuffer
> waiting for user input, or by splitting ibuffer itself (like Dired*),
> is better.

I leave it to Tino to deal with this.  IIUC ibuffer has a dedicated
community and I don't want to interfere with longstanding behaviors.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Mon, 12 Dec 2016 10:10:02 GMT) Full text and rfc822 format available.

Message #38 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 25115 <at> debbugs.gnu.org, Liu Hui <liuhui1610 <at> gmail.com>,
 Mark Oteiza <mvoteiza <at> udel.edu>, Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Mon, 12 Dec 2016 19:09:32 +0900 (JST)

On Mon, 12 Dec 2016, martin rudalics wrote:

>> IMO, displaying the confirmation buffer just above the minibuffer
>> waiting for user input, or by splitting ibuffer itself (like Dired*),
>> is better.
>
> I leave it to Tino to deal with this.  IIUC ibuffer has a dedicated
> community and I don't want to interfere with longstanding behaviors.
Thank you.  I would like to follow the 'Principle of Minimum Interaction', 
that is, i am happy to modify one file whenever it fix a bug or provide
a new useful feature.  Other than that, i tend to prefer accepting
the original author's design.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25115; Package emacs. (Sat, 12 Feb 2022 08:52:02 GMT) Full text and rfc822 format available.

Message #41 received at 25115 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Liu Hui <liuhui1610 <at> gmail.com>
Cc: 25115 <at> debbugs.gnu.org
Subject: Re: bug#25115: 26.0.50; ibuffer fails to show confirmation buffer
 when there are side windows
Date: Sat, 12 Feb 2022 09:51:37 +0100
Liu Hui <liuhui1610 <at> gmail.com> writes:

> When there are side windows, ibuffer fails to show the comfirmation
> buffer for buffers to be killed.
>
> 1. emacs -Q & create a side window by
> (pop-to-buffer "test"
>                '(display-buffer-in-side-window
>                  (side . right)
>                  (width . 0.2)))
> 2. switch to another buffer and M-x ibuffer
> 3. press 'D', mark two or more buffers for killing
> 4. press 'x'
>
> then an error 'ibuffer-confirm-operation-on: Cannot split side window
> or parent of side window' is issued.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Skimming this bug report, it seems like the reported bug was fixed (and
indeed I can't reproduce it in the current Emacs), and then the
discussion went on to other things, but the bug report was left open, so
I'm closing it now.  If there's anything more to be done here, please
respond to the debbugs address, and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 25115 <at> debbugs.gnu.org and Liu Hui <liuhui1610 <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 12 Feb 2022 08:52: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. (Sat, 12 Mar 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.