Subject: 23.0.60; Iswitchb-buffer switches to wrong buffer for Emacsclient over SSH

From: Nobuko Three <[email-masked]>
Date: Mon, 29 Jun 2009 09:43:49 -0700 (PDT)

When using emacsclient over SSH with iswitchb-mode on, the default other
buffer (the buffer you get from C-x b RET) is not what you want. It switches
to the buffer (let's say remote.txt) that is displayed in the Emacs frame on
the remote side (SSH server side). Which means that when you are frequently
switching between foo.txt and bar.txt, you don't press C-x b RET, you must
press C-x b C-s RET because remote.txt keeps showing up on top every time
you press C-x b.

** Steps to reproduce the bug

;; contents of the minimal init file ~/min-test.el
(require 'server)
(server-start)
(iswitchb-mode 1)
;; end

$ emacs -Q -l ~/min-test.el &   # start emacs. minimal initialization.
$ ssh -X localhost   # ssh into self
$ emacsclient -c &   # start another emacs frame from within the ssh
session.

The first emacs frame should display *scratch* buffer.
Within the second emacs frame (the one launched from emacsclient -c), open
foo.txt and then bar.txt and now press C-x b (which is bound to
iswitchb-buffer, iswitch mode's version of switch-to-buffer) and you see
that *scratch* is the top, not foo.txt.

M-x switch-to-buffer is fine. It's a bug of iswitchb mode.

Bug disappears when emacsclient is used without SSH

** Workarounds

Switch to the wrong buffer that iswitchb mode suggest (from the first
emacsclient frame), open a new frame and work from that new frame. The first
emacsclient frame should be just left alone until quit.

** etc

In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.14.3)
 of 2008-10-14 on rothera, modified by Debian
 (emacs-snapshot package, version 1:20081013-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
configured using `configure  '--build' 'i486-linux-gnu' '--host'
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp'
'--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu'
'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000
-g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: 
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

-- 
View this message in context: http://www.nabble.com/23.0.60--Iswitchb-buffer-switches-to-wrong-buffer-for-Emacsclient-over-SSH-tp24257668p24257668.html
Sent from the Emacs - Bugs mailing list archive at Nabble.com.