unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8799: 23.3; iswitchb
@ 2011-06-04  9:42 Stephen Eglen
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Eglen @ 2011-06-04  9:42 UTC (permalink / raw)
  To: 8799

The following bug report was sent to me by Trevor Spiteri (thank you!).

----------------------------------------------------------------------
The documentation for iswitchb-window-buffer-p states that it should 
return nil if BUFFER is visible in the current frame. Sometimes this 
does not happen.

Suppose I am in a frame with two windows, one for buffer1 and the other 
for buffer2, and I am currently in the window for buffer1. If I type:
C-x b b u f f e r 2 <return>
this works correctly, iswitchb-window-buffer-p returns nil, and 
consequently both windows will show buffer2.

If instead of <return> I use C-j, that is, I am in the window for 
buffer1 and buffer2 is in the other window, and I type:
C-x b b u f f e r 2 C-j
iswitchb-window-buffer-p does not return nil, and consequently not both 
windows will show buffer2, but the window for buffer2 becomes the 
current window.

To fix this, in the defun for iswitchb-window-buffer-p, the line

     (if (memq buffer blist)

should be changed to:

     (if (member buffer blist)

What I guess is happening is that using <return>, buffer is a string 
obtained from the list of buffers, so it is eq to the corresponding 
element in blist. When C-j is used, buffer is taken from user input, and 
is thus not eq to the corresponding element in blist. Although it is not 
eq, it is still equal, so changing memq to member fixes the issue.
----------------------------------------------------------------------





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

* bug#8799: 23.3; iswitchb
       [not found] <mailman.217.1307180587.836.bug-gnu-emacs@gnu.org>
@ 2011-06-04 15:14 ` Deniz Dogan
  2011-08-21  3:13   ` Chong Yidong
  0 siblings, 1 reply; 3+ messages in thread
From: Deniz Dogan @ 2011-06-04 15:14 UTC (permalink / raw)
  To: Stephen Eglen; +Cc: 8799

On 2011-06-04 11:42, Stephen Eglen wrote:
> The following bug report was sent to me by Trevor Spiteri (thank you!).
>
> ----------------------------------------------------------------------
> The documentation for iswitchb-window-buffer-p states that it should
> return nil if BUFFER is visible in the current frame. Sometimes this
> does not happen.
>
> Suppose I am in a frame with two windows, one for buffer1 and the other
> for buffer2, and I am currently in the window for buffer1. If I type:
> C-x b b u f f e r 2<return>
> this works correctly, iswitchb-window-buffer-p returns nil, and
> consequently both windows will show buffer2.
>
> If instead of<return>  I use C-j, that is, I am in the window for
> buffer1 and buffer2 is in the other window, and I type:
> C-x b b u f f e r 2 C-j
> iswitchb-window-buffer-p does not return nil, and consequently not both
> windows will show buffer2, but the window for buffer2 becomes the
> current window.
>
> To fix this, in the defun for iswitchb-window-buffer-p, the line
>
>       (if (memq buffer blist)
>
> should be changed to:
>
>       (if (member buffer blist)
>
> What I guess is happening is that using<return>, buffer is a string
> obtained from the list of buffers, so it is eq to the corresponding
> element in blist. When C-j is used, buffer is taken from user input, and
> is thus not eq to the corresponding element in blist. Although it is not
> eq, it is still equal, so changing memq to member fixes the issue.
> ----------------------------------------------------------------------
>
>
>

I have pushed a fix for this to emacs-trunk, but I afterwards realized I 
should have pushed it to emacs-23.  Could someone knowledgeable fix this 
for me?

Thanks





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

* bug#8799: 23.3; iswitchb
  2011-06-04 15:14 ` bug#8799: 23.3; iswitchb Deniz Dogan
@ 2011-08-21  3:13   ` Chong Yidong
  0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2011-08-21  3:13 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: 8799, Stephen Eglen

Deniz Dogan <deniz@dogan.se> writes:

> I have pushed a fix for this to emacs-trunk, but I afterwards realized
> I should have pushed it to emacs-23.  Could someone knowledgeable fix
> this for me?

Sure, done.





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

end of thread, other threads:[~2011-08-21  3:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.217.1307180587.836.bug-gnu-emacs@gnu.org>
2011-06-04 15:14 ` bug#8799: 23.3; iswitchb Deniz Dogan
2011-08-21  3:13   ` Chong Yidong
2011-06-04  9:42 Stephen Eglen

Code repositories for project(s) associated with this public inbox

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

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