* point of "buffer still has clients" message
@ 2013-11-25 7:52 Jarek Czekalski
2013-11-25 17:07 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Jarek Czekalski @ 2013-11-25 7:52 UTC (permalink / raw)
To: Help-gnu-emacs
Hi
I don't see a point of "buffer still has clients, kill it" message.
Found a stackoverflow item [1] about it, read the explanation that
follows in shreevatsa blog [2], but this still remains a mistery.
The other editors I know don't ask this question and I never noticed any
problem. Maybe it's time to revise it? I believe it must be annoying to
all the people switching from a "normal" editor.
Can someone provide a use case for this message?
I know there are workarounds and I can remove it. But first I'm checking
if this shouldn't be removed in factory.
Thanks
Jarek
[1]
http://stackoverflow.com/questions/268088/how-to-remove-the-prompt-for-killing-emacsclient-buffers
[2] http://shreevatsa.wordpress.com/2007/01/06/using-emacsclient/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: point of "buffer still has clients" message
2013-11-25 7:52 point of "buffer still has clients" message Jarek Czekalski
@ 2013-11-25 17:07 ` Eli Zaretskii
2013-11-26 15:13 ` Jarek Czekalski
[not found] ` <mailman.7173.1385478804.10748.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2013-11-25 17:07 UTC (permalink / raw)
To: Help-gnu-emacs
> Date: Mon, 25 Nov 2013 08:52:10 +0100
> From: Jarek Czekalski <jarekczek@poczta.onet.pl>
>
> I don't see a point of "buffer still has clients, kill it" message.
(FWIW, I don't see a point of raising the issue here, as opposed to
the developers' list.)
> Found a stackoverflow item [1] about it, read the explanation that
> follows in shreevatsa blog [2], but this still remains a mistery.
The second one explains the reason quite clearly, I think. You need
to release the client when the file is safely stored on disk. How
else you suggest to do this, except by a special command?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: point of "buffer still has clients" message
2013-11-25 17:07 ` Eli Zaretskii
@ 2013-11-26 15:13 ` Jarek Czekalski
[not found] ` <mailman.7173.1385478804.10748.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Jarek Czekalski @ 2013-11-26 15:13 UTC (permalink / raw)
To: help-gnu-emacs
W dniu 2013-11-25 18:07, Eli Zaretskii pisze:
>> Date: Mon, 25 Nov 2013 08:52:10 +0100
>> From: Jarek Czekalski <jarekczek@poczta.onet.pl>
>>
>> I don't see a point of "buffer still has clients, kill it" message.
> The second one explains the reason quite clearly, I think. You need
> to release the client when the file is safely stored on disk. How
> else you suggest to do this, except by a special command?
There must be a misunderstanding between us. The question appears when I
try to kill the buffer. I don't see any connection with "safely storing
on disk". What's more, this question is asked even if I try to kill the
buffer right after storing it safely on disk.
I ask this on user list, because there may be a substantial lack of
knowledge on my side, which may be suplemented by experienced Emacs users.
I suggest to do it as it is currently done, without bothering user with
a question, which they always answer with "yes".
Jarek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: point of "buffer still has clients" message
[not found] ` <mailman.7173.1385478804.10748.help-gnu-emacs@gnu.org>
@ 2013-11-26 15:55 ` Barry Margolin
2013-11-27 7:32 ` Jarek Czekalski
0 siblings, 1 reply; 8+ messages in thread
From: Barry Margolin @ 2013-11-26 15:55 UTC (permalink / raw)
To: help-gnu-emacs
In article <mailman.7173.1385478804.10748.help-gnu-emacs@gnu.org>,
Jarek Czekalski <jarekczek@poczta.onet.pl> wrote:
> W dniu 2013-11-25 18:07, Eli Zaretskii pisze:
> >> Date: Mon, 25 Nov 2013 08:52:10 +0100
> >> From: Jarek Czekalski <jarekczek@poczta.onet.pl>
> >>
> >> I don't see a point of "buffer still has clients, kill it" message.
> > The second one explains the reason quite clearly, I think. You need
> > to release the client when the file is safely stored on disk. How
> > else you suggest to do this, except by a special command?
>
> There must be a misunderstanding between us. The question appears when I
> try to kill the buffer. I don't see any connection with "safely storing
> on disk". What's more, this question is asked even if I try to kill the
> buffer right after storing it safely on disk.
>
> I ask this on user list, because there may be a substantial lack of
> knowledge on my side, which may be suplemented by experienced Emacs users.
>
> I suggest to do it as it is currently done, without bothering user with
> a question, which they always answer with "yes".
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 Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: point of "buffer still has clients" message
2013-11-26 15:55 ` Barry Margolin
@ 2013-11-27 7:32 ` Jarek Czekalski
2013-11-27 8:42 ` Ian van der Neut
0 siblings, 1 reply; 8+ messages in thread
From: Jarek Czekalski @ 2013-11-27 7:32 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: point of "buffer still has clients" message
2013-11-27 7:32 ` Jarek Czekalski
@ 2013-11-27 8:42 ` Ian van der Neut
2013-11-27 15:18 ` Ludwig, Mark
[not found] ` <mailman.7255.1385566785.10748.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: Ian van der Neut @ 2013-11-27 8:42 UTC (permalink / raw)
To: Jarek Czekalski; +Cc: help-gnu-emacs
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
<jarekczek@poczta.onet.pl>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"
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: point of "buffer still has clients" message
2013-11-27 8:42 ` Ian van der Neut
@ 2013-11-27 15:18 ` Ludwig, Mark
[not found] ` <mailman.7255.1385566785.10748.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Ludwig, Mark @ 2013-11-27 15:18 UTC (permalink / raw)
To: Ian van der Neut, Jarek Czekalski; +Cc: help-gnu-emacs@gnu.org
> From: Ian van der Neut, Wednesday, November 27, 2013 2:43 AM
>
> 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,
-and-
> 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.
I've been using the client-server technology for over a
decade, and I've always wondered about the value of this
prompt.
When this thread started, I thought the prompt was perhaps
asking whether to notify the client that I finished editing
this file, but based on experimentation on both Windows and
Solaris, that is not the case: killing the buffer (via
(kill-buffer)) releases the client.
I wonder if the original RMS comment was long enough ago
that Emacs did not prompt before killing a buffer with
unsaved modifications...?
As it stands now, if I try to kill a buffer with unsaved
modifications, I get a prompt making me confirm that I want
to throw away the changes, which seems like enough to me.
The extra prompt because the buffer has a client waiting for
it seems redundant. Am I missing something?
Thanks,
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: point of "buffer still has clients" message
[not found] ` <mailman.7255.1385566785.10748.help-gnu-emacs@gnu.org>
@ 2013-11-27 22:27 ` Barry Margolin
0 siblings, 0 replies; 8+ messages in thread
From: Barry Margolin @ 2013-11-27 22:27 UTC (permalink / raw)
To: help-gnu-emacs
In article <mailman.7255.1385566785.10748.help-gnu-emacs@gnu.org>,
"Ludwig, Mark" <ludwig.mark@siemens.com> wrote:
> I wonder if the original RMS comment was long enough ago
> that Emacs did not prompt before killing a buffer with
> unsaved modifications...?
Emacs has been prompting about that for as long as I've been using it,
over 30 years. It was in ITS EMACS, Multics Emacs, and every other clone
I've encountered.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-11-27 22:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 7:52 point of "buffer still has clients" message Jarek Czekalski
2013-11-25 17:07 ` Eli Zaretskii
2013-11-26 15:13 ` Jarek Czekalski
[not found] ` <mailman.7173.1385478804.10748.help-gnu-emacs@gnu.org>
2013-11-26 15:55 ` Barry Margolin
2013-11-27 7:32 ` Jarek Czekalski
2013-11-27 8:42 ` Ian van der Neut
2013-11-27 15:18 ` Ludwig, Mark
[not found] ` <mailman.7255.1385566785.10748.help-gnu-emacs@gnu.org>
2013-11-27 22:27 ` Barry Margolin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).