all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#4271: 23.1; pop-to-buffer -vs- multiple terminals
@ 2009-08-27  2:37 Tom Tromey
  2009-08-27  5:17 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tom Tromey @ 2009-08-27  2:37 UTC (permalink / raw)
  To: bug-gnu-emacs


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@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-bu
 ffer-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






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

* bug#4271: 23.1; pop-to-buffer -vs- multiple terminals
  2009-08-27  2:37 bug#4271: 23.1; pop-to-buffer -vs- multiple terminals Tom Tromey
@ 2009-08-27  5:17 ` Stefan Monnier
  2009-08-27  5:52 ` martin rudalics
  2012-06-20  6:03 ` Chong Yidong
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2009-08-27  5:17 UTC (permalink / raw)
  To: Tom Tromey; +Cc: 4271

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






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

* bug#4271: 23.1; pop-to-buffer -vs- multiple terminals
  2009-08-27  2:37 bug#4271: 23.1; pop-to-buffer -vs- multiple terminals Tom Tromey
  2009-08-27  5:17 ` Stefan Monnier
@ 2009-08-27  5:52 ` martin rudalics
  2012-06-20  6:03 ` Chong Yidong
  2 siblings, 0 replies; 4+ messages in thread
From: martin rudalics @ 2009-08-27  5:52 UTC (permalink / raw)
  To: Tom Tromey, 4271

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





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

* bug#4271: 23.1; pop-to-buffer -vs- multiple terminals
  2009-08-27  2:37 bug#4271: 23.1; pop-to-buffer -vs- multiple terminals Tom Tromey
  2009-08-27  5:17 ` Stefan Monnier
  2009-08-27  5:52 ` martin rudalics
@ 2012-06-20  6:03 ` Chong Yidong
  2 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2012-06-20  6:03 UTC (permalink / raw)
  To: Tom Tromey; +Cc: 4271

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





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

end of thread, other threads:[~2012-06-20  6:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-27  2:37 bug#4271: 23.1; pop-to-buffer -vs- multiple terminals Tom Tromey
2009-08-27  5:17 ` Stefan Monnier
2009-08-27  5:52 ` martin rudalics
2012-06-20  6:03 ` Chong Yidong

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.