Shortcut

Emacs Close a buffer Shortcut

The Emacs shortcut to close a buffer is Ctrl + X, K on Windows. It's the same on Mac.

Quick Answer

Windows
Ctrl+X, K
Mac
Ctrl+X, K
Web
Not confirmed yet
EmacsShortcut

Close a buffer

Windows
Ctrl+X, K

Kill a buffer by name, asking first if it has unsaved changes (kill-buffer).

Learn More

How to close a buffer in Emacs

  1. Open Emacs and go to where you want to close a buffer.
  2. Press Ctrl + X, K on Windows or Ctrl + X, K on Mac.

Emacs Close a buffer Shortcut for Windows

Press Ctrl + X, K.

Emacs Close a buffer Shortcut for Mac

Press Ctrl + X, K.

Emacs Close a buffer Shortcut for Emacs Web

We haven't confirmed a Emacs Web shortcut for this yet.

Version note: verify against the GNU Emacs Manual before publishing

Related Keyboard Shortcuts

Frequently asked questions

What is the Emacs close a buffer shortcut?

On Windows, press Ctrl + X, K. On a Mac, press Ctrl + X, K.

Is there a Mac shortcut to close a buffer in Emacs?

Yes: Ctrl + X, K.

Does it work in Emacs for the web?

We haven't confirmed a web version shortcut for this yet.

Official source · How we verify