Emacs: what is the shortcut key to clear buffer?
How about using:
M-x erase-buffer
Which you could bind to whatever you want.
C-x h + del
key clears the buffer
Note: This requires transient-mark-mode
to be enabled (which it is by default).
Select all in Emacs is:
C-x h
(technically, that's mark-whole-buffer) and kill-region (to kill the marked region, which is now the entire buffer) is:
C-w
If you want to delete the region without copying it to the kill-ring, you can use
M-x delete-region
instead. If you do this alot, you'll want to bind delete-region to a key/key combo.