From unknown Tue Sep 09 06:48:52 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4386: 23.1; emacsclient -t FILE -vs- server-window Reply-To: Tom Tromey , 4386@debbugs.gnu.org Resent-From: Tom Tromey Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 09 Sep 2009 20:45:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4386 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12525287586353 (code B ref -1); Wed, 09 Sep 2009 20:45:04 +0000 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 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 unknown Tue Sep 09 06:48:52 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4386: 23.1; emacsclient -t FILE -vs- server-window Reply-To: martin rudalics , 4386@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 10 Sep 2009 06:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4386 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4386-submit@emacsbugs.donarmstrong.com id=B4386.125256217531134 (code B ref 4386); Thu, 10 Sep 2009 06:05:04 +0000 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 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 unknown Tue Sep 09 06:48:52 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4386: 23.1; emacsclient -t FILE -vs- server-window Reply-To: Stefan Monnier , 4386@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 10 Sep 2009 13:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4386 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4386-submit@emacsbugs.donarmstrong.com id=B4386.12525901814347 (code B ref 4386); Thu, 10 Sep 2009 13:50:03 +0000 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 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 unknown Tue Sep 09 06:48:52 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4386: 23.1; emacsclient -t FILE -vs- server-window Reply-To: Tom Tromey , 4386@debbugs.gnu.org Resent-From: Tom Tromey Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 10 Sep 2009 16:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4386 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4386-submit@emacsbugs.donarmstrong.com id=B4386.125259810832723 (code B ref 4386); Thu, 10 Sep 2009 16:05:04 +0000 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 References: <4AA894F6.80807@gmx.at> 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