1

I would normally be able to do this myself by merely adding:

(global-set-key (kbd "C-a") 'select-all)

to my ~/.emacs file but select-all isn't the command for the "Select All" option in the Edit menu (which selects all text in the current buffer). I have tried searching for "select" in the list of commands via pressing Ctrl-h-a and typing "select", but that did not return any result with "Select all" in its description. Any ideas? If it at all relevant I am using the experimental 25.1.90 release (the one tagged in the emacs-mirror/emacs GitHub repository) of GNU Emacs.

5

mark-whole-buffer is the command you want. Here are some ways to discover it:

  • f1c (describe-key) works on menu items too. In this case it would tell you

    <menu-bar> <edit> <mark-whole-buffer> runs the command mark-whole-buffer
    
  • mark-whole-buffer is in the manual's index under "select all": f1r to open the manual, iselect allRET to check the index for "select all".

    ‘C-x h’ (‘mark-whole-buffer’) sets up the entire buffer as the region, by putting point at the beginning and the mark at the end.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.