all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sam Halliday <sam.halliday@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: pushing and popping the mark
Date: Sat, 9 May 2015 04:30:57 -0700 (PDT)	[thread overview]
Message-ID: <1e6c5c11-44fe-4b97-bef0-20149b34619b@googlegroups.com> (raw)
In-Reply-To: <ad7a1485-6fa4-4763-99db-f241ed44bdf8@googlegroups.com>

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.


  reply	other threads:[~2015-05-09 11:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-09 11:18 pushing and popping the mark Sam Halliday
2015-05-09 11:30 ` Sam Halliday [this message]
2015-05-09 12:49   ` Francis Belliveau
     [not found]   ` <mailman.2663.1431175800.904.help-gnu-emacs@gnu.org>
2015-05-09 21:08     ` Sam Halliday
2015-05-09 21:15       ` Drew Adams
     [not found]       ` <mailman.2680.1431206116.904.help-gnu-emacs@gnu.org>
2015-05-09 22:04         ` Sam Halliday
2015-05-09 21:47 ` Emanuel Berg
2015-05-09 22:11   ` Sam Halliday
2015-05-09 22:34     ` Emanuel Berg
2015-05-10  0:02     ` Drew Adams
     [not found]     ` <mailman.2683.1431216187.904.help-gnu-emacs@gnu.org>
2015-05-10  1:59       ` Emanuel Berg
2015-05-10 13:41     ` Jude DaShiell
  -- strict thread matches above, loose matches on Subject: below --
2015-05-09 15:03 Jude DaShiell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e6c5c11-44fe-4b97-bef0-20149b34619b@googlegroups.com \
    --to=sam.halliday@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.