From unknown Fri Jun 20 17:57:54 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4271 <4271@debbugs.gnu.org> To: bug#4271 <4271@debbugs.gnu.org> Subject: Status: 23.1; pop-to-buffer -vs- multiple terminals Reply-To: bug#4271 <4271@debbugs.gnu.org> Date: Sat, 21 Jun 2025 00:57:54 +0000 retitle 4271 23.1; pop-to-buffer -vs- multiple terminals reassign 4271 emacs submitter 4271 Tom Tromey severity 4271 normal tag 4271 moreinfo thanks From tromey@redhat.com Wed Aug 26 19:37:57 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 27 Aug 2009 02:37:57 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7R2btxG003478 for ; Wed, 26 Aug 2009 19:37:57 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgUs7-0001xR-8s for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2009 22:37:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgUs1-0001lU-7i for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2009 22:37:53 -0400 Received: from [199.232.76.173] (port=51834 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgUs0-0001kc-QA for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2009 22:37:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7540) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgUs0-000272-3t for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2009 22:37:48 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7R2bkNE003283 for ; Wed, 26 Aug 2009 22:37:46 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7R2bjpN005154; Wed, 26 Aug 2009 22:37:46 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7R2bicj026809; Wed, 26 Aug 2009 22:37:45 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 518CD3782A9; Wed, 26 Aug 2009 20:37:44 -0600 (MDT) From: Tom Tromey To: bug-gnu-emacs@gnu.org Subject: 23.1; pop-to-buffer -vs- multiple terminals Reply-To: Tom Tromey X-Attribution: Tom Date: Wed, 26 Aug 2009 20:37:44 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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-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 = C-f C-f = = = = = = 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 = ESC : ( p o p - t o - b u f f e r SPC " * v c - d i f f * " ) RET 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 # Tom From monnier@iro.umontreal.ca Wed Aug 26 22:17:44 2009 Received: (at 4271) by emacsbugs.donarmstrong.com; 27 Aug 2009 05:17:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7R5Hgm2027249 for <4271@emacsbugs.donarmstrong.com>; Wed, 26 Aug 2009 22:17:44 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As8EAKuzlUpFpYuS/2dsb2JhbACBU9Y/hBoFh2M X-IronPort-AV: E=Sophos;i="4.44,283,1249272000"; d="scan'208";a="44280536" Received: from 69-165-139-146.dsl.teksavvy.com (HELO ceviche.home) ([69.165.139.146]) by ironport2-out.teksavvy.com with ESMTP; 27 Aug 2009 01:16:42 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 23C9BB40F3; Thu, 27 Aug 2009 01:17:36 -0400 (EDT) From: Stefan Monnier To: Tom Tromey Cc: 4271@debbugs.gnu.org Subject: Re: bug#4271: 23.1; pop-to-buffer -vs- multiple terminals Message-ID: References: Date: Thu, 27 Aug 2009 01:17:36 -0400 In-Reply-To: (Tom Tromey's message of "Wed, 26 Aug 2009 20:37:44 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > 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) From rudalics@gmx.at Wed Aug 26 22:53:01 2009 Received: (at 4271) by emacsbugs.donarmstrong.com; 27 Aug 2009 05:53:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7R5qwqD032167 for <4271@emacsbugs.donarmstrong.com>; Wed, 26 Aug 2009 22:53:00 -0700 Received: (qmail invoked by alias); 27 Aug 2009 05:52:53 -0000 Received: from 62-47-59-84.adsl.highway.telekom.at (EHLO [62.47.59.84]) [62.47.59.84] by mail.gmx.net (mp026) with SMTP; 27 Aug 2009 07:52:53 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/0+r52WCT0Xm5M52U2vLzVSZUqnifU6f52RCXNn0 ffcdwDW4ZvXyoB Message-ID: <4A961F34.8080003@gmx.at> Date: Thu, 27 Aug 2009 07:52:52 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Tom Tromey , 4271@debbugs.gnu.org Subject: Re: bug#4271: 23.1; pop-to-buffer -vs- multiple terminals References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 > 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. From lekktu@gmail.com Thu Oct 22 02:35:31 2009 Received: (at control) by emacsbugs.donarmstrong.com; 22 Oct 2009 09:35:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=AWL,MISSING_SUBJECT, MURPHY_DRUGS_REL8,NOSUBJECT,VALID_BTS_CONTROL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-fx0-f213.google.com (mail-fx0-f213.google.com [209.85.220.213]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9M9ZTNW004084 for ; Thu, 22 Oct 2009 02:35:31 -0700 Received: by fxm9 with SMTP id 9so9696363fxm.1 for ; Thu, 22 Oct 2009 02:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=8EmqKmTQZFxRHmBqMf0mAHPBq3MFliknc0lztWoJq6Y=; b=HxQYupT4FFltZz1ItMJj0h3XTFYNK5e7ryT0Cek2T3YESYQLNQM8G9V9i2CKiMAEbc EvYuLj8f7w1qApk14qvzihjcYCGQUOU+1DBevO5UhGKLQhzQ6+vBiuihHNGFYaXeeEYe kJYg0CmwEGM5xp9e/Qz4pt4br7Ml4TcpNJkWo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=Y5ybjjcxlLdLgAFAm7oQwPF4q6enZ/vhDgoBesbKLPsYfKZBy2gNxuVUArd1lZsA9C Mqc9bcUQhekOxrkhuBrM/oRLNjZDm8m0DPtCnEMhvvK6rKfs9H9j6QMJR6VObUwlfUeo 7VB35jQ8OYFrwvpcsbgPdQA8bmjmcb1XFRU14= MIME-Version: 1.0 Received: by 10.239.145.8 with SMTP id q8mr761204hba.122.1256204124158; Thu, 22 Oct 2009 02:35:24 -0700 (PDT) From: Juanma Barranquero Date: Thu, 22 Oct 2009 11:35:04 +0200 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 reassign 4326 emacs,ns merge 4261 4434 merge 1589 3359 4207 merge 3829 4077 tags 4781 + patch tags 4747 + patch tags 4579 + patch tags 4471 + patch tags 4434 + patch tags 4234 + patch tags 4221 + patch tags 4147 + patch tags 4144 + patch tags 4139 + patch tags 4023 + patch tags 4736 + moreinfo unreproducible tags 4547 + notabug tags 4451 + notabug tags 4448 + moreinfo tags 4427 + moreinfo tags 4373 + notabug tags 4360 + notabug tags 4271 + moreinfo tags 4236 + moreinfo tags 4143 + moreinfo unreproducible tags 4120 + moreinfo unreproducible tags 4070 + moreinfo unreproducible severity 4422 wishlist severity 4396 minor severity 4394 minor severity 4341 wishlist severity 4300 minor severity 4263 minor severity 4178 minor severity 4172 wishlist severity 4110 wishlist severity 4056 wishlist close 4772 close 4700 close 4599 close 4515 close 4463 close 4445 close 4395 close 4334 close 4289 close 4219 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 20 02:06:50 2012 Received: (at 4271) by debbugs.gnu.org; 20 Jun 2012 06:06:50 +0000 Received: from localhost ([127.0.0.1]:49288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ShE42-000711-9o for submit@debbugs.gnu.org; Wed, 20 Jun 2012 02:06:50 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:59223) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ShE40-00070t-Lh for 4271@debbugs.gnu.org; Wed, 20 Jun 2012 02:06:49 -0400 Received: from cyd by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1ShE0g-0004jU-Ge; Wed, 20 Jun 2012 02:03:22 -0400 From: Chong Yidong To: Tom Tromey Subject: Re: bug#4271: 23.1; pop-to-buffer -vs- multiple terminals Date: Wed, 20 Jun 2012 02:03:22 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 4271 Cc: 4271@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 20 02:08:00 2012 Received: (at control) by debbugs.gnu.org; 20 Jun 2012 06:08:00 +0000 Received: from localhost ([127.0.0.1]:49292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ShE59-00072r-ME for submit@debbugs.gnu.org; Wed, 20 Jun 2012 02:08:00 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:59249) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ShE58-00072l-1X for control@debbugs.gnu.org; Wed, 20 Jun 2012 02:07:58 -0400 Received: from cyd by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1ShE1o-0004lj-9X for control@debbugs.gnu.org; Wed, 20 Jun 2012 02:04:32 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 4271 Date: Wed, 20 Jun 2012 02:04:32 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 4271 thanks From unknown Fri Jun 20 17:57:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 18 Jul 2012 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator