Questions tagged [mark-ring]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
59 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 ...
Witek's user avatar
  • 345
0 votes
1 answer
61 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 ...
SabreWolfy's user avatar
  • 1,418
1 vote
1 answer
485 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 ...
Peter Dowling's user avatar
3 votes
1 answer
213 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 ...
Haydon Berrow's user avatar
7 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) ...
extremeaxe5's user avatar
1 vote
0 answers
439 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 ...
Ivan Perez's user avatar
0 votes
1 answer
154 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 ...
smilingbuddha's user avatar
0 votes
1 answer
58 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> ...
Netsu's user avatar
  • 555
1 vote
1 answer
210 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 ...
Håkon Hægland's user avatar
4 votes
1 answer
532 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 ...
itirazimvar's user avatar
0 votes
1 answer
266 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.
AhLeung's user avatar
  • 1,083
2 votes
1 answer
271 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 ...
AhLeung's user avatar
  • 1,083
2 votes
1 answer
424 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 ...
leeor's user avatar
  • 141
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 ...
mikl's user avatar
  • 423
4 votes
2 answers
319 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 ...
undostres's user avatar
  • 1,813
2 votes
1 answer
263 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 ...
Sibi's user avatar
  • 3,693
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?
Tu Do's user avatar
  • 6,812
48 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 <...
Vedaad Shakib's user avatar
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 ...
Patrick Steele's user avatar