From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#11358: 24.1.50; Feature request: A way to abort emacs-client Date: Wed, 06 Jul 2016 21:07:30 -0400 Message-ID: <878txecl2l.fsf@users.sourceforge.net> References: <20120427.094458.962283820717487751.hanche@math.ntnu.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467855533 10620 80.91.229.3 (7 Jul 2016 01:38:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2016 01:38:53 +0000 (UTC) Cc: 11358@debbugs.gnu.org To: Harald Hanche-Olsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 07 03:38:43 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bKyH1-0007l3-Fo for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jul 2016 03:38:39 +0200 Original-Received: from localhost ([::1]:36828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKyH0-0002I9-T4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2016 21:38:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKxnV-0005i3-4j for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 21:08:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKxnR-0007rc-Tk for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 21:08:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKxnR-0007r3-Ql for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 21:08:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bKxnO-0000ei-CX for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 21:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jul 2016 01:08: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: Original-Received: via spool by 11358-submit@debbugs.gnu.org id=B11358.14678536502477 (code B ref 11358); Thu, 07 Jul 2016 01:08:02 +0000 Original-Received: (at 11358) by debbugs.gnu.org; 7 Jul 2016 01:07:30 +0000 Original-Received: from localhost ([127.0.0.1]:40053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKxms-0000dt-Hq for submit@debbugs.gnu.org; Wed, 06 Jul 2016 21:07:30 -0400 Original-Received: from mail-io0-f175.google.com ([209.85.223.175]:34894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKxmp-0000df-Jn for 11358@debbugs.gnu.org; Wed, 06 Jul 2016 21:07:28 -0400 Original-Received: by mail-io0-f175.google.com with SMTP id f30so10316091ioj.2 for <11358@debbugs.gnu.org>; Wed, 06 Jul 2016 18:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=8JYHJqU4JILlO8bH58xEoP0XZadcU5ozDPBJXYD7jFE=; b=arJsjIx/T/mKT5OqmYMsJT6oXXlhuFxcy0IdQRoiWkpSYk15d+5Kr3c+yy2dZa+09t 6shYuY8pdbQCMNDvxRRXHhaeMKGDjrZ0ZcYYm5awRAeeQ+Uww/wToSxQPRZcxxiYoFLY PmnvAq9exIQSKUVoVjhIZYatIbfCMq/Ch/rLkp+OR3LE79qRgSIO51fdj4VcUMkBWewQ nt/8AgfxV3nBlhrjuavt4G2yh68X8O++xFwq0lHLga/10l6Oe18KEOK/eRkt01/Zo2MH YbOj82C0KV8V7uKFyvdRkUpDIFJhVHkRMELuWAiGN6mMnfQU6JKqE3V21t9xD1Qgq5Zx zi3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=8JYHJqU4JILlO8bH58xEoP0XZadcU5ozDPBJXYD7jFE=; b=k7zFucKpsH73H7Djfalg/hghLLjGbn9wbemZfPbZa2snSGovPygxwN/kPDJinivkHo R2AXQSdvVsUuZZgqi2045kw7XvlXNAonyckbPHOKeWypSMRf2S3ksiDBj5CZTWn0xKs1 dtCIu8elBznHZYDMCvbU12KL98eqkreWQpNOUDSsJNslTm69aV4edAMzw844rWf2kDaG OJOJtCvOFXVo3JxBo+z5rmHR12rgieQ1C0iSNwjIKbzhijyBz4twLtnMn09fap7RKBVK 22trFLhsPNAXrchTtES6xBVnEz8WqYjnbJVilw0G+cPk0PApWOF7OzvkrS3t1H8fd5E9 EaMw== X-Gm-Message-State: ALyK8tLrVv8MWihXQ706vbDTwTLnnJr9BX7iaPJo1/7v5clhSfGyGlGv+Bhg+EKDGMV80A== X-Received: by 10.107.19.169 with SMTP id 41mr24477355iot.11.1467853642048; Wed, 06 Jul 2016 18:07:22 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id q36sm3197ioi.37.2016.07.06.18.07.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jul 2016 18:07:21 -0700 (PDT) In-Reply-To: <20120427.094458.962283820717487751.hanche@math.ntnu.no> (Harald Hanche-Olsen's message of "Fri, 27 Apr 2012 09:44:58 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120548 Archived-At: Harald Hanche-Olsen writes: > There should be a way, from within a server editing buffer, to cause > the corresponding emacs-client process to exit with a nonzero exit > status. This can then be used by the calling process as an indication > that the user has abandoned the edit. > > If there is already a way to achieve this, consider this a > documentation bug: I am certainly unable to find this feature. There is a way to do this, I know because it's used by magit to tell git to cancel the commit message editing (with-editor is a library that was spun off from magit): (defun with-editor-return (cancel) (let ... (clients server-buffer-clients) ... (dolist (client clients) (ignore-errors (server-send-string client "-error Canceled by user")) ... The only documentation I could find on it was in server-process-filter docstring: (cl-defun server-process-filter (proc string) "Process a request from the server to edit some files. PROC is the server process. [...] The following commands are accepted by the client: [...] `-error DESCRIPTION' Signal an error and delete process PROC. Probably it should be mentioned in the elisp manual somewhere, not sure where, there doesn't seem to be an appropriate existing chapter.