Questions tagged [mark-ring]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
47 views

calling xref-find-definitions within lisp code

I want to call xref-find-definitions from within my own lisp code and I'm struggling. (xref-find-definitions IDENTIFIER) Find the definition of the identifier at point. It wants a parameter ...
5
votes
3answers
417 views

How do I view the mark ring?

Is there a command to view the entries in the mark ring, similar to listing buffers with C-x C-b or viewing the kill ring with the function browse-kill-ring or viewing the jump list (in info mode) ...
0
votes
0answers
85 views

Implement vim's Ctrl-O and Ctrl-I in emacs

I find this to be a great feature from vim, and I miss it. I've looked around, and it seems that one can add the current position to some mark ring, and then come back. But that's explicit. I need to ...
0
votes
1answer
74 views

Why is the mark ring called a 'ring' and not a 'stack'?

From the description of the mark ring on the Emacs website (link) it seems to me that it is basically just a stack with a maximum size set to be 16. So I am curious why this data-structure is called a ...
0
votes
1answer
32 views

How can I return back to point position after jumping by `<down-mouse-1>`?

How can I return back to point position after jumping by <down-mouse-1>? Example: moving in the buffer for a while with C-pbfn, then use mouse for navigation, and press C-u C-<space> ...
1
vote
1answer
65 views

Traversing the mark rings when combining global and local jumps in Emacs

I am wondering why it is so difficult to go back when you mix local and global jumps in Emacs. Maybe I am missing something. For example, if I am in buffer 1 and jump to position 100 (for example ...
4
votes
1answer
204 views

What are the differences mark-ring and global-mark-ring?

I have just explore how to use mark rings in emacs. There are two kind of mark type mark-ring and global-mark-ring. What are the differences between them and is there any option to push all marks ...
0
votes
1answer
109 views

How to automatically set marks on all of the edited lines?

I would like to automatically set marks on all of the edited lines so that I can go back to any of my previous edited lines using helm-mark-ring.
2
votes
1answer
166 views

How to make helm-mark-ring/helm-imenu follow current candidate

When I use helm-mark-ring or helm-imenu, I would like to jump to the current candidate automatically in the other buffer while keeping the helm session (i.e., similar to helm-swoop). I tried the ...
2
votes
1answer
250 views

Back/forward navigation that works like IntelliJ/Eclipse

I've been trying to find a navigation package that allows backwards/forwards navigation across and within buffers. I have found a lot of solutions out there but none of them seem to solve the whole ...
9
votes
1answer
494 views

How to set mark in elisp and have shift selection?

The normal behavior of Emacs when transient-mark-mode is active is that when you make a shift-selection, then if the next command is a non-shift movement, the mark is deactivated. For example, after ...
4
votes
2answers
128 views

Activating the region without altering the mark ring

Setting the mark and moving point activates the region, which appears highlighted (assuming transient-mark-mode is enabled). Once the mark is set it's location is sent to the mark ring, thus changing ...
2
votes
1answer
188 views

pop-mark not working as expected

I have some sample code like this: (defun some-function () (interactive) (push-mark) (goto-char (point-min)) ; do some stuff (pop-mark)) Now I'm expecting pop-mark to get me back to the ...
2
votes
2answers
479 views

How to jump to a mark using Elisp

Suppose I store the current mark into a variable using mark or (mark-marker). Then I move point elsewhere and insert some text. Which function should I use to jump to the saved mark?
38
votes
12answers
6k views

How to switch back and forth between two locations in a buffer

Sometimes I find myself frequently alternating between two functions that I am editing in conjunction with each other. In these situations, it is tedious and painful to keep on doing a C-s <...
29
votes
6answers
4k views

Effectively using the mark ring

I have used the mark to select regions of a buffer. For example, I know the sequence C-<space> C-s foo can be used to select all text between the current point and the point after a search for ...