Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I'd phrase the commentary on key notation differently. [(ctrl f)] works fine and there's code out there using it, however it is considered deprecated as this is "lucid" style key notation. Better use the "kbd" notation unless it's inable of expressing the keys in question. Commented Sep 22, 2016 at 16:55
  • @wasamasa: Edited; thx. Commented Sep 22, 2016 at 22:34
  • Drew, I have tried using emacs -Q. I have copied the function above and bound it to "ctrl-f". I have also added (transient-mark-mode t). So I can see the selected text after a search. Commented Oct 22, 2016 at 21:06
  • I have tried the same thing in version 24.5.1 and version 24.3.1. Let say I search for "point", "point" is found and highlighted in both versions. However, if I press the down arrow, in version 24.5.1 it will highlight the next line along with "point". In version 24.3.1, point will stop being highlighted and cursor will move to next line and this is the behaviour I am expected. I guess the question remains: what changed in transient-mark-mode? regards Commented Oct 22, 2016 at 21:15
  • 1
    I think I misunderstood what you want. I thought you wanted to keep the region active. Cursor movement always extends the region, and that is apparently what you do not want - you want cursor movement to deactivate the region. FWIW, extending the region is what happens in earlier Emacs versions also - ever since transient-mark-mode has existed. I don't see how you saw deactivation in Emacs 24.3 - that's not what I see (with emacs -Q with 24.3, 23.4, 22.3,...). Commented Oct 22, 2016 at 23:24