Emacs - kill buffer without prompt The Next CEO of Stack Overflowstrange characters in emacs...
Proper way to express "He disappeared them"
Find non-case sensitive string in a mixed list of elements?
Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?
0 rank tensor vs 1D vector
How to count occurrences of text in a file?
What is the value of α and β in a triangle?
RigExpert AA-35 - Interpreting The Information
Does increasing your ability score affect your main stat?
What flight has the highest ratio of time difference to flight time?
Why is my new battery behaving weirdly?
Why do airplanes bank sharply to the right after air-to-air refueling?
Easy to read palindrome checker
Are police here, aren't itthey?
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
Does Germany produce more waste than the US?
Axiom Schema vs Axiom
Why does standard notation not preserve intervals (visually)
Where do students learn to solve polynomial equations these days?
Unclear about dynamic binding
Can we say or write : "No, it'sn't"?
Flying from Cape Town to England and return to another province
How to get from Geneva Airport to Metabief?
Is it professional to write unrelated content in an almost-empty email?
Is a distribution that is normal, but highly skewed considered Gaussian?
Emacs - kill buffer without prompt
The Next CEO of Stack Overflowstrange characters in emacs shell bufferHow to set the exit status for emacsclientCan I display emacs buffer modification history?get emacs 23 buffer-list behavior in emacs 24?Kill compilation buffer after successHow can I kill the buffer when I exit emacs clientemacs buffer color control charactersCannot kill emacs with M-x kill-emacsEmacs initial anonymous bufferEmacs command to kill other buffer and window
I'm wondering how it can be done, so Emacs doesn't pop the prompt asking me whether I really want to kill current buffer with C-x k shortcut.
Interesting thing is that same action done via toolbar kills buffer instantly without prompting the user. Any solution? Thank you.
emacs
add a comment |
I'm wondering how it can be done, so Emacs doesn't pop the prompt asking me whether I really want to kill current buffer with C-x k shortcut.
Interesting thing is that same action done via toolbar kills buffer instantly without prompting the user. Any solution? Thank you.
emacs
add a comment |
I'm wondering how it can be done, so Emacs doesn't pop the prompt asking me whether I really want to kill current buffer with C-x k shortcut.
Interesting thing is that same action done via toolbar kills buffer instantly without prompting the user. Any solution? Thank you.
emacs
I'm wondering how it can be done, so Emacs doesn't pop the prompt asking me whether I really want to kill current buffer with C-x k shortcut.
Interesting thing is that same action done via toolbar kills buffer instantly without prompting the user. Any solution? Thank you.
emacs
emacs
asked Nov 7 '11 at 18:47
JarekJarek
71621228
71621228
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
By default, Emacs doesn't ask you if you want to kill the buffer. It does ask you which buffer you want to kill.
If you don't want to be asked which buffer you want to kill, you can use this:
(global-set-key (kbd "C-x k") 'kill-this-buffer)
If you're being prompted for confirmation, then there's something in your .emacs (or the site specific initialziation). Try running emacs -q
to check Emacs w/out your .emacs.
Note: Verified with Emacs 23.2.
1
'kill-this-buffer is part of emacs and that should be used instead.
– Jaseem
Feb 26 '15 at 19:02
add a comment |
You can find out what that menu entry does with C-h k and then clicking on the entry. It turns out to be a command named kill-this-buffer.
Then you can bind that command to a key combination:
(global-set-key "C-xk" 'kill-this-buffer)
add a comment |
I use this
(global-set-key (kbd "C-x k") (lambda ()
(interactive)
(kill-buffer (buffer-name))))
Minor improvement: (kill-buffer (current-buffer))
– Jaseem
Feb 26 '15 at 19:01
add a comment |
answered here: https://stackoverflow.com/questions/6467002/how-to-kill-buffer-in-emacs-without-answering-confirmation
(defun volatile-kill-buffer ()
"Kill current buffer unconditionally."
(interactive)
(let ((buffer-modified-p nil))
(kill-buffer (current-buffer))))
(global-set-key (kbd "C-x k") 'volatile-kill-buffer) ;; Unconditionally kill unmodified buffers.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f354849%2femacs-kill-buffer-without-prompt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
By default, Emacs doesn't ask you if you want to kill the buffer. It does ask you which buffer you want to kill.
If you don't want to be asked which buffer you want to kill, you can use this:
(global-set-key (kbd "C-x k") 'kill-this-buffer)
If you're being prompted for confirmation, then there's something in your .emacs (or the site specific initialziation). Try running emacs -q
to check Emacs w/out your .emacs.
Note: Verified with Emacs 23.2.
1
'kill-this-buffer is part of emacs and that should be used instead.
– Jaseem
Feb 26 '15 at 19:02
add a comment |
By default, Emacs doesn't ask you if you want to kill the buffer. It does ask you which buffer you want to kill.
If you don't want to be asked which buffer you want to kill, you can use this:
(global-set-key (kbd "C-x k") 'kill-this-buffer)
If you're being prompted for confirmation, then there's something in your .emacs (or the site specific initialziation). Try running emacs -q
to check Emacs w/out your .emacs.
Note: Verified with Emacs 23.2.
1
'kill-this-buffer is part of emacs and that should be used instead.
– Jaseem
Feb 26 '15 at 19:02
add a comment |
By default, Emacs doesn't ask you if you want to kill the buffer. It does ask you which buffer you want to kill.
If you don't want to be asked which buffer you want to kill, you can use this:
(global-set-key (kbd "C-x k") 'kill-this-buffer)
If you're being prompted for confirmation, then there's something in your .emacs (or the site specific initialziation). Try running emacs -q
to check Emacs w/out your .emacs.
Note: Verified with Emacs 23.2.
By default, Emacs doesn't ask you if you want to kill the buffer. It does ask you which buffer you want to kill.
If you don't want to be asked which buffer you want to kill, you can use this:
(global-set-key (kbd "C-x k") 'kill-this-buffer)
If you're being prompted for confirmation, then there's something in your .emacs (or the site specific initialziation). Try running emacs -q
to check Emacs w/out your .emacs.
Note: Verified with Emacs 23.2.
edited Feb 27 '15 at 20:11
answered Nov 7 '11 at 20:10
Trey JacksonTrey Jackson
3,5411722
3,5411722
1
'kill-this-buffer is part of emacs and that should be used instead.
– Jaseem
Feb 26 '15 at 19:02
add a comment |
1
'kill-this-buffer is part of emacs and that should be used instead.
– Jaseem
Feb 26 '15 at 19:02
1
1
'kill-this-buffer is part of emacs and that should be used instead.
– Jaseem
Feb 26 '15 at 19:02
'kill-this-buffer is part of emacs and that should be used instead.
– Jaseem
Feb 26 '15 at 19:02
add a comment |
You can find out what that menu entry does with C-h k and then clicking on the entry. It turns out to be a command named kill-this-buffer.
Then you can bind that command to a key combination:
(global-set-key "C-xk" 'kill-this-buffer)
add a comment |
You can find out what that menu entry does with C-h k and then clicking on the entry. It turns out to be a command named kill-this-buffer.
Then you can bind that command to a key combination:
(global-set-key "C-xk" 'kill-this-buffer)
add a comment |
You can find out what that menu entry does with C-h k and then clicking on the entry. It turns out to be a command named kill-this-buffer.
Then you can bind that command to a key combination:
(global-set-key "C-xk" 'kill-this-buffer)
You can find out what that menu entry does with C-h k and then clicking on the entry. It turns out to be a command named kill-this-buffer.
Then you can bind that command to a key combination:
(global-set-key "C-xk" 'kill-this-buffer)
answered Nov 8 '11 at 12:37
nschumnschum
280112
280112
add a comment |
add a comment |
I use this
(global-set-key (kbd "C-x k") (lambda ()
(interactive)
(kill-buffer (buffer-name))))
Minor improvement: (kill-buffer (current-buffer))
– Jaseem
Feb 26 '15 at 19:01
add a comment |
I use this
(global-set-key (kbd "C-x k") (lambda ()
(interactive)
(kill-buffer (buffer-name))))
Minor improvement: (kill-buffer (current-buffer))
– Jaseem
Feb 26 '15 at 19:01
add a comment |
I use this
(global-set-key (kbd "C-x k") (lambda ()
(interactive)
(kill-buffer (buffer-name))))
I use this
(global-set-key (kbd "C-x k") (lambda ()
(interactive)
(kill-buffer (buffer-name))))
answered Nov 7 '11 at 21:23
kindaherokindahero
1,053710
1,053710
Minor improvement: (kill-buffer (current-buffer))
– Jaseem
Feb 26 '15 at 19:01
add a comment |
Minor improvement: (kill-buffer (current-buffer))
– Jaseem
Feb 26 '15 at 19:01
Minor improvement: (kill-buffer (current-buffer))
– Jaseem
Feb 26 '15 at 19:01
Minor improvement: (kill-buffer (current-buffer))
– Jaseem
Feb 26 '15 at 19:01
add a comment |
answered here: https://stackoverflow.com/questions/6467002/how-to-kill-buffer-in-emacs-without-answering-confirmation
(defun volatile-kill-buffer ()
"Kill current buffer unconditionally."
(interactive)
(let ((buffer-modified-p nil))
(kill-buffer (current-buffer))))
(global-set-key (kbd "C-x k") 'volatile-kill-buffer) ;; Unconditionally kill unmodified buffers.
add a comment |
answered here: https://stackoverflow.com/questions/6467002/how-to-kill-buffer-in-emacs-without-answering-confirmation
(defun volatile-kill-buffer ()
"Kill current buffer unconditionally."
(interactive)
(let ((buffer-modified-p nil))
(kill-buffer (current-buffer))))
(global-set-key (kbd "C-x k") 'volatile-kill-buffer) ;; Unconditionally kill unmodified buffers.
add a comment |
answered here: https://stackoverflow.com/questions/6467002/how-to-kill-buffer-in-emacs-without-answering-confirmation
(defun volatile-kill-buffer ()
"Kill current buffer unconditionally."
(interactive)
(let ((buffer-modified-p nil))
(kill-buffer (current-buffer))))
(global-set-key (kbd "C-x k") 'volatile-kill-buffer) ;; Unconditionally kill unmodified buffers.
answered here: https://stackoverflow.com/questions/6467002/how-to-kill-buffer-in-emacs-without-answering-confirmation
(defun volatile-kill-buffer ()
"Kill current buffer unconditionally."
(interactive)
(let ((buffer-modified-p nil))
(kill-buffer (current-buffer))))
(global-set-key (kbd "C-x k") 'volatile-kill-buffer) ;; Unconditionally kill unmodified buffers.
answered 9 mins ago
Kirill YunussovKirill Yunussov
991
991
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f354849%2femacs-kill-buffer-without-prompt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown