all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Change in list-buffers behavior in 24.4
@ 2015-04-12 16:00 Sam Varshavchik
  2015-04-13  2:44 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Sam Varshavchik @ 2015-04-12 16:00 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

I typically have only one buffer window open, and my programmed muscle  
memory includes the sequence ^X-2-^X-^B.

This used to result in the cursor ending up in one window, and the buffer  
list in the other window.

After upgrading to 24.4, it seems that the cursor now winds up in the buffer  
list's window.

It looks like that with one window open, ^X-^B ends up doing what ^X-2-^X-^B  
used to do. Instead of retraining my fingers, I'm hoping that it's possible  
to flip some knob, and restore the previous behavior, but list-buffers' help  
is silent on this subject matter.


[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Change in list-buffers behavior in 24.4
  2015-04-12 16:00 Change in list-buffers behavior in 24.4 Sam Varshavchik
@ 2015-04-13  2:44 ` Eli Zaretskii
  2015-04-13  3:53   ` Sam Varshavchik
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2015-04-13  2:44 UTC (permalink / raw
  To: help-gnu-emacs

> From: Sam Varshavchik <mrsam@courier-mta.com>
> Date: Sun, 12 Apr 2015 12:00:16 -0400
> 
> I typically have only one buffer window open, and my programmed muscle  
> memory includes the sequence ^X-2-^X-^B.
> 
> This used to result in the cursor ending up in one window, and the buffer  
> list in the other window.
> 
> After upgrading to 24.4, it seems that the cursor now winds up in the buffer  
> list's window.

I don't see it here, I still see the behavior you are used to.

Please try in "emacs -Q".  If the problem disappears there, then the
culprit is one of your customizations, or maybe some init file brought
by whoever packaged Emacs 24 on your platform.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Change in list-buffers behavior in 24.4
  2015-04-13  2:44 ` Eli Zaretskii
@ 2015-04-13  3:53   ` Sam Varshavchik
  2015-04-13 12:14     ` martin rudalics
  2015-04-13 14:31     ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Sam Varshavchik @ 2015-04-13  3:53 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 2616 bytes --]

Eli Zaretskii writes:

> > From: Sam Varshavchik <mrsam@courier-mta.com>
> > Date: Sun, 12 Apr 2015 12:00:16 -0400
> >
> > I typically have only one buffer window open, and my programmed muscle
> > memory includes the sequence ^X-2-^X-^B.
> >
> > This used to result in the cursor ending up in one window, and the buffer
> > list in the other window.
> >
> > After upgrading to 24.4, it seems that the cursor now winds up in the  
> buffer
> > list's window.
>
> I don't see it here, I still see the behavior you are used to.
>
> Please try in "emacs -Q".  If the problem disappears there, then the
> culprit is one of your customizations, or maybe some init file brought
> by whoever packaged Emacs 24 on your platform.

I reviewed my muscle memory again :-)

The change in behavior is when there are already two buffers being shown,  
with different files. So, with two files, a and b:

$ emacs -Q a b

I get just "b" displayed.

^X^B^Xo, cursor down, Enter.

I get the "b" file in the top window, "a" file in the bottom window, with  
the cursor in the "a" file's window.

^X^B

The buffer window now replaces the "a" file, where the cursor was, and the  
cursor now winds up in the buffer list window. That's the different behavior  
than what I'm used to.

Now, if instead of doing ^X^B at this point, I press ^Xo, moving the cursor  
back to the "b" file's window, then ^X^B still opens the list buffer in the  
"a" file's window (also).

So, maybe the change in behavior is that list-buffers' window is "sticky",  
and it tries to open the buffer window in the same window it was previously  
shown in, apparently. If that window is showing another file buffer, even if  
the cursor is still in that file buffer the buffer list window still gets  
opened there, replacing the buffer the cursor was in.

So, depending on window history, ^X^B ends up either opening the buffer list  
window in some other window, than the one the cursor is currently in, or the  
same window where the cursor is. I'm pretty sure that in earlier versions of  
emacs, ^X^B never opened the list buffer in the same window the cursor was,  
at the time the list-buffers command was executed.

And that's where my muscle memory is failing me now. I'm used to having  
multiple windows open; and with the cursor in one of them, ^X^B opening the  
buffer in some other window, and then typing ^Xo to jump into the buffer  
list window. Now, depending on where the buffer-list window was previously  
shown, it will now open in the same window with the cursor, and I realize  
belatedly, after I already jumped somewhere else with ^Xo.

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Change in list-buffers behavior in 24.4
@ 2015-04-13 12:14     ` martin rudalics
  2015-04-13 14:34       ` bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode Eli Zaretskii
  2015-04-14 12:43       ` Change in list-buffers behavior in 24.4 Sam Varshavchik
  0 siblings, 2 replies; 9+ messages in thread
From: martin rudalics @ 2015-04-13 12:14 UTC (permalink / raw
  To: mrsam; +Cc: help-gnu-emacs

 > The change in behavior is when there are already two buffers being shown, with different files. So, with two files, a and b:
 >
 >
 > $ emacs -Q a b
 >
 > I get just "b" displayed.
 >
 > ^X^B^Xo, cursor down, Enter.
 >
 > I get the "b" file in the top window, "a" file in the bottom window, with the cursor in the "a" file's window.
 >
 >
 > ^X^B
 >
 > The buffer window now replaces the "a" file, where the cursor was, and the cursor now winds up in the buffer list window. That's the different behavior than what I'm used to.
 >
 >
 > Now, if instead of doing ^X^B at this point, I press ^Xo, moving the cursor back to the "b" file's window, then ^X^B still opens the list buffer in the "a" file's window (also).
 >
 >
 > So, maybe the change in behavior is that list-buffers' window is "sticky", and it tries to open the buffer window in the same window it was previously shown in, apparently. If that window is showing another file buffer, even if the cursor is still in that file buffer the buffer list window still gets opened there, replacing the buffer the cursor was in.
 >
 >
 > So, depending on window history, ^X^B ends up either opening the buffer list window in some other window, than the one the cursor is currently in, or the same window where the cursor is. I'm pretty sure that in earlier versions of emacs, ^X^B never opened the list buffer in the same window the cursor was, at the time the list-buffers command was executed.
 >
 >
 > And that's where my muscle memory is failing me now. I'm used to having multiple windows open; and with the cursor in one of them, ^X^B opening the buffer in some other window, and then typing ^Xo to jump into the buffer list window. Now, depending on where the buffer-list window was previously shown, it will now open in the same window with the cursor, and I realize belatedly, after I already jumped somewhere else with ^Xo.

Your explanation is correct.  The behavior is intended as a feature but
inherently breaks the behavior of `pop-to-buffer', especially when used
interactively.  I intend to fix this soonish for Emacs 25 and also post
a simple workaround you can use for Emacs 24.4.

Kindly add your observations to this thread

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20206

so we can discuss the solution there.

And please use our conventional notation for key bindings.  That is,
write C-x C-b C-x o instead of ^X^B^Xo and RET instead of ENTER.

Thanks, martin



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Change in list-buffers behavior in 24.4
  2015-04-13  3:53   ` Sam Varshavchik
  2015-04-13 12:14     ` martin rudalics
@ 2015-04-13 14:31     ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2015-04-13 14:31 UTC (permalink / raw
  To: help-gnu-emacs

> From: Sam Varshavchik <mrsam@courier-mta.com>
> Date: Sun, 12 Apr 2015 23:53:59 -0400
> 
> The change in behavior is when there are already two buffers being shown,  
> with different files. So, with two files, a and b:
> 
> $ emacs -Q a b
> 
> I get just "b" displayed.
> 
> ^X^B^Xo, cursor down, Enter.
> 
> I get the "b" file in the top window, "a" file in the bottom window, with  
> the cursor in the "a" file's window.
> 
> ^X^B
> 
> The buffer window now replaces the "a" file, where the cursor was, and the  
> cursor now winds up in the buffer list window. That's the different behavior  
> than what I'm used to.
> 
> Now, if instead of doing ^X^B at this point, I press ^Xo, moving the cursor  
> back to the "b" file's window, then ^X^B still opens the list buffer in the  
> "a" file's window (also).

That's a far cry from your original story.

> So, maybe the change in behavior is that list-buffers' window is "sticky",  
> and it tries to open the buffer window in the same window it was previously  
> shown in, apparently. If that window is showing another file buffer, even if  
> the cursor is still in that file buffer the buffer list window still gets  
> opened there, replacing the buffer the cursor was in.

Yes, the default behavior changed, so you need to customize
display-buffer's strategy to get what you want.

Since Martin requested to continue this discussion on the bug tracker,
I will reply there with a recipe that I think will do what you want.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode
  2015-04-13 12:14     ` martin rudalics
@ 2015-04-13 14:34       ` Eli Zaretskii
  2015-04-14 15:51         ` martin rudalics
  2015-04-14 12:43       ` Change in list-buffers behavior in 24.4 Sam Varshavchik
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2015-04-13 14:34 UTC (permalink / raw
  To: martin rudalics; +Cc: mrsam, 20206

> Date: Mon, 13 Apr 2015 14:14:14 +0200
> From: martin rudalics <rudalics@gmx.at>
> Cc: help-gnu-emacs@gnu.org
> 
>  > The change in behavior is when there are already two buffers being shown, with different files. So, with two files, a and b:
>  >
>  >
>  > $ emacs -Q a b
>  >
>  > I get just "b" displayed.
>  >
>  > ^X^B^Xo, cursor down, Enter.
>  >
>  > I get the "b" file in the top window, "a" file in the bottom window, with the cursor in the "a" file's window.
>  >
>  >
>  > ^X^B
>  >
>  > The buffer window now replaces the "a" file, where the cursor was, and the cursor now winds up in the buffer list window. That's the different behavior than what I'm used to.
>  >
>  >
>  > Now, if instead of doing ^X^B at this point, I press ^Xo, moving the cursor back to the "b" file's window, then ^X^B still opens the list buffer in the "a" file's window (also).
>  >
>  >
>  > So, maybe the change in behavior is that list-buffers' window is "sticky", and it tries to open the buffer window in the same window it was previously shown in, apparently. If that window is showing another file buffer, even if the cursor is still in that file buffer the buffer list window still gets opened there, replacing the buffer the cursor was in.
>  >
>  >
>  > So, depending on window history, ^X^B ends up either opening the buffer list window in some other window, than the one the cursor is currently in, or the same window where the cursor is. I'm pretty sure that in earlier versions of emacs, ^X^B never opened the list buffer in the same window the cursor was, at the time the list-buffers command was executed.
>  >
>  >
>  > And that's where my muscle memory is failing me now. I'm used to having multiple windows open; and with the cursor in one of them, ^X^B opening the buffer in some other window, and then typing ^Xo to jump into the buffer list window. Now, depending on where the buffer-list window was previously shown, it will now open in the same window with the cursor, and I realize belatedly, after I already jumped somewhere else with ^Xo.
> 
> Your explanation is correct.  The behavior is intended as a feature but
> inherently breaks the behavior of `pop-to-buffer', especially when used
> interactively.  I intend to fix this soonish for Emacs 25 and also post
> a simple workaround you can use for Emacs 24.4.

I think the following piece of magic will do what Sam wanted:

  (setq display-buffer-alist
        '(("\\*Buffer List\\*" .
           (display-buffer-pop-up-window '((inhibit-same-window . t))))))

If this is desired for all buffers, the regexp should be changed to
something that matches any buffer name.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Change in list-buffers behavior in 24.4
  2015-04-13 12:14     ` martin rudalics
  2015-04-13 14:34       ` bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode Eli Zaretskii
@ 2015-04-14 12:43       ` Sam Varshavchik
  2015-04-14 14:43         ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Sam Varshavchik @ 2015-04-14 12:43 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 660 bytes --]

martin rudalics writes:

> Your explanation is correct.  The behavior is intended as a feature but
> inherently breaks the behavior of `pop-to-buffer', especially when used
> interactively.  I intend to fix this soonish for Emacs 25 and also post
> a simple workaround you can use for Emacs 24.4.
>
> Kindly add your observations to this thread
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20206
>
> so we can discuss the solution there.

I couldn't find an obvious way to contribute to the thread.

Anyway, I tried adding Eli's suggestions to ~/.emacs; this didn't seem to  
make any difference, even if I temporarily remove everything else from there.



[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Change in list-buffers behavior in 24.4
  2015-04-14 12:43       ` Change in list-buffers behavior in 24.4 Sam Varshavchik
@ 2015-04-14 14:43         ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2015-04-14 14:43 UTC (permalink / raw
  To: help-gnu-emacs

> From: Sam Varshavchik <mrsam@courier-mta.com>
> Date: Tue, 14 Apr 2015 08:43:13 -0400
> 
> Anyway, I tried adding Eli's suggestions to ~/.emacs; this didn't seem to  
> make any difference, even if I temporarily remove everything else from there.

I did test it, and it did work for me.  So something else is at work
here.

In any way, feel free to explore other possible customizations along
the same lines, you will surely find what you want.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode
  2015-04-13 14:34       ` bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode Eli Zaretskii
@ 2015-04-14 15:51         ` martin rudalics
  0 siblings, 0 replies; 9+ messages in thread
From: martin rudalics @ 2015-04-14 15:51 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: mrsam, 20206

 > I couldn't find an obvious way to contribute to the thread.

Please try a "wide reply", "reply to list" or "reply to all" to this
mail.

 > Anyway, I tried adding Eli's suggestions to ~/.emacs; this didn't seem
 > to make any difference, even if I temporarily remove everything else
 > from there.

What Eli meant was more or less

(setq display-buffer-alist '(("\\*Buffer List\\*" nil (inhibit-same-window . t))))

But this is still problematic because it will disallow reusing a window
that already shows the buffer list.  Even if you explicitly ask for it
as in

(setq display-buffer-alist
       '(("\\*Buffer List\\*"
       display-buffer-reuse-window (inhibit-same-window . t))))

it won't work when you do C-x C-b in the selected window and that window
shows the buffer list already.  You might call it a feature but when
`display-buffer' is used programmatically, popping up or using another
window to show a buffer already shown elsewhere is usually considered a
nuisance.

So something better is needed here.

martin





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-14 15:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-12 16:00 Change in list-buffers behavior in 24.4 Sam Varshavchik
2015-04-13  2:44 ` Eli Zaretskii
2015-04-13  3:53   ` Sam Varshavchik
2015-04-13 12:14     ` martin rudalics
2015-04-13 14:34       ` bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode Eli Zaretskii
2015-04-14 15:51         ` martin rudalics
2015-04-14 12:43       ` Change in list-buffers behavior in 24.4 Sam Varshavchik
2015-04-14 14:43         ` Eli Zaretskii
2015-04-13 14:31     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.