3

I would like to set the marks myself, rather than emacs doing it automatically for me. I've experienced emacs setting the mark automatically when I search, or move to the top/bottom of the buffer. None of that. I would like to set the mark myself.

I just want to define my own interface on what goes in the mark ring.

6

Not as such. You certainly can't prevent things from calling push-mark and set-mark and friends.

There's nothing stopping you from redefining the standard functions to do nothing, however. You would then need to write your own commands for managing the mark ring.

However, rather than trying to prevent Emacs using the mark ring in all possible situations, a simpler approach is probably to ignore the mark ring entirely. Instead you can define your own custom mark ring and then write the commands you need to utilise it, and simply not care what Emacs is doing with the standard ring.

  • Well, you could always advice said functions to only perform their intended functionality when a certain boolean is set or so (which would, of course, only be t when the user actively sets the mark). – Thomas Mar 30 '17 at 7:45
4

The mark is designed to be fleeting to enable jumping back (using C-x C-x) after a search or a end-of-buffer.

Note however that the previous mark is not forgotten - you can use pop-mark to trace back all the marks ever set.

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.