From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#11358: 24.1.50; Feature request: A way to abort emacs-client Date: Fri, 04 Jun 2021 11:13:24 +0200 Message-ID: <87mts60z7v.fsf@gnus.org> References: <20120427.094458.962283820717487751.hanche@math.ntnu.no> <878txecl2l.fsf@users.sourceforge.net> <8735u093fe.fsf@gnus.org> <87r1hjbf3r.fsf@gnus.org> <83wnrbwfg8.fsf@gnu.org> <1AC8AF23-F1EB-4A0D-B702-8931B318B36D@ntnu.no> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18754"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "11358@debbugs.gnu.org" <11358@debbugs.gnu.org>, "npostavs@users.sourceforge.net" To: Harald Hanche-Olsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 04 11:14:21 2021 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 1lp5uG-0004hG-PH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Jun 2021 11:14:20 +0200 Original-Received: from localhost ([::1]:38100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp5uF-0007iK-Rr for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Jun 2021 05:14:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp5ty-0007gD-KO for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 05:14:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lp5ty-0000Xp-CH for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 05:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lp5ty-00072B-8N for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 05:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Jun 2021 09:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 11358-submit@debbugs.gnu.org id=B11358.162279802526992 (code B ref 11358); Fri, 04 Jun 2021 09:14:02 +0000 Original-Received: (at 11358) by debbugs.gnu.org; 4 Jun 2021 09:13:45 +0000 Original-Received: from localhost ([127.0.0.1]:45326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lp5td-00071A-6u for submit@debbugs.gnu.org; Fri, 04 Jun 2021 05:13:45 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:58668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lp5tY-00070i-0n for 11358@debbugs.gnu.org; Fri, 04 Jun 2021 05:13:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WnqwdEgqg+MqzTsJLJTSavApk37UmUc9D1eB30WlAbo=; b=LYXOmEzAv8LvVZjpCHXkIpHkAu Xi6GB8sl15PsPWodcuAG+JyaW8yOKYQkTJrg5bAvQnniq/cMyDCPBc9Aa/Y7LrSyZxCHtorlkLU6h pw0G3RpoPK8hLZYA/mI3ukrIm1PRqcXdQCMpK5QQGAjOpr9QUFGqgPonDv+2Qh2YIuV4=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lp5tN-0003cK-2F; Fri, 04 Jun 2021 11:13:29 +0200 X-Now-Playing: Mia Doi Todd's _Music Life_: "Daughter of Hope" In-Reply-To: <1AC8AF23-F1EB-4A0D-B702-8931B318B36D@ntnu.no> (Harald Hanche-Olsen's message of "Thu, 3 Jun 2021 14:46:33 +0000") 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" Xref: news.gmane.io gmane.emacs.bugs:207984 Archived-At: Harald Hanche-Olsen writes: > Here is a very naive first stab: > > (defun server-abort () > (interactive) > (if server-clients > (mapc (lambda (proc) > (server-send-string > proc (concat "-error " > (server-quote-arg "Aborted by the user")))) > server-clients) > (message "This buffer has no clients"))) > > That is good enough for me, but =E2=80=98server-edit=E2=80=99 (or =E2=80= =98server-done=E2=80=99, really) > does a bit of housekeeping that this one does not. Thanks, I installed this in Emacs 28 (under the name server-edit-abort). This, along with your previous patch, reaches the limit of the number of lines we can accept into Emacs without a copyright assignment. Would you be willing to sign such paperwork? > Most importantly, what this code does not is decide what to do > with the buffer. It appears that, if it is unmodified, a process sentinel > will delete it, but if it is modified, it remains. Perhaps that is okay. > Perhaps aborting a server is such an exceptional event, one should > leave the cleanup to the user anyhow. Yes, I think that makes sense. If somebody wants to add more logic here (to query the user for something), that might also be nice. But it may not be necessary. > Further =E2=80=98server-edit=E2=80=99 will try to switch to a different s= erver buffer, > if one exists. This code does not. Again, perhaps that is as it should be. Yeah, I think aborting just the current buffer makes sense, but I can see somebody wanting this to behave more like `server-edit' -- I guess we'll see. But I think this is fine for now, at least, so I'm closing this bug report. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no