Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs: what is the shortcut key to clear buffer?

Tags:

emacs

Like, Control-A (select all) followed by delete?

like image 754
Ron Avatar asked Feb 03 '11 13:02

Ron


People also ask

How do I delete a buffer in Emacs?

Press C-h w. Type the name of the command: kill-buffer ( you can also use tab/space to autocomplete :) ) Press RET.

What is a buffer in Emacs?

Buffers in Emacs editing are objects that have distinct names and hold text that can be edited. Buffers appear to Lisp programs as a special data type. You can think of the contents of a buffer as a string that you can extend; insertions and deletions may occur in any part of the buffer.

How do I change the read only buffer in Emacs?

To change the read-only status of a buffer, use C-x C-q (toggle read-only-mode ). To change file permissions, you can run dired on the file's directory ( C-x d ), search for the file by C-s and use M to change its mode.


2 Answers

How about using:

M-x erase-buffer 

Which you could bind to whatever you want.

like image 87
Trey Jackson Avatar answered Oct 12 '22 02:10

Trey Jackson


C-x h + del key clears the buffer

Note: This requires transient-mark-mode to be enabled (which it is by default).

like image 35
jith912 Avatar answered Oct 12 '22 01:10

jith912