Can a point have a longer story

I often find myself in the following situation. Say I edited a file with this content

\begin{itemize} \item \end{itemize} I really like http://qaru.site/ ! 

And I will say that it was after the word \ item. What I want to do is select /qaru.site / ... , Cw it and go back to \ item and yank it there. What I would do is Cs htt and it will lead to the second t http, and from there I will go back, C-SPC to h, and then select the rest of the word. Now, I would like to use something like Cx Cx to return me to \ item, but instead will return me to h http. Is there a command like Cx Cx that returns a point in the location history?

Thanks,

+7
emacs
source share
2 answers

I usually use Cu C-SPC to loop back through the (local) label ring. Here are the relevant docs for set-mark-command ( C-SPC ):

With the prefix argument (for example, Cu C-SPC), go to the mark and set the mark from the position (this does not affect the global label ring). Use Cx C-SPC to jump to a character (see `pop-global-mark ').

Note. I changed the doc line to use C-SPC instead of C- @ .

The corresponding information page Labeling Ring , which indicates whether you have this parameter:

 (setq set-mark-command-repeat-pop t) 

then the second / third / fourth ... the C-SPC call does not need Cu to repeat the pop-up action - this is very nice.

+10
source share

I often used Cu C-SPC , but currently I'm using goto-last-change.el , which uses buffer cancellation information to track changes (against the label ring). I like it a little better, YMMV.

+4
source share

All Articles