w32
[Version 6.1.7601] win. 7 Emacs 24.3.1
In command prompt I would type something like junk.txt, see Emacs icon
blinking in task bar, click on it, be in junk.txt buffer. There I would
type C-x k and then see prompt messages:
Kill buffer (default: junk.txt) rtn ;;; this line is not written to
*Messages*
and then
Buffer `junk.txt' still has clients; kill it? (y or n) y ;;;; this
line is written to *Messages*.
I have tried the above with diffent values for kill-buffer-hook both
local and global by evaluating forms like these:
(add-hook 'kill-buffer-hook 'server-kill-buffer)
(remove-hook 'kill-buffer-hook 'server-kill-buffer)
(add-hook 'kill-buffer-hook 'server-edit)
I even tried:
(defun servedit-y()
(server-edit)
(write-char ?y)
)
(add-hook 'kill-buffer-hook 'servedit-y)
but of course that didn't work. Can you give me a hint toward a
complete working example of using kill-buffer-hook to accomplish what I
want?
When I first inspected kill-buffer-hook with C-h v it contained
(browse-url-delete-temp-file recentf-track-closed-file
erc-kill-buffer-function vc-kill-buffer-hook). These must have come from
various customizations made over the years. It looks like its pristine
value would have been nil.
ed
On 3/10/2019 12:47, Eli Zaretskii wrote:
From: T400 <cau...@sysmatrix.net>
Date: Sun, 10 Mar 2019 12:03:43 -0500
I evaluated (add-hook 'kill-buffer-hook 'server-edit) and then typed C-h
v to check value of variable:
(server-edit browse-url-delete-temp-file recentf-track-closed-file
erc-kill-buffer-function vc-kill-buffer-hook)
on running C-x k in a live buffer raised directly from the command
prompt I am still queried with that buffer still has clients verbiage,
this time in the mini-buffer rather than in a pop-up. I just want to
press return and have the buffer silently killed.
I don't think I understand what's going on in your case. Can you
quote exactly the message being shown? Also, what exactly are the
steps you do before you get this message?