bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16548: 24.3; remove "buffer has clients" prompt


From: Tim Howes
Subject: bug#16548: 24.3; remove "buffer has clients" prompt
Date: Wed, 29 Apr 2015 23:53:53 -0700 (MST)

I think this prompt should be kept. If I'm interpreting RMS's comment
correctly, he's worried about what happens when emacsclient is started from
some script or program, where the program is opening an editor window (most
likely using the EDITOR shell variable) and then waiting for the editor to
be done so that it can proceed and make use of the contents of the file. 

If a user has, say, forgotten why that particular buffer was opened, the
prompt reminds them that there is a client waiting on it, and the program
that started that client is possibly going to take some action using the
file contents. Killing the buffer will not cancel that action. Instead, the
program will proceed using whatever is currently saved in the file. 

This could lead to a mistake. Here's a scenario: I'm testing some
experimental program that runs into an error. The program wants me to send a
bug report to the developers, so it opens up an editor with a template email
(emacsclient -c template.txt), which I'm supposed to fill out, and it will
then send the email for me. I start writing a message, but don't save it. I
get distracted or start working on other things. I open another emacs client
frame and work on some other files. I finish with those other files, and
kill the buffers. Then I'm presented with the unsaved email from earlier. I
decide I don't care about sending the bug report, so I kill the buffer. I
expect that the email will not be sent, but the program is actually going to
proceed and send the uncompleted template. 

The prompt reminds me that the buffer is being used as an "editor" by some
other process. If I kill it carelessly, that process may end up doing
something unwanted. If I'm well aware of the circumstances and want to skip
the prompt, I should use C-x # ("done editing"). If I'm not worried about
such mistakes ever occurring, then I can remove the hook or change key
bindings in my emacs config. But it's probably best to have the prompt
appear by default, to help unaware users avoid mistakes.



--
View this message in context: 
http://emacs.1067599.n5.nabble.com/bug-16548-24-3-remove-buffer-has-clients-prompt-tp311633p357150.html
Sent from the Emacs - Bugs mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]