GNU bug report logs - #4271
23.1; pop-to-buffer -vs- multiple terminals

Previous Next

Package: emacs;

Reported by: Tom Tromey <tromey <at> redhat.com>

Date: Thu, 27 Aug 2009 02:45:04 UTC

Severity: normal

Tags: moreinfo

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4271 in the body.
You can then email your comments to 4271 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4271; Package emacs. (Thu, 27 Aug 2009 02:45:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tom Tromey <tromey <at> redhat.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 27 Aug 2009 02:45:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Tom Tromey <tromey <at> redhat.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; pop-to-buffer -vs- multiple terminals
Date: Wed, 26 Aug 2009 20:37:44 -0600
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:


I have a long-running emacs on one machine.  It has a couple of frames
on the local X display.

I logged into that machine remotely and ran 'emacsclient -t' on a tty.

When I ran vc-diff on this terminal, I was surprised that I was not
switched to the *vc-diff* buffer.  It turns out that *vc-diff* was in a
window on one of the X frames -- but not visible to me now, using the
tty.

I ran (pop-to-buffer "*vc-diff*") and this did not show the buffer.  I
think that this should ignore frames on other terminals when determining
whether a buffer is visible.


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.


In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.5)
 of 2009-08-24 on x86-2.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10601901
configured using `configure  '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables''

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: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  auto-fill-function: tjt-c++-do-auto-fill
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-spelling-mode: t
  erc-truncate-mode: t
  flyspell-mode: t
  erc-status-mode: t
  erc-services-mode: t
  erc-networks-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
v C-l C-x v d ESC DEL RET C-x 1 = <switch-frame> C-f 
C-f = <switch-frame> = <switch-frame> = <switch-frame> 
= <switch-frame> = <switch-frame> = <switch-frame> 
C-x b * v c d DEL - d i f f TAB RET C-v C-v C-v ESC 
v C-l ESC v ESC v ESC v C-l C-v ESC < C-x C-f b u f 
f e r ESC b s r c / C-e . c RET ESC < C-s p t h r e 
a d . C-a C-l C-k C-k C-k C-x C-s C-x s C-x b RET C-x 
v = C-v ESC [ 2 1 ~ C-c b C-p C-b C-v C-l C-u C-n C-u 
C-n C-u C-n C-l C-u C-n C-u C-n C-l ESC [ 2 0 ~ C-x 
1 ESC [ 2 1 ~ C-c b C-x C-f b u f f e r . c RET C-x 
b * G TAB RET 1 g C-v C-v C-s p a t h c DEL c h C-a 
C-u C-n C-n C-n = ESC > SPC Q y SPC ESC > Q y SPC 5 
0 RET ESC > q s ESC v ESC v ESC v C-l C-u C-p C-p ESC 
g ESC g ESC g ESC g ESC g n n n ESC g ESC g ESC g s 
z C-c b ESC [ 2 1 ~ ESC [ 2 1 ~ ESC [ 2 1 ~ ESC [ 2 
1 ~ C-c b ESC v C-x v = <switch-frame> ESC : ( p o 
p - t o - b u f f e r SPC " * v c - d i f f * " ) RET 
<switch-frame> ESC x r e p o r t - e m TAB b u TAB 
RET

Recent messages:
Saving /home/tromey/.newsrc.eld...done
call-interactively: Beginning of buffer
Opening nntp server on redhat...done
Opening nntp server on news.gmane.org...done
(No changes need to be saved)
Saving /home/tromey/.newsrc.eld...
Saving file /home/tromey/.newsrc.eld...
Wrote /home/tromey/.newsrc.eld
Saving /home/tromey/.newsrc.eld...done
Finding changes in /home/tromey/gnu/Emacs/git-emacs/emacs/src/buffer.c...done
#<buffer *vc-diff*>
Tom




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4271; Package emacs. (Thu, 27 Aug 2009 05:25:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 27 Aug 2009 05:25:05 GMT) Full text and rfc822 format available.

Message #10 received at 4271 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tom Tromey <tromey <at> redhat.com>
Cc: 4271 <at> debbugs.gnu.org
Subject: Re: bug#4271: 23.1; pop-to-buffer -vs- multiple terminals
Date: Thu, 27 Aug 2009 01:17:36 -0400
> I ran (pop-to-buffer "*vc-diff*") and this did not show the buffer.  I
> think that this should ignore frames on other terminals when determining
> whether a buffer is visible.

Does the patch below help?


        Stefan


=== modified file 'lisp/window.el'
--- lisp/window.el	2009-07-24 02:42:43 +0000
+++ lisp/window.el	2009-08-27 05:16:51 +0000
@@ -1307,7 +1307,7 @@
 	(old-frame (selected-frame))
 	new-window new-frame)
     (set-buffer buffer)
-    (setq new-window (display-buffer buffer other-window))
+    (setq new-window (display-buffer buffer other-window 0))
     (unless (eq new-window old-window)
       ;; `display-buffer' has chosen another window, select it.
       (select-window new-window norecord)




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4271; Package emacs. (Thu, 27 Aug 2009 06:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 27 Aug 2009 06:00:05 GMT) Full text and rfc822 format available.

Message #15 received at 4271 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Tom Tromey <tromey <at> redhat.com>, 4271 <at> debbugs.gnu.org
Subject: Re: bug#4271: 23.1; pop-to-buffer -vs- multiple terminals
Date: Thu, 27 Aug 2009 07:52:52 +0200
> When I ran vc-diff on this terminal, I was surprised that I was not
> switched to the *vc-diff* buffer.  It turns out that *vc-diff* was in a
> window on one of the X frames -- but not visible to me now, using the
> tty.
>
> I ran (pop-to-buffer "*vc-diff*") and this did not show the buffer.  I
> think that this should ignore frames on other terminals when determining
> whether a buffer is visible.

Could you please edebug `display-buffer' and find out how the `let' part
below gets executed in your case

     ((let ((frames (or frame
			(and (or use-pop-up-frames
				 display-buffer-reuse-frames
				 (not (last-nonminibuffer-frame)))
			     0)
			(last-nonminibuffer-frame))))
	(setq window-to-use
	      (catch 'found
		;; Search frames for a window displaying BUFFER.  Return
		;; the selected window only if we are allowed to do so.
		(dolist (window (get-buffer-window-list buffer 'nomini frames))
		  (when (or can-use-selected-window
			    (not (eq (selected-window) window)))
		    (throw 'found window))))))

Thanks, martin.



Added tag(s) moreinfo. Request was from Juanma Barranquero <lekktu <at> gmail.com> to control <at> emacsbugs.donarmstrong.com. (Thu, 22 Oct 2009 09:40:16 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4271; Package emacs. (Wed, 20 Jun 2012 06:07:01 GMT) Full text and rfc822 format available.

Message #20 received at 4271 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Tom Tromey <tromey <at> redhat.com>
Cc: 4271 <at> debbugs.gnu.org
Subject: Re: bug#4271: 23.1; pop-to-buffer -vs- multiple terminals
Date: Wed, 20 Jun 2012 02:03:22 -0400
> I ran (pop-to-buffer "*vc-diff*") and this did not show the buffer.  I
> think that this should ignore frames on other terminals when
> determining whether a buffer is visible.

The pop-to-buffer code has been completely rewritten since this bug was
filed, and AFAICT the new code will not reuse a window on a different
terminal unless you specifically force it to.  Closing.




bug closed, send any further explanations to 4271 <at> debbugs.gnu.org and Tom Tromey <tromey <at> redhat.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 20 Jun 2012 06:08:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Jul 2012 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.