all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>
To: 8799@debbugs.gnu.org
Subject: bug#8799: 23.3; iswitchb
Date: Sat, 04 Jun 2011 10:42:00 +0100	[thread overview]
Message-ID: <E1QSnMo-0004Am-Xm@ppsw-51.csi.cam.ac.uk> (raw)

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





             reply	other threads:[~2011-06-04  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-04  9:42 Stephen Eglen [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1QSnMo-0004Am-Xm@ppsw-51.csi.cam.ac.uk \
    --to=s.j.eglen@damtp.cam.ac.uk \
    --cc=8799@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.