From unknown Tue Sep 09 06:47:17 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#4386 <4386@debbugs.gnu.org> To: bug#4386 <4386@debbugs.gnu.org> Subject: Status: 23.1; emacsclient -t FILE -vs- server-window Reply-To: bug#4386 <4386@debbugs.gnu.org> Date: Tue, 09 Sep 2025 13:47:17 +0000 retitle 4386 23.1; emacsclient -t FILE -vs- server-window reassign 4386 emacs submitter 4386 Tom Tromey severity 4386 normal thanks From tromey@redhat.com Wed Sep 9 13:39:17 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 9 Sep 2009 20:39:18 +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 n89KdGdk006350 for ; Wed, 9 Sep 2009 13:39:17 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlTwh-0002sV-W0 for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2009 16:39:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlTwc-0002rM-KI for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2009 16:39:14 -0400 Received: from [199.232.76.173] (port=47213 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlTwc-0002rI-E4 for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2009 16:39:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39620) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlTwb-0000x6-LT for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2009 16:39:10 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n89Kd7Hf020338 for ; Wed, 9 Sep 2009 16:39:07 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n89Kd6O7017563; Wed, 9 Sep 2009 16:39:07 -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 n89Kc02R016239; Wed, 9 Sep 2009 16:38:12 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id B1A0F378182; Wed, 9 Sep 2009 14:37:59 -0600 (MDT) From: Tom Tromey To: bug-gnu-emacs@gnu.org Subject: 23.1; emacsclient -t FILE -vs- server-window Reply-To: Tom Tromey X-Attribution: Tom Date: Wed, 09 Sep 2009 14:37:59 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 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 set server-window in my .emacs: (server-start) (setq server-window (selected-frame)) Recently I decided to try emacsclient -t. So I changed my shell environment to have: EDITOR='emacsclient -t' Then I did a "git commit" in a shell. This brought up emacsclient in the terminal, as expected. However, the commit message buffer was not displayed. I looked, and the buffer was shown in server-window. I wish it was shown in the terminal instead. I tried setting server-window to a function: (setq saved-server-window server-window) (setq server-window (lambda (buffer) (if window-system saved-server-window (selected-frame)))) However, this did not work either. (I did not check but I assume that the terminal is not selected when this is invoked?) 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-26 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: Fundamental Minor modes in effect: server-buffer-clients: (server <4>) shell-dirtrack-mode: t 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 diff-auto-refine-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 Recent input: . SPC t h a t ' s SPC p r e t t y SPC g o o d C-c b C-z n n 2 K i SPC SPC SPC n SPC SPC SPC SPC SPC SPC n C-u C-z o C-z n C-z o f C-v C-v C-v M-< C-x k d f C-v C-v C-v C-v C-v C-x k C-u C-n C-u C-n C-u C-n p p f C-v C-x k d C-x b * c o m C-c c M-p n C-c c M-p n M-> M-v M-v M-v M-v M-> C-z n C-z n M-v C-x b C-r s l y C-r C-r C-g C-c b C-v C-v C-v M-> M-< M-> C-z o SPC SPC SPC C-z o C-x C-f ~ / g n b a s e s r g d g d b . 1 C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-x k C-z o SPC SPC SPC > M S-SPC SPC = M-v M-v M-v C-v C-u C-n C-u C-n SPC C-z o M-> C-z n ESC [ > 1 ; 2 0 0 5 ; 0 c C-x C-b C-x o C-x 1 C-n C-n 1 C-o I n t r o d u c e SPC C-x 1 M-x r e p o r t - e m b Recent messages: Mark set call-interactively: Beginning of buffer [2 times] Mark set Quit Mark set [3 times] call-interactively: End of buffer Opening nntp server on news.gmane.org...done Mark set Compilation finished When done with a buffer, type C-x # Tom From rudalics@gmx.at Wed Sep 9 22:56:15 2009 Received: (at 4386) by emacsbugs.donarmstrong.com; 10 Sep 2009 05:56:15 +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.3 required=4.0 tests=AWL,FOURLA,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 n8A5uD6j031131 for <4386@emacsbugs.donarmstrong.com>; Wed, 9 Sep 2009 22:56:14 -0700 Received: (qmail invoked by alias); 10 Sep 2009 05:56:06 -0000 Received: from 62-47-35-105.adsl.highway.telekom.at (EHLO [62.47.35.105]) [62.47.35.105] by mail.gmx.net (mp055) with SMTP; 10 Sep 2009 07:56:06 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+4JeE2zSG4+QIBM9zyttgzduvlUM5QVEuvQSmR7Y 9mdcAxjLk4Kj/c Message-ID: <4AA894F6.80807@gmx.at> Date: Thu, 10 Sep 2009 07:56:06 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Tom Tromey , 4386@debbugs.gnu.org Subject: Re: bug#4386: 23.1; emacsclient -t FILE -vs- server-window 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.78 > (lambda (buffer) > (if window-system > saved-server-window > (selected-frame)))) The doc-string of `server-window' says If it is a function, it should take one argument (a buffer) and display and select it. where the "and select it" part is obviously silly. Anyway, something in the mood of (lambda (buffer) (let ((window (if window-system saved-server-window (frame-selected-window)))) (set-window-buffer window buffer) (select-window window))) seems more appropriate here. martin From monnier@iro.umontreal.ca Thu Sep 10 06:43:01 2009 Received: (at 4386) by emacsbugs.donarmstrong.com; 10 Sep 2009 13:43: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=-2.8 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.pppoe.ca [206.248.154.183] (may be forged)) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8ADgxef004336 for <4386@emacsbugs.donarmstrong.com>; Thu, 10 Sep 2009 06:43:01 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiIFAEOfqEpFpZBe/2dsb2JhbACBU9xRhBgFh20 X-IronPort-AV: E=Sophos;i="4.44,364,1249272000"; d="scan'208";a="45502288" Received: from 69-165-144-94.dsl.teksavvy.com (HELO pastel.home) ([69.165.144.94]) by ironport2-out.pppoe.ca with ESMTP; 10 Sep 2009 09:41:25 -0400 Received: by pastel.home (Postfix, from userid 20848) id E8B107F5B; Thu, 10 Sep 2009 09:42:53 -0400 (EDT) From: Stefan Monnier To: martin rudalics Cc: 4386@debbugs.gnu.org, Tom Tromey Subject: Re: bug#4386: 23.1; emacsclient -t FILE -vs- server-window Message-ID: References: <4AA894F6.80807@gmx.at> Date: Thu, 10 Sep 2009 09:42:53 -0400 In-Reply-To: <4AA894F6.80807@gmx.at> (martin rudalics's message of "Thu, 10 Sep 2009 07:56:06 +0200") 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 > where the "and select it" part is obviously silly. Anyway, something in > the mood of > (lambda (buffer) > (let ((window > (if window-system > saved-server-window > (frame-selected-window)))) > (set-window-buffer window buffer) > (select-window window))) > seems more appropriate here. I believe checking window-system is wrong. Instead, the test should be whether the current terminal and the saved-server-window are equal. Stefan From tromey@redhat.com Thu Sep 10 08:55:07 2009 Received: (at 4386) by emacsbugs.donarmstrong.com; 10 Sep 2009 15:55:08 +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.0 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8AFt67C032715 for <4386@emacsbugs.donarmstrong.com>; Thu, 10 Sep 2009 08:55:07 -0700 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 n8AFt6S0029928; Thu, 10 Sep 2009 11:55:06 -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 n8AFt5rn002223; Thu, 10 Sep 2009 11:55:05 -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 n8AFt3iu017904; Thu, 10 Sep 2009 11:55:04 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id EEE63378182; Thu, 10 Sep 2009 09:55:02 -0600 (MDT) From: Tom Tromey To: martin rudalics Cc: 4386@debbugs.gnu.org Subject: Re: bug#4386: 23.1; emacsclient -t FILE -vs- server-window References: <4AA894F6.80807@gmx.at> Reply-To: Tom Tromey X-Attribution: Tom Date: Thu, 10 Sep 2009 09:55:02 -0600 In-Reply-To: <4AA894F6.80807@gmx.at> (martin rudalics's message of "Thu, 10 Sep 2009 07:56:06 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 >>>>> "martin" == martin rudalics writes: martin> The doc-string of `server-window' says martin> If it is a function, it should take one argument (a buffer) and martin> display and select it. Oops. I'm sorry I missed this. martin> (lambda (buffer) martin> (let ((window martin> (if window-system martin> saved-server-window martin> (frame-selected-window)))) martin> (set-window-buffer window buffer) martin> (select-window window))) martin> seems more appropriate here. Yeah, this worked. Thank you. Tom From rgm@gnu.org Thu Sep 17 13:50:17 2009 Received: (at control) by emacsbugs.donarmstrong.com; 17 Sep 2009 20:50:18 +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=-5.6 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8HKoGAd029095 for ; Thu, 17 Sep 2009 13:50:17 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MoNvh-00043b-CY; Thu, 17 Sep 2009 16:50:13 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19122.41221.297337.516259@fencepost.gnu.org> Date: Thu, 17 Sep 2009 16:50:13 -0400 From: Glenn Morris To: control Subject: control X-Debbugs-No-Ack: yes severity 4403 minor severity 4432 minor tags 4409 moreinfo reassign 4409 emacs,ns severity 4398 minor reassign 4467 emacs,ns merge 4297 4467 close 4386 close 4399 From unknown Tue Sep 09 06:47:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 16 Oct 2009 14:24:11 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator