From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian van der Neut Newsgroups: gmane.emacs.help Subject: Re: point of "buffer still has clients" message Date: Wed, 27 Nov 2013 09:42:31 +0100 Message-ID: References: <529301AA.7070508@poczta.onet.pl> <83eh64beag.fsf@gnu.org> <52959FFE.4060703@poczta.onet.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1385541767 5659 80.91.229.3 (27 Nov 2013 08:42:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Nov 2013 08:42:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Jarek Czekalski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 27 09:42:53 2013 Return-path: Envelope-to: geh-help-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 1Vlahr-0002pg-Fh for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Nov 2013 09:42:47 +0100 Original-Received: from localhost ([::1]:34538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vlahr-0004HH-2F for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Nov 2013 03:42:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vlahe-0004HB-0R for help-gnu-emacs@gnu.org; Wed, 27 Nov 2013 03:42:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vlahc-0004yg-ES for help-gnu-emacs@gnu.org; Wed, 27 Nov 2013 03:42:33 -0500 Original-Received: from mail-qe0-x232.google.com ([2607:f8b0:400d:c02::232]:45284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vlahc-0004ya-7p for help-gnu-emacs@gnu.org; Wed, 27 Nov 2013 03:42:32 -0500 Original-Received: by mail-qe0-f50.google.com with SMTP id 1so4916010qec.23 for ; Wed, 27 Nov 2013 00:42:31 -0800 (PST) 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; bh=uwTUSyRABkITGrpUSuTlhV5EHnoPOlJtzE3nz1yM7mc=; b=qLXze08EdywglQMXNeIrYNGVgmKV6HZtJ1mrNJCy54+WgKM+EQvjF69n/pP4EU/o9L HPFgznc74GVRPACc5x+vH6wNVQ0RG7sSdCkeerQAWttspslwxZ+l5bP87bW+4C77O2Xd d50Mm/CGD4KMnlZWy9BR+hzQZCpKMWHQ2Uvzly8ytgSCtoerdsZ+Rkn2URMCVhOsBJEN uHrLg2jEHPZO/cfOpicQ37VNwOUeSJjfOsiwLeCKQcHXh1SRb35iruXqvd8Y4QrG5ULd xfH007thE+hfp0uctaE1ttdGv4wUdmyRwR9UR9OUsjuxqIShAHmKMGLtys43a0UOLduz rMJQ== X-Received: by 10.49.72.66 with SMTP id b2mr63624721qev.11.1385541751471; Wed, 27 Nov 2013 00:42:31 -0800 (PST) Original-Received: by 10.224.65.133 with HTTP; Wed, 27 Nov 2013 00:42:31 -0800 (PST) In-Reply-To: <52959FFE.4060703@poczta.onet.pl> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::232 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94673 Archived-At: For what it's worth, my use case where I run into this message is as follows: I have a function: (defun kill-buffer-delete-frame () "Kill the current buffer and delete the frame its in." (interactive) (if (kill-buffer) (delete-frame)) ) And a key bound to it: (global-set-key (kbd "C-c c") 'kill-buffer-delete-frame) I run into this message, seemingly unnecessary when I want to kill the buffer and close the frame it's in. should I call server-edit somewhere in that function to get rid of it? From the server-edit documentation it seems that it only kills the buffer if it didn't exist when loaded with emacsclient. I run emacsclient primarily with the --no-wait option btw, Thank you, Ian. On Wed, Nov 27, 2013 at 8:32 AM, Jarek Czekalski wrote: > > W dniu 2013-11-26 16:55, Barry Margolin pisze: > > When you have EDITOR set to most editors, the client starts a new editor >> process, you edit the file, save it, and then exit the editor. The >> client waits for the editor to exit, then it will use the result. >> >> But when you use emacsclient, it's not so simple. Emacs keeps on running >> after you save the file. Emacsclient is waiting for a message from emacs >> telling it that it you're done, so it should exit, and then its client >> application can use the result. You do this with the server-edit (C-x #) >> command. >> > > Barry, that definitely helps to understand the idea. But still it's not > clear why the things done in server-edit command couldn't be done during > kill-buffer. The user request is "close the file". They shouldn't have to > choose between server-edit and kill-buffer. > > The user experience is as follows: > 1. a shortcut is bound to kill-this-buffer > 2. a buffer is edited throught emacsclient > 3. user wants to kill the buffer with the shortcut he always uses for that > or using "File / Close" menu option > > So far you both didn't give any justification for the confirmation > message. If things stay this way we should assume that this message is > unnecessary and should be removed. > > Jarek > > > -- One man's "magic" is another man's engineering. "Supernatural" is a null word. -- Excerpt from the notebooks of Lazarus Long, from Robert Heinlein's "Time Enough for Love"