From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#58877: 29.0.50; [PATCH] When killing Emacs from a client frame with no other frames, Emacs shows a useless error prompt Date: Sat, 26 Nov 2022 12:17:59 -0800 Message-ID: <2be2d630-f4da-16f9-5afc-9f6561a9995a@gmail.com> References: <8121efd5-77c3-0682-ce0f-6be9375dadd8@gmail.com> <83a65dhm7f.fsf@gnu.org> <13835614-c593-ba2d-5373-a9950f6f3dab@gmail.com> <83k03kwoy6.fsf@gnu.org> <83a64fupwv.fsf@gnu.org> <83wn7iu6rz.fsf@gnu.org> <83ilj1srma.fsf@gnu.org> <83v8n1qz3k.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13303"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58877@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 26 21:19:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oz1dn-0003Eh-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Nov 2022 21:19:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oz1dh-0007FQ-3m; Sat, 26 Nov 2022 15:19:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz1de-0007Ev-Qh for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 15:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oz1de-0004KH-IT for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 15:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oz1de-0006nU-8z for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 15:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Nov 2022 20:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58877 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58877-submit@debbugs.gnu.org id=B58877.166949389026116 (code B ref 58877); Sat, 26 Nov 2022 20:19:02 +0000 Original-Received: (at 58877) by debbugs.gnu.org; 26 Nov 2022 20:18:10 +0000 Original-Received: from localhost ([127.0.0.1]:41533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz1co-0006nA-0y for submit@debbugs.gnu.org; Sat, 26 Nov 2022 15:18:10 -0500 Original-Received: from mail-pf1-f170.google.com ([209.85.210.170]:37583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz1cl-0006mk-0V for 58877@debbugs.gnu.org; Sat, 26 Nov 2022 15:18:08 -0500 Original-Received: by mail-pf1-f170.google.com with SMTP id a16so6544155pfg.4 for <58877@debbugs.gnu.org>; Sat, 26 Nov 2022 12:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=gmYbM9tfS/BxCHw6cBFJuTd8q2oD5m03tezcWQlwmDI=; b=NH4PLHzwjH8i0ZHp/1YMzPdQfNGO+/5JJ2vnydliR/PvD+da/RJzfOwTqu1EnYMZFF 9qcuct/IiKDCVR2fDS8XeWTq0rrhvk9tcqIVF8bPAhknRjdf6BZoBRC91fKsHE1VtLOC tshqwKbeR/CNbw5wcStrMhmkEPY/DILwIIaa4hO6y1s1zR8WvFDFyuHog0TKKV4GBSRn 2KMtOzHrAoRjhSFVH6Duxs74Sf8ZJ/62fWBEUggbKCo5lUYfYpcIcpNt1HKcji6K4PyH D9H2ZiLiCTDbJXGRNFjG17WckwGqc7TF6sdPmGSHrAVW99oXZ0dSHFBBAcIcj42UVR++ NoeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gmYbM9tfS/BxCHw6cBFJuTd8q2oD5m03tezcWQlwmDI=; b=o2yqd6tWbqzlr3KQGWCcso9KIp/FS2BcUGl4nn/nGI7bHeOQJS8dUoXy4KwdLoeRRz GEw2TeUCSDHkS7n1ete7Ub1n5oYWwKj5Tcj3g8nPqAm2C7VGRqCP1iy2wr88aGo1vxWi T0Ziahjr3puThTfYfd/WORgv51yuwBj0SGdExwmJt0/1DLn8FK7re5ZUFHO5BTA3YtmT xIqiBaMAupsmNedjfDXTZCpQlO9QfnV8dk/bNE/y7EmcQQyfvEPAqRExvPq6OOio52ip lC2Mkr36WslH8zDW9yuK3XS85xDv4CIMUOnALeEfDww9gX2XW5brwwMSVSHpuTd9EVXi Bdew== X-Gm-Message-State: ANoB5pnHYh17cRqPGqYNeQUmmeoZdeBzyphctzoiEFiFCL9zALXBekwb bEgZ2n1ry6aPBbggdV6SsWc= X-Google-Smtp-Source: AA0mqf7tDFrCyXY7B/kha4QhakeSxSTPEppHjSEdAzbxk5un3T+fSQeD2POEtNN9EADG1aEGyjv6IQ== X-Received: by 2002:aa7:988b:0:b0:574:c00f:7df4 with SMTP id r11-20020aa7988b000000b00574c00f7df4mr8528332pfl.49.1669493881246; Sat, 26 Nov 2022 12:18:01 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id 126-20020a621784000000b0056bb0357f5bsm5064911pfx.192.2022.11.26.12.18.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Nov 2022 12:18:00 -0800 (PST) Content-Language: en-US In-Reply-To: <83v8n1qz3k.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249141 Archived-At: On 11/26/2022 11:45 AM, Eli Zaretskii wrote: >> Date: Sat, 26 Nov 2022 11:04:48 -0800 >> Cc: 58877@debbugs.gnu.org >> From: Jim Porter >> >>> I think you need to modify the tests to ensure the server file is created in >>> a temporary directory. And keep in mind that the variable which affects >>> that is different depending on whether server-use-tcp is or isn't non-nil. >> >> Hm, I'm surprised the tests failed again for you then. Both of the >> patches I posted to fix the tests set the 'server-name' to a (hopefully) >> unique value. >> >> Still, I think it's a good idea to use a temporary directory to hold the >> server file, so here's a patch that does that. I've tried this patch >> with a production Emacs server running at the same time in several >> different configurations (with 'server-use-tcp' on and off, and with >> --daemon), and the tests all pass locally for me on GNU/Linux. > > Still fails, and here's why: > > Client output: d:\gnu\git\emacs\trunk\lib-src\emacsclient.exe: unrecognized option '--socket-name' > Try 'd:\gnu\git\emacs\trunk\lib-src\emacsclient.exe --help' for more information > > Process d:/gnu/git/emacs/trunk/lib-src/emacsclient exited abnormally with code 1 > > There's no --socket-name switch on MS-Windows; you need to use --server-file > instead. Ah ha, that explains it. I didn't realize that distinction. > If I change server-tests/start-client to use --server-file, the next problem > rears its ugly head: > > Client output: *ERROR*: Not using an ASCII terminal now; cannot make a new ASCII frame > > Process d:/gnu/git/emacs/trunk/lib-src/emacsclient exited abnormally with code 1 > > This is because emacsclient on Windows cannot create new terminal frames, > only new GUI frames, unless Emacs was started as "emacs -nw". > > Why do these tests need TTY frames? The test code just calls "emacsclient -c", and they should be happy with any kind of frame, TTY or GUI. I guess that by running in batch mode, Emacs will try to create TTY frames, but that fails on MS Windows? > Btw, with the above changes, only 3 tests fail: > > 3 unexpected results: > FAILED server-tests/emacsclient/create-frame > FAILED server-tests/server-force-stop/keeps-frames > FAILED server-tests/server-start/stop-prompt-with-client > > So this is progress, thanks. All these tests involve creating client frames, so that makes sense. I'm not sure how to coax Emacs into creating GUI frames on MS Windows for these tests though. Still, I don't think these failures are a sign of anything broken exactly; it's just the combination of MS Windows' limitations with trying to create frames in an Emacs batch session. Unless you have an idea for how to fix that (I've got no clue, unfortunately), how about just skipping these tests on MS Windows, with a comment explaining what the limitation is?