[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pushing and popping the mark
From: |
Sam Halliday |
Subject: |
Re: pushing and popping the mark |
Date: |
Sat, 9 May 2015 04:30:57 -0700 (PDT) |
User-agent: |
G2/1.0 |
To answer my own question, with an alternative, below:
On Saturday, 9 May 2015 12:18:39 UTC+1, Sam Halliday wrote:
> 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?
The workflow can also be optimised by opening a second frame into the same
buffer. That helps a lot because `C-x o` then jumps to approximately the
locations where I was wanting to set the marks anyway. However, it then
requires me to split my screen... which is sometimes not ideal.
Re: pushing and popping the mark, Emanuel Berg, 2015/05/09