Kill default buffer (with cursor)
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Windows 10, Emacs 25.1, Helm
I open 3 buffers (3 files).
Show only 2 buffers.
As you can see the current buffer is my_buffer_1 because cursor is in this buffer.
I want to kill this current buffer.
M-x kill-buffer
But Emacs ask me what exactly buffer I want to kill.
I select my_buffer_1 and press Enter. As result buffer is killed.
Is it possible Emacs to not ask me about buffer name and kill default (with cursor) buffer? In my case this is a my_buffer_1.
kill-buffer
add a comment |Â
up vote
2
down vote
favorite
Windows 10, Emacs 25.1, Helm
I open 3 buffers (3 files).
Show only 2 buffers.
As you can see the current buffer is my_buffer_1 because cursor is in this buffer.
I want to kill this current buffer.
M-x kill-buffer
But Emacs ask me what exactly buffer I want to kill.
I select my_buffer_1 and press Enter. As result buffer is killed.
Is it possible Emacs to not ask me about buffer name and kill default (with cursor) buffer? In my case this is a my_buffer_1.
kill-buffer
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Windows 10, Emacs 25.1, Helm
I open 3 buffers (3 files).
Show only 2 buffers.
As you can see the current buffer is my_buffer_1 because cursor is in this buffer.
I want to kill this current buffer.
M-x kill-buffer
But Emacs ask me what exactly buffer I want to kill.
I select my_buffer_1 and press Enter. As result buffer is killed.
Is it possible Emacs to not ask me about buffer name and kill default (with cursor) buffer? In my case this is a my_buffer_1.
kill-buffer
Windows 10, Emacs 25.1, Helm
I open 3 buffers (3 files).
Show only 2 buffers.
As you can see the current buffer is my_buffer_1 because cursor is in this buffer.
I want to kill this current buffer.
M-x kill-buffer
But Emacs ask me what exactly buffer I want to kill.
I select my_buffer_1 and press Enter. As result buffer is killed.
Is it possible Emacs to not ask me about buffer name and kill default (with cursor) buffer? In my case this is a my_buffer_1.
kill-buffer
asked Aug 10 at 15:58
Alexei
31919
31919
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
5
down vote
Use the function kill-this-buffer
. I basically never want to kill buffers that are not the current buffer, so I rebind C-x k
to that function:
(global-set-key (kbd "C-x k") #'kill-this-buffer)
(Of course, if you ever do wanted to be prompted for a buffer to kill, you can just run M-x kill-buffer
, or since you use Helm, kill it from the buffer switcher.)
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
Use the function kill-this-buffer
. I basically never want to kill buffers that are not the current buffer, so I rebind C-x k
to that function:
(global-set-key (kbd "C-x k") #'kill-this-buffer)
(Of course, if you ever do wanted to be prompted for a buffer to kill, you can just run M-x kill-buffer
, or since you use Helm, kill it from the buffer switcher.)
add a comment |Â
up vote
5
down vote
Use the function kill-this-buffer
. I basically never want to kill buffers that are not the current buffer, so I rebind C-x k
to that function:
(global-set-key (kbd "C-x k") #'kill-this-buffer)
(Of course, if you ever do wanted to be prompted for a buffer to kill, you can just run M-x kill-buffer
, or since you use Helm, kill it from the buffer switcher.)
add a comment |Â
up vote
5
down vote
up vote
5
down vote
Use the function kill-this-buffer
. I basically never want to kill buffers that are not the current buffer, so I rebind C-x k
to that function:
(global-set-key (kbd "C-x k") #'kill-this-buffer)
(Of course, if you ever do wanted to be prompted for a buffer to kill, you can just run M-x kill-buffer
, or since you use Helm, kill it from the buffer switcher.)
Use the function kill-this-buffer
. I basically never want to kill buffers that are not the current buffer, so I rebind C-x k
to that function:
(global-set-key (kbd "C-x k") #'kill-this-buffer)
(Of course, if you ever do wanted to be prompted for a buffer to kill, you can just run M-x kill-buffer
, or since you use Helm, kill it from the buffer switcher.)
answered Aug 10 at 16:23


Omar
2,305823
2,305823
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f44053%2fkill-default-buffer-with-cursor%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password