Emacs 23: Selection not highlighted
Asked Answered
L

1

9

I installed Ubuntu 10.04, and with it came Emacs 23. If I want to select text in Emacs, that works perfectly fine except the fact that the region is not highlighted.

However, this only happens, if I try to make a region using the keyboard. If I select something with the mouse, it is highlighted as usual.

Does anybody know, why the region is not highlighted and how to fix that?

Lindseylindsley answered 30/4, 2010 at 20:40 Comment(0)
V
14

Is the option 'Options->Active Region Highlighting' set?

You may want to set

(transient-mark-mode t)

in ~/.emacs or other init files as well.

Vespertine answered 30/4, 2010 at 20:43 Comment(3)
It's weird: 'Options->Active Region Highlightning' was set, so I clicked it away. I'm no Emacs (and not at all an Emacs List) expert, but after inserting the line (transient-mark-mode) into my ~/.emacs, it worked. Do you know, what's happening there?Lindseylindsley
I have been using that toggle in my ~/.emacs for this reason for many years -- the manual documents it just fine. I use the interactive options less, so maybe 'Active Region Highlighting' tickles something else.Vespertine
BTW, temporary-transient-mark-mode is much better than transient-mark-mode. This lets you setup a transient mark by pressing C-SPC C-SPC instead of just C-SPC. Much less intrusive. (Oh, and it's on by default, so no config required.)Murial

© 2022 - 2024 — McMap. All rights reserved.