GNU Emacs: Transient mark mode (active selection)

Many developers use GNU Emacs, but they are often annoyed when they press C-SPC (Ctrl + Space) to start selecting a region and then when they go somewhere else in the file, they execute some command on the thing which should be the currently selected region. And also often it turns out the result is not as expected. To have some knowledge what you do wrong (or to keep yourself informed in a visual manner) you could enable “Transient Mark Mode” in GNU Emacs by clicking “Options” and then “Transient mark mode”; now, when you press C-SPC (Ctrl + Space) and you move the cursor, you will see a selection growing or shrinking as you move the cursor. Basically, if you press C-g (“Quit”) no region marking will be done until you press C-SPC again. Also, any change in the current file will discard the selection. If you want to be advanced on this, see here:

As far as I know, this is pretty well supported option in many versions/variants of GNU Emacs.

You could also do it in the non-clickable way, if you like this (like me). Just put in your “.emacs” file (wherever it is, you should know) this:

'(transient-mark-mode t))

And done.


, ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: