[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there any local variable to avoid asking me to save buffer on kil
From: |
Jean Louis |
Subject: |
Re: Is there any local variable to avoid asking me to save buffer on kill-buffer? |
Date: |
Mon, 16 Dec 2024 10:14:58 +0300 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
* Jean Louis <bugs@gnu.support> [2024-12-16 10:01]:
> I have bunch of temporary buffers which I regularly use, like 160
> times in 8 days, and as they are truly temporary I do not want to
> answer the question on `C-x k' yes/no/save?
>
> Maybe there is some local variable which I could set on opening of the
> buffer to kill the buffer on `C-x k' without getting bothered, anybody
> knows?
(defun rcd-temp-buffer-kill-current ()
"Kill current buffer without asking."
(interactive)
(let ((buffer-name (buffer-name (current-buffer))))
(kill-matching-buffers-no-ask (regexp-quote buffer-name))
(message "Killed: " buffer-name)))
I see that above attempt is again asking me, but function is called "no-ask".
Is that a bug?
--
Jean Louis