help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pushing and popping the mark


From: Sam Halliday
Subject: pushing and popping the mark
Date: Sat, 9 May 2015 04:18:38 -0700 (PDT)
User-agent: G2/1.0

Hi all,

I have found myself doing some repetitive editing recently that I am sure can 
be optimised.

Let's say I have a chunk of existing text (in the middle of the buffer), and a 
bunch of new text (at the bottom of the buffer) with bits of text that I want 
to selectively kill and then yank into the existing text.

So the workflow looks like this:

1. go to "new text", kill some relevant text
2. go to "existing text", yank
3. repeat


In terms of keys strokes this means:

1. `C-U SPACE` (now near relevant "new text") then unavoidable manual 
keystrokes to select/kill
2. `C-SPACE C-SPACE`, then `C-U SPACE` (does nothing) to add this location to 
the mark ring and ignore that mark in the ring.
3. `C-U SPACE` (now near relevant "existing text") then unavoidable manual 
keystrokes to yank
4. `C-SPACE C-SPACE`, then `C-U SPACE` (does nothing) to add this location to 
the mark ring

Actually, my fingers can confused and end up just using pageup/down :-/

Obviously, steps 2 and 4 are undesirable. Is there a single command that I can 
perform to effectively save the current point, then go to the second mark in 
the mark ring?

Or, equivalently, save the point, visit the head of the mark ring (possibly pop 
it, I don't need it anymore) and then push the saved point to the head of the 
mark ring.

(Probably I would have finished my work already instead of writing this 
email...)


Best regards,
Sam


reply via email to

[Prev in Thread] Current Thread [Next in Thread]