Selecting whole buffer

Just ran into this emacs key binding. Someday I need to just read the manual and mark all the stuff I wish I knew already for later study. But since I will probably never do that here is yet another cool thing in emacs which I didn’t know about:

C-x h runs the command mark-whole-buffer
which is an interactive compiled Lisp function in `simple.el’.
It is bound to C-x h,

.
(mark-whole-buffer)

Put point at beginning and mark at end of buffer.
You probably should not use this function in Lisp programs;
it is usually a mistake for a Lisp function to use any subroutine
that uses or sets the mark.

If you didn’t know about this, enjoy.

Leave a Reply