unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread

* Re: Re: Change in list-buffers behavior in 24.4
@ 2015-04-13 12:14     ` martin rudalics
  2015-04-14 12:43       ` Sam Varshavchik
  0 siblings, 1 reply; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread

* Re: Change in list-buffers behavior in 24.4
  2015-04-13 12:14     ` martin rudalics
@ 2015-04-14 12:43       ` Sam Varshavchik
  2015-04-14 14:43         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ 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] 7+ messages in thread

* Re: Change in list-buffers behavior in 24.4
  2015-04-14 12:43       ` Sam Varshavchik
@ 2015-04-14 14:43         ` Eli Zaretskii
  0 siblings, 0 replies; 7+ 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] 7+ messages in thread

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

Thread overview: 7+ 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-14 12:43       ` Sam Varshavchik
2015-04-14 14:43         ` Eli Zaretskii
2015-04-13 14:31     ` Eli Zaretskii

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).