C-xh runs the command mark-whole-buffer (select all)
M-w runs the command kill-ring-save (copy)
As with many programs, you can find both "Select All" and "Copy" in the Edit menu — where you can also see the aforementioned key bindings being advertised.
As phils said, you can find it in the Edit menu, with the main keyboard shortcut C-xh.
Furthermore, you can see ALL the key bindings by typing ctrl-hk and then clicking menu Edit > Select All, leading emacs to open an *Help* buffer containing:
<menu-bar> <edit> <mark-whole-buffer> runs the command mark-whole-buffer (found in global-map)
It is bound to s-a, C-x h, <menu-bar> <edit> <mark-whole-buffer>.
You may notice the key binding s-a which means super-a (thanks phils) and, on the mac, refers to the standard shortcut cmd-a (press and hold the cmd modifier and type the letter a).
Otherwise, on any emacs, you may also type M-xmark-whole-bufferRET (which can be useful if you want to insert in an emacs-lisp function) or the sequence M-<C-xSPACEM-> (which can be useful if you want to skip the first line of the buffer for example).
2
Answers
mark-whole-buffer
(select all)kill-ring-save
(copy)As with many programs, you can find both "Select All" and "Copy" in the
Edit
menu — where you can also see the aforementioned key bindings being advertised.As phils said, you can find it in the
Edit
menu, with the main keyboard shortcutC-x
h
.Furthermore, you can see ALL the key bindings by typing
ctrl-h
k
and then clicking menuEdit
>Select All
, leading emacs to open an*Help*
buffer containing:You may notice the key binding
s-a
which meanssuper-a
(thanks phils) and, on the mac, refers to the standard shortcutcmd-a
(press and hold thecmd
modifier and type the lettera
).Otherwise, on any emacs, you may also type
M-x
mark-whole-buffer
RET
(which can be useful if you want to insert in an emacs-lisp function) or the sequenceM-<
C-x
SPACE
M->
(which can be useful if you want to skip the first line of the buffer for example).