Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can the point have a longer history

Tags:

emacs

I often find myself in the following situation. Say I was editing a file with this contents

\begin{itemize}
\item
\end{itemize}

I really like http://stackoverflow.com !

And say the point was after the word \item. What I want to do is select http://stackoverflow.com , C-w it, and go back to \item, and yank it there. What I would do is C-s htt and that would bring the point to the 2nd t of http, and from there I would go backwards, C-SPC on h, then select the rest of the word. Now, I would like to use something like C-x C-x to bring me back to \item, but it will instead bring me back to the h of http. Is there a command like C-x C-x which brings the point back through its history of location?

Thanks,

like image 712
stevejb Avatar asked Apr 26 '10 17:04

stevejb


People also ask

Does history have a limitation?

History is of limited use due the variability of perceptions and the bias of the interpreter. Personal interpretations of history can be taken out of context. On the one hand, the study of history can be used as a way to measure an organization's strengths and weaknesses in a way that makes room for future progress.

How long ago does something have to be to be history?

All these events were nearly 20 years ago, and they reflect a personal perspective and a particular society, but in general it takes about a generation (20 years) after an event before the source-base and perspective make 'history' with any lasting value possible.

What is history point?

It is an Inquiry into what happened in the past, when it happened, and how it happened. It is an inquiry into the inevitable changes in human affairs in the past and the ways these changes affect, influence or determine the patterns of life in the society. History is, or should be an attempt to re-think the past.

How long is our history?

While our ancestors have been around for about six million years, the modern form of humans only evolved about 200,000 years ago. Civilization as we know it is only about 6,000 years old, and industrialization started in the earnest only in the 1800s.


2 Answers

I generally use C-u C-SPC to cycle back through the (local) mark ring. Here's the relevant docs for set-mark-command (C-SPC):

With prefix argument (e.g., C-u C-SPC), jump to the mark, and set the mark from position popped off the local mark ring (this does not affect the global mark ring). Use C-x C-SPC to jump to a mark popped off the global mark ring (see `pop-global-mark').

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

The relevant info page is "The Mark Ring", which points out if you have this setting:

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

then the second/third/fourth... invocation of C-SPC doesn't need a C-u to repeat the popping action - which is very nice.

like image 199
Trey Jackson Avatar answered Sep 30 '22 04:09

Trey Jackson


I used to use C-u C-SPC a lot, but nowadays I use goto-last-change.el, which uses buffer's undo information to track changes (vs the mark ring). I like it a little better, YMMV.

like image 20
Leo Alekseyev Avatar answered Sep 30 '22 03:09

Leo Alekseyev