Questions tagged [mark-ring]
The mark-ring tag has no usage guidance.
19 questions
1
vote
2
answers
62
views
Looking for a "point ring"
Is there something like a point ring in Emacs?
I would like to store the current point in there using a command similar to point-to-register. But when I store another point, I want the previous one ...
0
votes
1
answer
72
views
Jump to global mark ring after jumping to register
In buffer B, I press C-x r SPC r to store the position of point.
I switch to buffer A and do some work. I then press C-x r j r to return to the position I saved in buffer B.
How do I get back to the ...
1
vote
1
answer
618
views
How do I clear all marks from the current buffer mark ring?
Newbie here, but oddly I couldn't find an answer to this by Googling. How do I clear all marks from the current buffer? I did find how to view the mark ring, but not how to clear all marks from ...
3
votes
1
answer
220
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 ...
8
votes
3
answers
2k
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) ...
1
vote
0
answers
518
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
1
answer
164
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
1
answer
63
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
1
answer
240
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 ...
3
votes
1
answer
570
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
1
answer
297
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
1
answer
281
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
1
answer
436
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
1
answer
1k
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
2
answers
366
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
1
answer
273
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 ...
3
votes
2
answers
1k
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?
49
votes
12
answers
9k
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 <...
43
votes
6
answers
7k
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 ...