C-a bound to
mark-whole-buffer to replicate the "select all" feature of other standard GUI editors (I also use
cua-mode), as described in https://stackoverflow.com/questions/22544655/how-to-copy-select-a-whole-file-or-buffer-in-emacs
This works, but since point gets moved to the beginning of buffer it also scrolls me away from where I was working.
I would like my shortcut to mark whole buffer but not move my current screen.
My workflow would then be:
- be somewhere in middle of buffer
C-c-> I now have the buffer in my clipboard and my buffer did not scroll around
How could I do that?
I tried messing with the lines in https://www.gnu.org/software/emacs/manual/html_node/eintr/Body-of-mark_002dwhole_002dbuffer.html but couldn't manage to keep buffer selected AND move the mark back to its starting position.