From unknown Fri Jun 20 07:14:25 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#11102 <11102@debbugs.gnu.org> To: bug#11102 <11102@debbugs.gnu.org> Subject: Status: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process Reply-To: bug#11102 <11102@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:14:25 +0000 retitle 11102 24.0.94; C-x C-c from a client frame sometimes kills the whol= e Emacs process reassign 11102 emacs submitter 11102 Dani Moncayo severity 11102 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 27 15:28:19 2012 Received: (at submit) by debbugs.gnu.org; 27 Mar 2012 19:28:19 +0000 Received: from localhost ([127.0.0.1]:41599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCc41-0005Vq-7T for submit@debbugs.gnu.org; Tue, 27 Mar 2012 15:28:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33058) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCc3T-0005Up-C5 for submit@debbugs.gnu.org; Tue, 27 Mar 2012 15:28:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCbZB-0007Az-4g for submit@debbugs.gnu.org; Tue, 27 Mar 2012 14:56:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, GAPPY_SUBJECT, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:55358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCbZA-0007As-V6 for submit@debbugs.gnu.org; Tue, 27 Mar 2012 14:56:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCbZ9-0007xq-Bl for bug-gnu-emacs@gnu.org; Tue, 27 Mar 2012 14:56:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCbZ6-0007AD-Nw for bug-gnu-emacs@gnu.org; Tue, 27 Mar 2012 14:56:22 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:38275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCbZ6-00079m-GJ for bug-gnu-emacs@gnu.org; Tue, 27 Mar 2012 14:56:20 -0400 Received: by obbta14 with SMTP id ta14so267468obb.0 for ; Tue, 27 Mar 2012 11:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=bj/ivKHEHx/DmpMMjtQRsHSigO1noxqA12LrPd1yQHs=; b=hQxPIt5wvmtbMqSQKbxcKi4QutICvGX58PxMSzGxIAe8XPT2tKB05zRkvzGxMf1Psa fFYFHgdZmiz9NxaZiw0iVFtyTy5JC/KEfDboIDpmEtFvv1+M3i13fZjIuC7VP8iDjxX5 TTWvvMQTFvJ0ybWuTw4fwuFePLauXrmv0hTvuw+oBIg/hN5KjwhqBchwIR/JVyjz9cPx NYWlmM232pm/QK9zo+aI8kWXVteN6cxTrfAysFRSajohrlUTNUGTTZ2Et/qLyowvhJ5W IVW8WbLCFjSMEQJ6QaPT5ISPZoH4M1q7zrG9XvGHITxnEqR83XSz0Qpi40OXH4EKv2FV IBJg== MIME-Version: 1.0 Received: by 10.182.192.36 with SMTP id hd4mr34214350obc.60.1332874578711; Tue, 27 Mar 2012 11:56:18 -0700 (PDT) Received: by 10.60.118.69 with HTTP; Tue, 27 Mar 2012 11:56:18 -0700 (PDT) Date: Tue, 27 Mar 2012 20:56:18 +0200 Message-ID: Subject: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process From: Dani Moncayo To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: submit 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: -4.2 (----) Hi, Here's a recipe: 0. emacs -Q 1. M-x server-start >From some terminal: 2. emacsclient -c -n some-file On the new Emacs frame just created: 3. C-x C-c --> Expected behavior: The new frame is deleted, but not the server frame [1]. --> Observed behavior: Both frames are deleted (i.e. the whole Emacs process). BTW, if I omit "some-file" in step #2 (so that the new frame shows the *scratch* buffer), the observed behavior is the expected one. --- Footnotes: ------ [1] Quotation from (info "(emacs)emacsclient Options"): If you type `C-x C-c' (`save-buffers-kill-terminal') in an Emacs frame created with `emacsclient', via the `-c' or `-t' options, Emacs deletes the frame instead of killing the Emacs process itself. [...] In GNU Emacs 24.0.94.1 (i386-mingw-nt6.1.7601) of 2012-03-23 on DANI-PC Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --with-gcc (4.6) --no-opt --enable-checking --cflags -IC:/emacs/libs/giflib-4.1.4-1/include -IC:/emacs/libs/gnutls-3.0.16/include -IC:/emacs/libs/jpeg-6b-4/include -IC:/emacs/libs/libpng-1.4.10 -IC:/emacs/libs/libxpm-3.5.8/include -IC:/emacs/libs/libxpm-3.5.8/src -IC:/emacs/libs/tiff-3.8.2-1/include -IC:/emacs/libs/zlib-1.2.6' -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 13:33:45 2012 Received: (at 11102) by debbugs.gnu.org; 30 Mar 2012 17:33:45 +0000 Received: from localhost ([127.0.0.1]:47270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDfhp-0000H4-Cy for submit@debbugs.gnu.org; Fri, 30 Mar 2012 13:33:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:57661) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDfhe-0000Gm-4E for 11102@debbugs.gnu.org; Fri, 30 Mar 2012 13:33:43 -0400 Received: from bb121-6-72-34.singnet.com.sg ([121.6.72.34]:57266 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SDfD4-0002Gk-RG; Fri, 30 Mar 2012 13:01:59 -0400 From: Chong Yidong To: Dani Moncayo Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process References: Date: Sat, 31 Mar 2012 01:01:51 +0800 In-Reply-To: (Dani Moncayo's message of "Tue, 27 Mar 2012 20:56:18 +0200") Message-ID: <87obreaups.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 11102 Cc: 11102@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: -5.0 (-----) Dani Moncayo writes: > 0. emacs -Q > 1. M-x server-start > > From some terminal: > 2. emacsclient -c -n some-file > > On the new Emacs frame just created: > 3. C-x C-c > > --> Expected behavior: The new frame is deleted, but not the server frame [1]. > --> Observed behavior: Both frames are deleted (i.e. the whole Emacs process). I can't reproduce this with latest trunk (x86_64-unknown-linux-gnu, GTK+ 2.24.6). Maybe this is Windows specific? From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 14:17:11 2012 Received: (at 11102) by debbugs.gnu.org; 30 Mar 2012 18:17:11 +0000 Received: from localhost ([127.0.0.1]:47309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDgNn-0001Kw-6Y for submit@debbugs.gnu.org; Fri, 30 Mar 2012 14:17:10 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:60934) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDgNb-0001KJ-9v for 11102@debbugs.gnu.org; Fri, 30 Mar 2012 14:17:05 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1P00600L577T00@a-mtaout22.012.net.il> for 11102@debbugs.gnu.org; Fri, 30 Mar 2012 20:45:20 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.100.223]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1P005L1LBIM7H0@a-mtaout22.012.net.il>; Fri, 30 Mar 2012 20:45:19 +0300 (IDT) Date: Fri, 30 Mar 2012 20:45:19 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: <87obreaups.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong , Juanma Barranquero Message-id: <83wr62yocw.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, dmoncayo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Chong Yidong > Date: Sat, 31 Mar 2012 01:01:51 +0800 > Cc: 11102@debbugs.gnu.org > > Dani Moncayo writes: > > > 0. emacs -Q > > 1. M-x server-start > > > > From some terminal: > > 2. emacsclient -c -n some-file > > > > On the new Emacs frame just created: > > 3. C-x C-c > > > > --> Expected behavior: The new frame is deleted, but not the server frame [1]. > > --> Observed behavior: Both frames are deleted (i.e. the whole Emacs process). > > I can't reproduce this with latest trunk (x86_64-unknown-linux-gnu, GTK+ > 2.24.6). Maybe this is Windows specific? It most probably is. Juanma, could you take a look, please? From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 16:30:22 2012 Received: (at 11102) by debbugs.gnu.org; 30 Mar 2012 20:30:22 +0000 Received: from localhost ([127.0.0.1]:59736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDiSk-0003iH-6i for submit@debbugs.gnu.org; Fri, 30 Mar 2012 16:30:22 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:55074) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDiSj-0003i7-1S for 11102@debbugs.gnu.org; Fri, 30 Mar 2012 16:30:21 -0400 Received: by pbbrq13 with SMTP id rq13so2035382pbb.3 for <11102@debbugs.gnu.org>; Fri, 30 Mar 2012 13:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=dldn90MQvqVxQ9+zuAxQ8kRgDF+QUJjnwxZnoJO9wt8=; b=CO7pU6SAsL3mwCNBDPZiTe9t1r31t1gCRS6W+/UoP4Faqg9X7kO9kRX48qqNidmq5i OiaC8MMLzK/slb6kT7BxU0ynmdrcDL+rjTR9jeeBlwf6eIDj/d0DynYYGkGUALJTUS8b +XGtsDKjYFUnPSgJrbaei747snR3ArzwKdOgJrBHgqywntI47FyJ34tNCbGSpQx4IzxU N1/PpooXqmRO1tgfYyb2r6lHIQhFpEbWiEQdtabTifMMCf11CoQH04cxOhDWVvEPgooO tSIuWN0IahkSO4nRXCGKMjpyxAFXRZt2kMv0K66TEVLet1BYNmQybH6fOHUsn/FdwTia T/Sg== Received: by 10.68.229.73 with SMTP id so9mr187933pbc.163.1333139419397; Fri, 30 Mar 2012 13:30:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.162.20 with HTTP; Fri, 30 Mar 2012 13:29:37 -0700 (PDT) In-Reply-To: <83wr62yocw.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 30 Mar 2012 22:29:37 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, Chong Yidong , dmoncayo@gmail.com 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: -0.6 (/) On Fri, Mar 30, 2012 at 19:45, Eli Zaretskii wrote: > It most probably is. At least, it is repeatable on Windows. >=C2=A0Juanma, could you take a look, please? Yes, I was planning to delve into it during the weekend. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 12 14:13:36 2012 Received: (at 11102) by debbugs.gnu.org; 12 Apr 2012 18:13:36 +0000 Received: from localhost ([127.0.0.1]:54664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIOWV-000517-Ur for submit@debbugs.gnu.org; Thu, 12 Apr 2012 14:13:36 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:56148) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIOWT-00050z-FU for 11102@debbugs.gnu.org; Thu, 12 Apr 2012 14:13:33 -0400 Received: by dang27 with SMTP id g27so3576042dan.29 for <11102@debbugs.gnu.org>; Thu, 12 Apr 2012 11:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=OUED6ZAfvpAEbxmIMvPd0j34uDfawffA3oLW581hEl8=; b=wVHA5tFbdQNuCZccaqvH4CWMYQOIJOnHYCF8beGQw4V1t9KL2hhtLAjrSac5AoM6dn T+6zf8XPvMLiPLEor0OlJ6x2bvtPjFcmg4YygmyF0lsjRpNw2ie8Qa+CLSL7a+38iBo3 MjfyXUPxafmLyknWHc8XopucVEJjADQgdXbpY45UQc6q63Yy0qskjyU5Elq8C0pi9Bsp pW1G2K7AbMLm3aXVp9Gu05GJTOt2klcQT5jnLtthx0nc1ci+/xyeJOGfj+qjWe0wumRy /+H4h2/VkpKKmvUiwYOVkYmk1LrFWBFbvmFB0WO5R7WDVcq89DU5fO/lq10SO3MFU1hl meyA== Received: by 10.68.227.73 with SMTP id ry9mr4555711pbc.33.1334254338468; Thu, 12 Apr 2012 11:12:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.204.14 with HTTP; Thu, 12 Apr 2012 11:11:38 -0700 (PDT) In-Reply-To: <83wr62yocw.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> From: Juanma Barranquero Date: Thu, 12 Apr 2012 20:11:38 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, Chong Yidong , dmoncayo@gmail.com 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: -0.6 (/) On Fri, Mar 30, 2012 at 19:45, Eli Zaretskii wrote: > It most probably is. =C2=A0Juanma, could you take a look, please? A little after current_frame is forced to 0 on Windows (in the -c / -t case= s): #ifdef WINDOWSNT /* Emacs on Windows does not support GUI and console frames in the same instance. So, it makes sense to treat the -t and -c options as equivalent, and open a new frame regardless of whether the running instance is GUI or console. Ideally, we would only set tty =3D 1 when the instance is running in a console, but alas we don't know that. The simplest workaround is to always ask for a tty frame, and let server.el check whether it makes sense. */ if (tty || !current_frame) { display =3D (const char *) ttyname (fileno (stdout)); current_frame =3D 0; tty =3D 1; } #endif there's this bit of code (non-WINDOWSNT-specific): /* --no-wait implies --current-frame on ttys when there are file arguments or expressions given. */ if (nowait && tty && argc - optind > 0) current_frame =3D 1; which causes the bug. I'm not sure I understand the logic after that code, and even less sure it makes sense on Windows. WDYT? =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 10:41:45 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 14:41:45 +0000 Received: from localhost ([127.0.0.1]:57362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIhh2-0002DQ-Hi for submit@debbugs.gnu.org; Fri, 13 Apr 2012 10:41:44 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:43197) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIhgy-0002DG-6g for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 10:41:41 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2F002009X5Q000@a-mtaout22.012.net.il> for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 17:40:20 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2F0022BA3718P0@a-mtaout22.012.net.il>; Fri, 13 Apr 2012 17:40:20 +0300 (IDT) Date: Fri, 13 Apr 2012 17:38:20 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: To: Juanma Barranquero Message-id: <83mx6f3der.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, cyd@gnu.org, dmoncayo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Juanma Barranquero > Date: Thu, 12 Apr 2012 20:11:38 +0200 > Cc: Chong Yidong , dmoncayo@gmail.com, 11102@debbugs.g= nu.org >=20 > On Fri, Mar 30, 2012 at 19:45, Eli Zaretskii wrote: >=20 > > It most probably is. =C2=A0Juanma, could you take a look, please? >=20 > A little after current_frame is forced to 0 on Windows (in the -c /= -t cases): >=20 > #ifdef WINDOWSNT > /* Emacs on Windows does not support GUI and console frames in th= e same > instance. So, it makes sense to treat the -t and -c options a= s > equivalent, and open a new frame regardless of whether the run= ning > instance is GUI or console. Ideally, we would only set tty = =3D 1 when > the instance is running in a console, but alas we don't know t= hat. > The simplest workaround is to always ask for a tty frame, and = let > server.el check whether it makes sense. */ > if (tty || !current_frame) > { > display =3D (const char *) ttyname (fileno (stdout)); > current_frame =3D 0; > tty =3D 1; > } > #endif >=20 > there's this bit of code (non-WINDOWSNT-specific): >=20 > /* --no-wait implies --current-frame on ttys when there are file > arguments or expressions given. */ > if (nowait && tty && argc - optind > 0) > current_frame =3D 1; >=20 > which causes the bug. I'm not sure I understand the logic after tha= t > code, and even less sure it makes sense on Windows. WDYT? In that case, I don't understand why did Dani expect something different from what he saw. I see the same behavior on GNU/Linux: if emacsclient is invoked with -n, "C-x C-c" kills Emacs. Perhaps the bug is that we create a new frame on Windows even though the server receives the -current-frame parameter. Why doesn't server.el on Windows honor that parameter? As for the logic behind the above code, AFAIU -n means emacsclient is used as a way of asking Emacs to visit a file without any special handling; in particular, "C-x #" does _not_ kill the buffer visiting that file. So killing the entire session upon "C-x C-c" makes sense in this case. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 11:21:57 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 15:21:57 +0000 Received: from localhost ([127.0.0.1]:57466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIiJx-00039U-BG for submit@debbugs.gnu.org; Fri, 13 Apr 2012 11:21:57 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:42464) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIiJv-00039N-Li for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 11:21:56 -0400 Received: by obbtb4 with SMTP id tb4so4301577obb.3 for <11102@debbugs.gnu.org>; Fri, 13 Apr 2012 08:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=6yrgXSpkxax7swpAgPQHFft1II0p3FyxsCJ/T3HPRLA=; b=uDrQhzOv0gd4W6phovZmmxzDXR8NbB9eM7xbL0uMrk0yJk3xHTe3oPTYasKIiHm65S qkqltExi77K1mcBv37HVvyBJsYJQS2/703P8sqmeUU+toaQIlDfRel0ZCo6tAubVsIc1 5f46hlRJiqz/t8x8vB69rDgdlLWygQsrR6IbmopKurKEvMyl0uvkp3GBDlw/Y63alefj DYNrUBHW9EynGEYbj+IXvI2h4ahiPz0WgmqNx6vEGkUa2QCzqOY8BQGiEHwisTCL60mL BSVIT7chA6iS1uymaXWV/T6Dv3PtFDLDz/WkvEyASVJkfkTLxnHOQiHIil6SzN+w2FG9 leCw== MIME-Version: 1.0 Received: by 10.182.119.101 with SMTP id kt5mr2468490obb.70.1334330435893; Fri, 13 Apr 2012 08:20:35 -0700 (PDT) Received: by 10.60.118.69 with HTTP; Fri, 13 Apr 2012 08:20:35 -0700 (PDT) In-Reply-To: <83mx6f3der.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> Date: Fri, 13 Apr 2012 17:20:35 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process From: Dani Moncayo To: Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: Juanma Barranquero , 11102@debbugs.gnu.org, cyd@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: -0.6 (/) > In that case, I don't understand why did Dani expect something > different from what he saw. ?? As I said in the first post, I expect the behavior documented in node "(emacs)emacsclient Options": If you type `C-x C-c' (`save-buffers-kill-terminal') in an Emacs frame created with `emacsclient', via the `-c' or `-t' options, Emacs deletes the frame instead of killing the Emacs process itself. [...] > =A0I see the same behavior on GNU/Linux: if > emacsclient is invoked with -n, "C-x C-c" kills Emacs. If you used also -t or -c, then the the bug is also on that platform (according to the manual). > As for the logic behind the above code, AFAIU -n means emacsclient is > used as a way of asking Emacs to visit a file without any special > handling; in particular, "C-x #" does _not_ kill the buffer visiting > that file. According to the manual, "-n" just means "no wait for the server to return control": `-n' `--no-wait' Let `emacsclient' exit immediately, instead of waiting until all server buffers are finished. You can take as long as you like to edit the server buffers within Emacs, and they are _not_ killed when you type `C-x #' in them. >=A0So killing the entire session upon "C-x C-c" makes sense > in this case. I don't see how that interpretation can be deducted from the current manual= . Besides, as I said in the first post, the observed behavior also varies when you call emacsclient with and without a filename. --=20 Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 11:50:19 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 15:50:20 +0000 Received: from localhost ([127.0.0.1]:57517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIilO-0003oK-U3 for submit@debbugs.gnu.org; Fri, 13 Apr 2012 11:50:19 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:61082) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIilN-0003oB-A9 for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 11:50:18 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2F00300D7A6T00@a-mtaout22.012.net.il> for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 18:48:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2F002S1D9I63W0@a-mtaout22.012.net.il>; Fri, 13 Apr 2012 18:48:55 +0300 (IDT) Date: Fri, 13 Apr 2012 18:46:56 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: To: Dani Moncayo Message-id: <83fwc73a8f.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@debbugs.gnu.org, cyd@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > Date: Fri, 13 Apr 2012 17:20:35 +0200 > From: Dani Moncayo > Cc: Juanma Barranquero , cyd@gnu.org, 11102@debbu= gs.gnu.org >=20 > > In that case, I don't understand why did Dani expect something > > different from what he saw. >=20 > ?? > As I said in the first post, I expect the behavior documented in no= de > "(emacs)emacsclient Options": >=20 > If you type `C-x C-c' (`save-buffers-kill-terminal') in an Emac= s > frame created with `emacsclient', via the `-c' or `-t' options, Em= acs > deletes the frame instead of killing the Emacs process itself. [.= ..] Well, it also says When you finish editing FILE in the Emacs server, type `C-x #' (`server-edit') in its buffer. This saves the file and sends a mes= sage back to the `emacsclient' program, telling it to exit. which is not what happens under -n. So this may well be a documentation bug. (In general, I find the emacsclient documentation to be confusing, even after a lot of improvements done as part of 24.1 pretest. It could be that the various options and interactions between them are hard to document clearly.) > > =A0I see the same behavior on GNU/Linux: if > > emacsclient is invoked with -n, "C-x C-c" kills Emacs. >=20 > If you used also -t or -c I used the exact command that you show in your report. > then the the bug is also on that platform (according to the manual)= . The implementation clearly shows that the behavior was intended. > > As for the logic behind the above code, AFAIU -n means emacsclien= t is > > used as a way of asking Emacs to visit a file without any special > > handling; in particular, "C-x #" does _not_ kill the buffer visit= ing > > that file. >=20 > According to the manual, "-n" just means "no wait for the server to > return control": >=20 > `-n' > `--no-wait' > Let `emacsclient' exit immediately, instead of waiting until= all > server buffers are finished. You can take as long as you li= ke to > edit the server buffers within Emacs, and they are _not_ kil= led > when you type `C-x #' in them. Like I said: I think the manual is incomplete and potentially misleading here. > >=A0So killing the entire session upon "C-x C-c" makes sense > > in this case. >=20 > I don't see how that interpretation can be deducted from the curren= t manual. I just said the behavior makes sense to me, that's all. > Besides, as I said in the first post, the observed behavior also > varies when you call emacsclient with and without a filename. Again, a deficiency in the manual. The code and its commentary are very clear: /* --no-wait implies --current-frame on ttys when there are file arguments or expressions given. */ if (nowait && tty && argc - optind > 0) current_frame =3D 1; which again makes sense. Therefore, I think we should (1) fix the manual to document this behavior, and (2) fix the Windows port to use one of the existing frames instead of popping up a new frame (unless Juanma explains why the current behavior on Windows makes sense). From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 12:12:15 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 16:12:15 +0000 Received: from localhost ([127.0.0.1]:57527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIj6d-0004Io-H6 for submit@debbugs.gnu.org; Fri, 13 Apr 2012 12:12:15 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:49427) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIj6b-0004Ig-59 for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 12:12:13 -0400 Received: by dang27 with SMTP id g27so5222267dan.29 for <11102@debbugs.gnu.org>; Fri, 13 Apr 2012 09:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=IMRBVBNjT0X3z6tBFtxcZyOw9ysQ1kbnXvaJFr/xPd0=; b=wD4/1h+8CwZFG1xrjnb43IIaK4nG0rVuVoygFcmmCx1C3b108o29K86S29AsTTXL3n xytyDjjHWtwn7unan1bLT1Y9JwgzFdpwqrlXKSvZqhnToVvSYNR3muuJcUXOr7EInQRD Cu31w09pC0FsEl6TsHI7k51W8e2T0jcCC4yTILDx09WORaNp/CZtbs4IaLV1uWVKxLBw 5vsdqmjbwRiEuY47c6E0T6AS0wNFOs828DZpeB6hTc4OcnW/1Jyk1G6dy+zJuXco7lUL 9tc5XddWXfwkeJ9RYZ9P0NauQZ/SjPf2IzyAXw+G1i9p88i5xiZ+cCkMWJyGZT3GSVF8 7gpQ== Received: by 10.68.244.10 with SMTP id xc10mr5687837pbc.101.1334333453210; Fri, 13 Apr 2012 09:10:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.204.14 with HTTP; Fri, 13 Apr 2012 09:10:13 -0700 (PDT) In-Reply-To: <83mx6f3der.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 13 Apr 2012 18:10:13 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, cyd@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: -0.6 (/) On Fri, Apr 13, 2012 at 16:38, Eli Zaretskii wrote: > Perhaps the > bug is that we create a new frame on Windows even though the server > receives the -current-frame parameter. =C2=A0Why doesn't server.el on > Windows honor that parameter? I think it is a bug, yes. On a tty session, emacs -Q -nw -f server-start emacsclient -c -n the emacs server does not get a second frame, though you get a spurious message "When done with this frame, type C-x 5 0" (I debbugged it a bit and I think a second frame is being created and then destroyed). =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 12:15:31 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 16:15:31 +0000 Received: from localhost ([127.0.0.1]:57534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIj9m-0004O2-T2 for submit@debbugs.gnu.org; Fri, 13 Apr 2012 12:15:31 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:60499) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIj9k-0004Nv-VY for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 12:15:29 -0400 Received: by dang27 with SMTP id g27so5227280dan.29 for <11102@debbugs.gnu.org>; Fri, 13 Apr 2012 09:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=gr28RfXOTQXT3pfkabfQctltI1vPYiG3SU8uXVi1xoU=; b=ZgT1tG0HUUInCdaYEdhdUeyLO92tqXSDeOP4SH9oa+pdZAXCyhz84+7TEPQ6EQTfGP p9kr0ZYMFSIUMwyN/qYMXN7i86LYB9t0h0EJDSixwMYKsFanIgVMK/cyzS4F7MkddGL+ BGElwvpfEJFiHNpY3T51Y0CyHXJ2d3iRhiD+wd4Pqy4sLbm6NahtRQqp/T92TYJW/3/v B7ayr6GDjaekGRrYFVsZ5HjaExBHhLrZSeQfkmB8ifSNFcDwsR+HP7ONFkwonslqj0/Z KStelrjLYN5+BLVLgvbQsrp6dOJqbFWDFAtqU7bLKzL2moR4KoRG+9ky628k0gHeP9AQ AWnQ== Received: by 10.68.213.162 with SMTP id nt2mr5655996pbc.130.1334333649351; Fri, 13 Apr 2012 09:14:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.204.14 with HTTP; Fri, 13 Apr 2012 09:13:26 -0700 (PDT) In-Reply-To: References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 13 Apr 2012 18:13:26 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, cyd@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: -0.6 (/) On Fri, Apr 13, 2012 at 17:46, Eli Zaretskii wrote: > Therefore, I think we should (1) fix the manual to document this > behavior, and (2) fix the Windows port to use one of the existing > frames instead of popping up a new frame (unless Juanma explains why > the current behavior on Windows makes sense). No, I don't think it makes sense, IMO it's fallout from fixing the "emacsclient vs. new frames" stuff on Windows. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 13:59:17 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 17:59:17 +0000 Received: from localhost ([127.0.0.1]:57617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIkmD-0006p0-23 for submit@debbugs.gnu.org; Fri, 13 Apr 2012 13:59:17 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:59999) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIkmA-0006os-9e for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 13:59:15 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2F00400J8A3300@a-mtaout22.012.net.il> for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 20:57:52 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2F003PSJ8ELJI0@a-mtaout22.012.net.il>; Fri, 13 Apr 2012 20:57:52 +0300 (IDT) Date: Fri, 13 Apr 2012 20:55:53 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: X-012-Sender: halo1@inter.net.il To: Juanma Barranquero Message-id: <83bomv349i.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, cyd@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Juanma Barranquero > Date: Fri, 13 Apr 2012 18:13:26 +0200 > Cc: 11102@debbugs.gnu.org, cyd@gnu.org > > On Fri, Apr 13, 2012 at 17:46, Eli Zaretskii wrote: > > > Therefore, I think we should (1) fix the manual to document this > > behavior, and (2) fix the Windows port to use one of the existing > > frames instead of popping up a new frame (unless Juanma explains why > > the current behavior on Windows makes sense). > > No, I don't think it makes sense, IMO it's fallout from fixing the > "emacsclient vs. new frames" stuff on Windows. Could you please look into fixing that? From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 15:18:02 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 19:18:02 +0000 Received: from localhost ([127.0.0.1]:57655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIm0P-0000A9-Mp for submit@debbugs.gnu.org; Fri, 13 Apr 2012 15:18:02 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:60222) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIm0L-00009t-TZ for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 15:17:59 -0400 Received: by dang27 with SMTP id g27so5466699dan.29 for <11102@debbugs.gnu.org>; Fri, 13 Apr 2012 12:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=lzolk/K2k4IfNdftm9jYYyLcJx5BtKk/jOk0v1/NYsg=; b=dADVr/Hsz3iRjZnghnC59CRrvwnnAvog3GPynW5owgw83xmoV1ojM4W2Nop6b7Rawy H6RONegd5HAJIz6r3sZF8h2p56sruN9QegACCYSkXgMBQkQQrBEL+eePN6q5DzUpOWjQ IGp0iDb+loRQQfKVKwUAtPPE9LJ1zqdveFq8ROHUuONDhAFuxceprJg52bKtcF2MTZqY PwiSsdQl7TwHMGboqWJCk9ZwfmjP5UfMZS4vls2PgZU8EwMcUiTYRymYw30XdsmHO0OT QYgtMpnlSqQzZI7U59A4XhRpj47++3raCyzZB8RcZBfh4yVXnfGlcqjwZxvy0KWnByOC lDaQ== Received: by 10.68.231.233 with SMTP id tj9mr7168848pbc.49.1334344596104; Fri, 13 Apr 2012 12:16:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.204.14 with HTTP; Fri, 13 Apr 2012 12:15:55 -0700 (PDT) In-Reply-To: <83bomv349i.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <83bomv349i.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 13 Apr 2012 21:15:55 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, cyd@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: -0.6 (/) On Fri, Apr 13, 2012 at 19:55, Eli Zaretskii wrote: > Could you please look into fixing that? Yes, of course. Will you take care of fixing the docs? =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 17:04:19 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 21:04:19 +0000 Received: from localhost ([127.0.0.1]:57716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SInfH-0003OE-0Q for submit@debbugs.gnu.org; Fri, 13 Apr 2012 17:04:19 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:39781) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SInfF-0003O6-2S for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 17:04:18 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2F00500RNUAQ00@a-mtaout22.012.net.il> for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 00:02:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2F003NYRSUKIT1@a-mtaout22.012.net.il>; Sat, 14 Apr 2012 00:02:55 +0300 (IDT) Date: Sat, 14 Apr 2012 00:00:56 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: X-012-Sender: halo1@inter.net.il To: Juanma Barranquero Message-id: <83aa2f2vp3.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <83bomv349i.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, cyd@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Juanma Barranquero > Date: Fri, 13 Apr 2012 21:15:55 +0200 > Cc: 11102@debbugs.gnu.org, cyd@gnu.org > > On Fri, Apr 13, 2012 at 19:55, Eli Zaretskii wrote: > > > Could you please look into fixing that? > > Yes, of course. > > Will you take care of fixing the docs? Yes, of course. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 19:51:40 2012 Received: (at 11102) by debbugs.gnu.org; 13 Apr 2012 23:51:40 +0000 Received: from localhost ([127.0.0.1]:57802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIqHD-0000JF-Rb for submit@debbugs.gnu.org; Fri, 13 Apr 2012 19:51:40 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:40901) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIqHB-0000J6-CX for 11102@debbugs.gnu.org; Fri, 13 Apr 2012 19:51:38 -0400 Received: by dang27 with SMTP id g27so5740847dan.29 for <11102@debbugs.gnu.org>; Fri, 13 Apr 2012 16:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=nGQf2G7f6mC7NgFExUA0ypECkLje0kcM8OyGXraYgsA=; b=Xw0Qo3d5P6ytGJhSfD40jxGniIsSq2dx+VyCF/EMym96Twa6vQ8jtiYDWirdONqABY qNSwEcvVPLfYL8oOnXQF0qpK2N7BSQiMFM3uH0aORnPiLXYPoRQD0HaPJgGtpxlN23cf Eg6de5K2bO8hzDl23Aao6O7N8ZOb6lvaZPyit/2oxQXeMtUSsSmK5ZaBnJDF65mTa2bR MCJz8FDwe0mp4eZiZBWGTJq7E77Fz4ny+mTspsA4Y1eACWWLU0NYXxsYT89DUQ8tip8T DT1bbdSZYWUigiJZu6MhnXoI69ynTWbOD/Z77bPQSUv2VPI9WBESPVk6LLdpkONtThFr HiiA== Received: by 10.68.221.74 with SMTP id qc10mr8324131pbc.80.1334361015509; Fri, 13 Apr 2012 16:50:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.204.14 with HTTP; Fri, 13 Apr 2012 16:49:35 -0700 (PDT) In-Reply-To: <83fwc73a8f.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <83fwc73a8f.fsf@gnu.org> From: Juanma Barranquero Date: Sat, 14 Apr 2012 01:49:35 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: 11102@debbugs.gnu.org, cyd@gnu.org, Dani Moncayo 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: -0.6 (/) On Fri, Apr 13, 2012 at 17:46, Eli Zaretskii wrote: > =C2=A0/* --no-wait implies --current-frame on ttys when there are file > =C2=A0 =C2=A0 arguments or expressions given. =C2=A0*/ > =C2=A0if (nowait && tty && argc - optind > 0) > =C2=A0 =C2=A0current_frame =3D 1; OTOH, this explicitly refers to ttys. What does emacs -Q -f server-start emacsclient -c -n somefile do in a GUI emacs on GNU/Linux? Does it create a new frame or not? (I'm assuming "emacsclient -c -n" without a file arg creates one.) =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 00:05:28 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 04:05:28 +0000 Received: from localhost ([127.0.0.1]:57858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIuEq-0006Fu-8w for submit@debbugs.gnu.org; Sat, 14 Apr 2012 00:05:28 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:54959) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIuEo-0006Fo-K2 for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 00:05:27 -0400 Received: from bb220-255-229-180.singnet.com.sg ([220.255.229.180]:49777 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SIuDR-0005nq-7w; Sat, 14 Apr 2012 00:04:02 -0400 From: Chong Yidong To: Juanma Barranquero Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <83fwc73a8f.fsf@gnu.org> Date: Sat, 14 Apr 2012 12:03:51 +0800 In-Reply-To: (Juanma Barranquero's message of "Sat, 14 Apr 2012 01:49:35 +0200") Message-ID: <87ty0nj6xk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 11102 Cc: Eli Zaretskii , 11102@debbugs.gnu.org, Dani Moncayo 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: -5.0 (-----) Juanma Barranquero writes: > OTOH, this explicitly refers to ttys. What does > > emacs -Q -f server-start > emacsclient -c -n somefile > > do in a GUI emacs on GNU/Linux? Does it create a new frame or not? > (I'm assuming "emacsclient -c -n" without a file arg creates one.) Yes, it creates a new frame. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 00:56:47 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 04:56:47 +0000 Received: from localhost ([127.0.0.1]:57904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIv2U-0007Rc-Ie for submit@debbugs.gnu.org; Sat, 14 Apr 2012 00:56:47 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:55874) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIv2S-0007RV-IA for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 00:56:45 -0400 Received: from bb220-255-229-180.singnet.com.sg ([220.255.229.180]:49817 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SIv15-0005Tj-U1; Sat, 14 Apr 2012 00:55:20 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> Date: Sat, 14 Apr 2012 12:55:10 +0800 In-Reply-To: <83mx6f3der.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Apr 2012 17:38:20 +0300") Message-ID: <87zkaeud3l.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 11102 Cc: Juanma Barranquero , 11102@debbugs.gnu.org, dmoncayo@gmail.com 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: -5.0 (-----) Eli Zaretskii writes: > In that case, I don't understand why did Dani expect something > different from what he saw. I see the same behavior on GNU/Linux: if > emacsclient is invoked with -n, "C-x C-c" kills Emacs. Perhaps the > bug is that we create a new frame on Windows even though the server > receives the -current-frame parameter. Why doesn't server.el on > Windows honor that parameter? With the -c option, a client frame is created, so C-x C-c should delete the frame without killing the main Emacs session, whether or not there is an -n option. The role of -n is as follows: *without* -n, i.e. if emacsclient waits for edits to finish, the C-x C-c that deletes the client frame should also mark the client's edits as finished. I've updated the manual to improve the description of this. Is it clear enough now? If on a client frame created by "emacsclient -c -n" the C-x C-c command kills Emacs, that is indeed a bug. My guess would be that the `client' frame parameter is not getting correctly assigned to the newly-created frame on Windows, due to the extra juggling in the #ifdef WINDOWSNT code segment Juanma pointed out. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 01:36:06 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 05:36:06 +0000 Received: from localhost ([127.0.0.1]:57914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIveV-0008Qm-O9 for submit@debbugs.gnu.org; Sat, 14 Apr 2012 01:36:05 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:56297) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIveT-0008QO-My for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 01:36:03 -0400 Received: from bb220-255-229-180.singnet.com.sg ([220.255.229.180]:49839 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SIvd6-0001Vn-Dr; Sat, 14 Apr 2012 01:34:37 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> Date: Sat, 14 Apr 2012 13:34:27 +0800 In-Reply-To: <87zkaeud3l.fsf@gnu.org> (Chong Yidong's message of "Sat, 14 Apr 2012 12:55:10 +0800") Message-ID: <87sjg6uba4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 11102 Cc: Juanma Barranquero , 11102@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: -5.0 (-----) Chong Yidong writes: > If on a client frame created by "emacsclient -c -n" the C-x C-c command > kills Emacs, that is indeed a bug. My guess would be that the `client' > frame parameter is not getting correctly assigned to the newly-created > frame on Windows, due to the extra juggling in the #ifdef WINDOWSNT code > segment Juanma pointed out. Took a quick look, and indeed the "set tty = 1 on Windows" hack does seem to be at fault. Here's my diagnosis: if (tty || !current_frame) { display = (const char *) ttyname (0); /* Arg is ignored. */ current_frame = 0; tty = 1; } ... /* --no-wait implies --current-frame on ttys when there are file arguments or expressions given. */ if (nowait && tty && argc - optind > 0) current_frame = 1; When tty = 1, if there are also -n and filename arguments, emacsclient assumes that a current Emacs frame must be used. This assumption is not correct if the tty = 1 is because of the Window hack. As a result, the server calls `server-select-display', which ends up trying to create a new frame on the display ttyname(0), contra the "Arg is ignored" comment. That new frame, if created, lacks the `client' frame parameter for C-x C-c to work right. Does the following patch DTRT? This is an attempt at making a minimal change, for Emacs 24.1. For the trunk, I think it is worth trying to untangle the logic properly, but that will needs Someone(tm) to work on it who has access to a Windows box. === modified file 'lisp/server.el' *** lisp/server.el 2012-04-04 17:13:00 +0000 --- lisp/server.el 2012-04-14 05:29:24 +0000 *************** *** 1136,1141 **** --- 1136,1145 ---- (setq frame (cond ((and use-current-frame + ;; On Windows, we pass -tty as a hack, using + ;; a bogus display name. + (or (not (eq window-system 'w32)) + (equal display "CONOUT$")) (or (eq use-current-frame 'always) ;; We can't use the Emacs daemon's ;; terminal frame. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 03:29:10 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 07:29:10 +0000 Received: from localhost ([127.0.0.1]:57935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIxPu-0002a0-VA for submit@debbugs.gnu.org; Sat, 14 Apr 2012 03:29:09 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:36538) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIxPs-0002Zr-2j for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 03:29:05 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2G00900KNU8U00@a-mtaout22.012.net.il> for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 10:27:40 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2G008VHKQ3LZC0@a-mtaout22.012.net.il>; Sat, 14 Apr 2012 10:27:40 +0300 (IDT) Date: Sat, 14 Apr 2012 10:25:42 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: <87sjg6uba4.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <831unq3hc9.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Chong Yidong > Cc: Juanma Barranquero , 11102@debbugs.gnu.org > Date: Sat, 14 Apr 2012 13:34:27 +0800 > > Chong Yidong writes: > > > If on a client frame created by "emacsclient -c -n" the C-x C-c command > > kills Emacs, that is indeed a bug. My guess would be that the `client' > > frame parameter is not getting correctly assigned to the newly-created > > frame on Windows, due to the extra juggling in the #ifdef WINDOWSNT code > > segment Juanma pointed out. > > Took a quick look, and indeed the "set tty = 1 on Windows" hack does > seem to be at fault. Like I said, I see the same "bug" on GNU/Linux, when the server runs in a TTY session (couldn't check in a GUI session). Are you talking about GUI sessions only? > Here's my diagnosis: > > if (tty || !current_frame) > { > display = (const char *) ttyname (0); /* Arg is ignored. */ > current_frame = 0; > tty = 1; > } > > ... > > /* --no-wait implies --current-frame on ttys when there are file > arguments or expressions given. */ > if (nowait && tty && argc - optind > 0) > current_frame = 1; > > When tty = 1, if there are also -n and filename arguments, emacsclient > assumes that a current Emacs frame must be used. This assumption is not > correct if the tty = 1 is because of the Window hack. But is that assumption correct if tty = 1 on GNU/Linux? In a previous mail you said: > With the -c option, a client frame is created, so C-x C-c should delete > the frame without killing the main Emacs session, whether or not there > is an -n option. This seems to imply that using "emacsclient -c -n FILE" on a Posix host should _not_ kill emacs when "C-x C-c" is typed. And yet in my testing, it does, with the emacs-24 branch built just now, when the server runs in a TTY session. Are you saying that the effect of -n depends also on whether the server runs in a TTY session? If not, what else am I missing? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 03:29:47 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 07:29:47 +0000 Received: from localhost ([127.0.0.1]:57938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIxQZ-0002as-5X for submit@debbugs.gnu.org; Sat, 14 Apr 2012 03:29:47 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:36705) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIxQX-0002al-5y for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 03:29:45 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2G00900KNU8U00@a-mtaout22.012.net.il> for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 10:28:22 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2G00897KR8LSC0@a-mtaout22.012.net.il>; Sat, 14 Apr 2012 10:28:22 +0300 (IDT) Date: Sat, 14 Apr 2012 10:26:24 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: <87ty0nj6xk.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83zkae22qn.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <83fwc73a8f.fsf@gnu.org> <87ty0nj6xk.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@debbugs.gnu.org, dmoncayo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Chong Yidong > Cc: Eli Zaretskii , Dani Moncayo , 11102@debbugs.gnu.org > Date: Sat, 14 Apr 2012 12:03:51 +0800 > > Juanma Barranquero writes: > > > OTOH, this explicitly refers to ttys. What does > > > > emacs -Q -f server-start > > emacsclient -c -n somefile > > > > do in a GUI emacs on GNU/Linux? Does it create a new frame or not? > > (I'm assuming "emacsclient -c -n" without a file arg creates one.) > > Yes, it creates a new frame. And what happens if the server runs in a TTY session? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 04:18:44 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 08:18:44 +0000 Received: from localhost ([127.0.0.1]:57965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIyBv-0004XI-2E for submit@debbugs.gnu.org; Sat, 14 Apr 2012 04:18:43 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:58264) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIyBs-0004XA-PH for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 04:18:41 -0400 Received: from bb220-255-229-180.singnet.com.sg ([220.255.229.180]:50132 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SIyAV-0000ja-Cw; Sat, 14 Apr 2012 04:17:16 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> Date: Sat, 14 Apr 2012 16:17:07 +0800 In-Reply-To: <831unq3hc9.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Apr 2012 10:25:42 +0300") Message-ID: <87d37aafss.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@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: -5.0 (-----) Eli Zaretskii writes: >> With the -c option, a client frame is created, so C-x C-c should delete >> the frame without killing the main Emacs session, whether or not there >> is an -n option. > > This seems to imply that using "emacsclient -c -n FILE" on a Posix > host should _not_ kill emacs when "C-x C-c" is typed. And yet in my > testing, it does, with the emacs-24 branch built just now, when the > server runs in a TTY session. Are you saying that the effect of -n > depends also on whether the server runs in a TTY session? That's not what I see with latest emacs-24 branch (x86_64-unknown-linux-gnu): 1. emacs -Q -nw -f server-start 2. [in another xterm] emacsclient -c -n foo.txt 3. [in the new X frame] C-x C-c => frame is deleted, but Emacs session is still alive I do see a discrepancy with "emacsclient -t -n foo.txt"; in that (slightly ill-defined) case, the -n negates the -t causing the edits to be made in the existing Emacs terminal frame. But that doesn't seem to be what you're referring to. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 05:32:21 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 09:32:21 +0000 Received: from localhost ([127.0.0.1]:58039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIzLB-0007Nb-Ea for submit@debbugs.gnu.org; Sat, 14 Apr 2012 05:32:21 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:61899) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIzL9-0007NT-GX for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 05:32:20 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M2G00I00QBB7Y00@a-mtaout21.012.net.il> for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 12:30:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2G00I3EQFH7E20@a-mtaout21.012.net.il>; Sat, 14 Apr 2012 12:30:55 +0300 (IDT) Date: Sat, 14 Apr 2012 12:28:57 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: <87d37aafss.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83r4vq1x2e.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> <87d37aafss.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Chong Yidong > Cc: lekktu@gmail.com, 11102@debbugs.gnu.org > Date: Sat, 14 Apr 2012 16:17:07 +0800 > > Eli Zaretskii writes: > > >> With the -c option, a client frame is created, so C-x C-c should delete > >> the frame without killing the main Emacs session, whether or not there > >> is an -n option. > > > > This seems to imply that using "emacsclient -c -n FILE" on a Posix > > host should _not_ kill emacs when "C-x C-c" is typed. And yet in my > > testing, it does, with the emacs-24 branch built just now, when the > > server runs in a TTY session. Are you saying that the effect of -n > > depends also on whether the server runs in a TTY session? > > That's not what I see with latest emacs-24 branch > (x86_64-unknown-linux-gnu): > > 1. emacs -Q -nw -f server-start > 2. [in another xterm] emacsclient -c -n foo.txt > 3. [in the new X frame] C-x C-c > > => frame is deleted, but Emacs session is still alive Try doing this with Emacs built --without-x, or in a remote TTY login that doesn't support X forwarding. What I did, exactly, is this: (1) login via PuTTY into my fencepost account (you should be able to reproduce using 'ssh' instead) and chdir to the emacs-24 branch (2) ./src/emacs -Q -f server-start (3) login again via PuTYY, which opens another remote terminal window, and chdir to the same directory (4) ./lib-src/emacsclient -c -n README At this point, I see the file README being visited in the Emacs session opened by (2), but in the original frame (the mode line still shows "F1", not "F2"). (5) In the session created by (2): C-x C-c => the Emacs session is terminated and I see the shell prompt. In general, if a new frame isn't created by emacsclient request, it makes sense to me that "C-x C-c" terminates the Emacs session, rather than just deleting the new frame. That is why I said I didn't think this was a bug. Now it seems that emacsclient is even more messed up than I thought in this regard, since the conditions for creating a new frame (and thus for deleting it) involve all kinds of subtle factors. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 05:40:08 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 09:40:08 +0000 Received: from localhost ([127.0.0.1]:58043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIzSi-0007Yw-D5 for submit@debbugs.gnu.org; Sat, 14 Apr 2012 05:40:08 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:62754) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIzSg-0007Yo-Iy for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 05:40:07 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M2G00I00QK38L00@a-mtaout21.012.net.il> for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 12:38:42 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2G00IUVQSH8T00@a-mtaout21.012.net.il>; Sat, 14 Apr 2012 12:38:42 +0300 (IDT) Date: Sat, 14 Apr 2012 12:36:45 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: <87zkaeud3l.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83pqba1wpe.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@debbugs.gnu.org, dmoncayo@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Chong Yidong > Cc: Juanma Barranquero , dmoncayo@gmail.com, 11102@debbugs.gnu.org > Date: Sat, 14 Apr 2012 12:55:10 +0800 > > I've updated the manual to improve the description of this. Is it clear > enough now? Let's wait with the ``clear'' part until we have a complete understanding what is or should be the correct behavior; see my other mail. But I do know that what you wrote is inaccurate for MS-Windows. In this part: On GNU and Unix systems, Emacs can create a graphical frame even if it was started in a text-only terminal, provided it is able to connect to a graphical display. On systems such as MS-Windows, it cannot create graphical frames if it was started from a text terminal (@pxref{Windows Startup, emacsclient}). If Emacs cannot connect to a graphical display for any reason, it instead creates a new client frame on the text terminal from which you invoked @command{emacsclient} (@pxref{Non-Window Terminals}). the last sentence tells something that doesn't happen on Windows. The new client frame is created on the text terminal where _Emacs_ was invoked, not where emacsclient was invoked. On Windows, a program can have only one console at any given time, so Emacs cannot open a text frame on a different console. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 06:35:17 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 10:35:17 +0000 Received: from localhost ([127.0.0.1]:58061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJ0K4-0000Pw-QS for submit@debbugs.gnu.org; Sat, 14 Apr 2012 06:35:17 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:60048) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJ0K1-0000Po-GV for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 06:35:14 -0400 Received: from bb220-255-229-180.singnet.com.sg ([220.255.229.180]:50987 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SJ0Id-00057E-GT; Sat, 14 Apr 2012 06:33:48 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> <87d37aafss.fsf@gnu.org> <83r4vq1x2e.fsf@gnu.org> Date: Sat, 14 Apr 2012 18:33:39 +0800 In-Reply-To: <83r4vq1x2e.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Apr 2012 12:28:57 +0300") Message-ID: <878vhyfvr0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@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: -5.0 (-----) Eli Zaretskii writes: > Try doing this with Emacs built --without-x Hmm, what I get with --without-x is 1. emacs -Q -nw -f server-start 2. emacsclient -c -n foo.txt *ERROR*: Don't know how to create a frame on window system x so I guess some more intelligent error handling is needed here. If I use "-t -n foo.txt", then (as I noted in my earlier email) the file is opened in the existing Emacs terminal frame. I'll see what I can do about these issues, but they are basically not urgent to fix for 24.1. The issue which Dani and Juanma were talking about is a separate one: for a graphical Emacs on Windows, "emacsclient -c -n foo.txt" ought to create a new frame with a `client' parameter, so that C-x C-c exits Emacs instead of closing just that frame. That is the intended behavior, which is also the behavior on GNU/Linux when there is a graphical display available. I think the patch I posted earlier should DTRT for Windows, if you or Juanma can try it. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 07:41:38 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 11:41:38 +0000 Received: from localhost ([127.0.0.1]:58129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJ1MI-0002vE-II for submit@debbugs.gnu.org; Sat, 14 Apr 2012 07:41:38 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:50486) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJ1MF-0002v6-Sl for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 07:41:36 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M2G00F00WCFCR00@a-mtaout23.012.net.il> for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 14:39:56 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2G00FSCWEI8V90@a-mtaout23.012.net.il>; Sat, 14 Apr 2012 14:39:56 +0300 (IDT) Date: Sat, 14 Apr 2012 14:37:59 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: <878vhyfvr0.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83lily1r3c.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> <87d37aafss.fsf@gnu.org> <83r4vq1x2e.fsf@gnu.org> <878vhyfvr0.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Chong Yidong > Cc: lekktu@gmail.com, 11102@debbugs.gnu.org > Date: Sat, 14 Apr 2012 18:33:39 +0800 > > The issue which Dani and Juanma were talking about is a separate one: > for a graphical Emacs on Windows, "emacsclient -c -n foo.txt" ought to > create a new frame with a `client' parameter, so that C-x C-c exits > Emacs instead of closing just that frame. Now I'm completely confused: didn't you say that "C-x C-c" should _not_ exit Emacs in this case? > That is the intended behavior, which is also the behavior on > GNU/Linux when there is a graphical display available. I think the > patch I posted earlier should DTRT for Windows, if you or Juanma can > try it. Why does it make sense to have "-c -n" behave differently from "-t -n"? Isn't this terribly confusing for users? AFAIU, these two are variants are otherwise very similar to each other: they both reuse the current frame on the same terminal where the server is running. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 09:20:24 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 13:20:24 +0000 Received: from localhost ([127.0.0.1]:58198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJ2tq-0005Bu-Tr for submit@debbugs.gnu.org; Sat, 14 Apr 2012 09:20:23 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34564) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJ2to-0005Bm-0x for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 09:20:21 -0400 Received: from bb220-255-229-180.singnet.com.sg ([220.255.229.180]:51235 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SJ2sP-0002HY-85; Sat, 14 Apr 2012 09:18:54 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> <87d37aafss.fsf@gnu.org> <83r4vq1x2e.fsf@gnu.org> <878vhyfvr0.fsf@gnu.org> <83lily1r3c.fsf@gnu.org> Date: Sat, 14 Apr 2012 21:18:43 +0800 In-Reply-To: <83lily1r3c.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Apr 2012 14:37:59 +0300") Message-ID: <87zkaebgek.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@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: -5.0 (-----) Eli Zaretskii writes: >> The issue which Dani and Juanma were talking about is a separate one: >> for a graphical Emacs on Windows, "emacsclient -c -n foo.txt" ought to >> create a new frame with a `client' parameter, so that C-x C-c exits >> Emacs instead of closing just that frame. > > Now I'm completely confused: didn't you say that "C-x C-c" should > _not_ exit Emacs in this case? Sorry, I miswrote. Indeed, C-x C-c should _not_ exit Emacs in that case. > Why does it make sense to have "-c -n" behave differently from > "-t -n"? The "-t -n" case is an abberation; emacsclient could even signal an error for that, because it is saying "open on this text terminal, but don't wait", which is nonsensical. The current behavior, of opening on another text terminal, is a fudge---and one that doesn't work for the Emacs daemon. For that reason, the discrepancy you point out is not important. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 09:38:42 2012 Received: (at 11102) by debbugs.gnu.org; 14 Apr 2012 13:38:42 +0000 Received: from localhost ([127.0.0.1]:58217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJ3BZ-0005bQ-Om for submit@debbugs.gnu.org; Sat, 14 Apr 2012 09:38:42 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:46615) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJ3BX-0005bI-5p for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 09:38:40 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M2H00I001IDPD00@a-mtaout21.012.net.il> for 11102@debbugs.gnu.org; Sat, 14 Apr 2012 16:36:33 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2H00I3D1SSMK80@a-mtaout21.012.net.il>; Sat, 14 Apr 2012 16:36:29 +0300 (IDT) Date: Sat, 14 Apr 2012 16:34:32 +0300 From: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process In-reply-to: <87zkaebgek.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83iph21lp3.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> <87d37aafss.fsf@gnu.org> <83r4vq1x2e.fsf@gnu.org> <878vhyfvr0.fsf@gnu.org> <83lily1r3c.fsf@gnu.org> <87zkaebgek.fsf@gnu.org> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: 0.7 (/) > From: Chong Yidong > Cc: lekktu@gmail.com, 11102@debbugs.gnu.org > Date: Sat, 14 Apr 2012 21:18:43 +0800 > > Eli Zaretskii writes: > > >> The issue which Dani and Juanma were talking about is a separate one: > >> for a graphical Emacs on Windows, "emacsclient -c -n foo.txt" ought to > >> create a new frame with a `client' parameter, so that C-x C-c exits > >> Emacs instead of closing just that frame. > > > > Now I'm completely confused: didn't you say that "C-x C-c" should > > _not_ exit Emacs in this case? > > Sorry, I miswrote. Indeed, C-x C-c should _not_ exit Emacs in that > case. I'm relieved ;-) > > Why does it make sense to have "-c -n" behave differently from > > "-t -n"? > > The "-t -n" case is an abberation; emacsclient could even signal an > error for that, because it is saying "open on this text terminal, but > don't wait", which is nonsensical. The current behavior, of opening on > another text terminal, is a fudge---and one that doesn't work for the > Emacs daemon. For that reason, the discrepancy you point out is not > important. Maybe it's just me, but the "aberration" sounds good to me, and, again, makes "-c -n" and "-t -n" behave very similar, except for the effect of "C-x C-c". I would suggest to make them similar in that respect as well, so as to cause a bit less mental disorder to users than we do now. If we do leave the different "C-x C-c" behavior, we need to clearly document that in the manual, I think. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 15 04:55:14 2012 Received: (at 11102) by debbugs.gnu.org; 15 Apr 2012 08:55:14 +0000 Received: from localhost ([127.0.0.1]:59293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJLEo-00086z-II for submit@debbugs.gnu.org; Sun, 15 Apr 2012 04:55:14 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:50923) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJLEm-00086q-RC for 11102@debbugs.gnu.org; Sun, 15 Apr 2012 04:55:13 -0400 Received: from bb220-255-229-180.singnet.com.sg ([220.255.229.180]:53332 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SJLDJ-00022b-NB; Sun, 15 Apr 2012 04:53:42 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> <87d37aafss.fsf@gnu.org> <83r4vq1x2e.fsf@gnu.org> <878vhyfvr0.fsf@gnu.org> <83lily1r3c.fsf@gnu.org> <87zkaebgek.fsf@gnu.org> <83iph21lp3.fsf@gnu.org> Date: Sun, 15 Apr 2012 16:53:31 +0800 In-Reply-To: <83iph21lp3.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Apr 2012 16:34:32 +0300") Message-ID: <87obqtxto4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, 11102@debbugs.gnu.org, Dani Moncayo 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: -5.0 (-----) Eli Zaretskii writes: > If we do leave the different "C-x C-c" behavior, we need to clearly > document that in the manual, I think. I've updated the manual accordingly. I've also committed a fix for the "-t -n" handling which should fix the problem observed on Windows. It is on the emacs-24 branch, since AFAICT the additional Windows code causing this problem is new since 23.4. Someone with access to Windows please check if it DTRT. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 20 04:02:44 2012 Received: (at control) by debbugs.gnu.org; 20 Apr 2012 08:02:44 +0000 Received: from localhost ([127.0.0.1]:43449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SL8nj-0005T0-Th for submit@debbugs.gnu.org; Fri, 20 Apr 2012 04:02:44 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:50238 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SL8ni-0005St-5K for control@debbugs.gnu.org; Fri, 20 Apr 2012 04:02:42 -0400 Received: from [155.69.18.143] (port=50491 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SL8nJ-0001oJ-NS for control@debbugs.gnu.org; Fri, 20 Apr 2012 04:02:18 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 11102 Date: Fri, 20 Apr 2012 16:02:11 +0800 Message-ID: <87r4vi25mk.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain 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 11102 thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 20 04:24:26 2012 Received: (at 11102) by debbugs.gnu.org; 20 Apr 2012 08:24:26 +0000 Received: from localhost ([127.0.0.1]:43469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SL98k-0006m3-B0 for submit@debbugs.gnu.org; Fri, 20 Apr 2012 04:24:26 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:45530) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SL98h-0006lr-UL for 11102@debbugs.gnu.org; Fri, 20 Apr 2012 04:24:24 -0400 Received: by obbwd20 with SMTP id wd20so7793054obb.3 for <11102@debbugs.gnu.org>; Fri, 20 Apr 2012 01:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=WYCSjOO9dbY2BBP2+epRF5Bu10EEo7Rz1MJ4rA5IEdQ=; b=zYzsVnJstKDoPPIxcLQcLWRvd3FoNR6pLCTbC9D7WKcirmYPknf6AKslr94qe92cTA itAIFL1YnP4zu8NeNGGdPrTLLPZcE6+2JtpSqN6q9vvdmnWPCvNl2hr4jJ50gfvejjn0 zPoI7jGoWfWqRqaOoiRrHnda9FqFpgm6Ocm/Mhmeuth1bioi97Yhhp+Z+KNSc8wPK6Hz cQKGKW/rgr8yJGjlHSqiGhGfolYNf3oXmf3xKjXmw45E5Qkss0oJ06ef5oVDv/qqWSP+ m5lQPtTDfXChcl21Aoq61S3FQ4IwH2as65w/z9v8PDnKxPzlHklxl81w80cfs/jbSmUa UwVA== MIME-Version: 1.0 Received: by 10.182.141.9 with SMTP id rk9mr7226165obb.50.1334910234764; Fri, 20 Apr 2012 01:23:54 -0700 (PDT) Received: by 10.60.118.69 with HTTP; Fri, 20 Apr 2012 01:23:54 -0700 (PDT) In-Reply-To: <87obqtxto4.fsf@gnu.org> References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> <87d37aafss.fsf@gnu.org> <83r4vq1x2e.fsf@gnu.org> <878vhyfvr0.fsf@gnu.org> <83lily1r3c.fsf@gnu.org> <87zkaebgek.fsf@gnu.org> <83iph21lp3.fsf@gnu.org> <87obqtxto4.fsf@gnu.org> Date: Fri, 20 Apr 2012 10:23:54 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process From: Dani Moncayo To: Chong Yidong Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, Eli Zaretskii , 11102@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: -0.6 (/) > I've also committed a fix for the "-t -n" handling which should fix the > problem observed on Windows. =A0It is on the emacs-24 branch, since AFAIC= T > the additional Windows code causing this problem is new since 23.4. > Someone with access to Windows please check if it DTRT. Sorry for not replying. I was waiting for this change to be on the trunk, because I've not pulled the emacs-24 branch. When this change arrives to the trunk, I'll test it. Thanks. --=20 Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 20 15:10:50 2012 Received: (at 11102) by debbugs.gnu.org; 20 Apr 2012 19:10:51 +0000 Received: from localhost ([127.0.0.1]:44654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLJEI-0003nz-Ki for submit@debbugs.gnu.org; Fri, 20 Apr 2012 15:10:50 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:57769) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLJEG-0003nm-Fr for 11102@debbugs.gnu.org; Fri, 20 Apr 2012 15:10:49 -0400 Received: by obbwd20 with SMTP id wd20so8456334obb.3 for <11102@debbugs.gnu.org>; Fri, 20 Apr 2012 12:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=/0o/mQDRgyYKwHvTv2/kdvj7Rf0YF3XB7yz5VeHZYQ4=; b=gKDTgmLmTe6kSYn0S9mt85qX4EU6cH+WVvcua34BTsC4d2MDwT9a7vrTgP6TDPpfYg oEcwc2xv3dZWCNW5jwCTWWoByOYaR08VRq9j2KZcgvyHmVi+F9TOX9gPnywp32LMoxVe l3n7A0aq4JqZrTf1cTCrkgSyzB9Q6JXhn6u14c3CD9m5KG9RTHwDbDG1yo0MHCB0PVU6 R2sclve5FFMBI3G8PF+LoCZx2nubz51hi3ZPCYdBb7yJ4epDFJJdPTTP701B08IF1DQq xInRrLX2iDG+Z/ECjmIT2zglXMY70Wpv5+H+KQ+LEUpKmS4cI+BUjQxwhBeVrT0WgxXz UgNw== MIME-Version: 1.0 Received: by 10.182.119.101 with SMTP id kt5mr10456677obb.70.1334949016753; Fri, 20 Apr 2012 12:10:16 -0700 (PDT) Received: by 10.60.118.69 with HTTP; Fri, 20 Apr 2012 12:10:16 -0700 (PDT) In-Reply-To: References: <87obreaups.fsf@gnu.org> <83wr62yocw.fsf@gnu.org> <83mx6f3der.fsf@gnu.org> <87zkaeud3l.fsf@gnu.org> <87sjg6uba4.fsf@gnu.org> <831unq3hc9.fsf@gnu.org> <87d37aafss.fsf@gnu.org> <83r4vq1x2e.fsf@gnu.org> <878vhyfvr0.fsf@gnu.org> <83lily1r3c.fsf@gnu.org> <87zkaebgek.fsf@gnu.org> <83iph21lp3.fsf@gnu.org> <87obqtxto4.fsf@gnu.org> Date: Fri, 20 Apr 2012 21:10:16 +0200 Message-ID: Subject: Re: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process From: Dani Moncayo To: Chong Yidong Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 11102 Cc: lekktu@gmail.com, Eli Zaretskii , 11102@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: -0.6 (/) >> I've also committed a fix for the "-t -n" handling which should fix the >> problem observed on Windows. =A0It is on the emacs-24 branch, since AFAI= CT >> the additional Windows code causing this problem is new since 23.4. >> Someone with access to Windows please check if it DTRT. > > Sorry for not replying. =A0I was waiting for this change to be on the > trunk, because I've not pulled the emacs-24 branch. =A0When this change > arrives to the trunk, I'll test it. I've just tested this (the original bug recipe) with the latest trunk (revno 107976) and the bug seems to be fixed. Thank you. --=20 Dani Moncayo From unknown Fri Jun 20 07:14:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 May 2012 11:24:02 +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