all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* pushing and popping the mark
@ 2015-05-09 11:18 Sam Halliday
  2015-05-09 11:30 ` Sam Halliday
  2015-05-09 21:47 ` Emanuel Berg
  0 siblings, 2 replies; 13+ messages in thread
From: Sam Halliday @ 2015-05-09 11:18 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 13+ messages in thread
* pushing and popping the mark
@ 2015-05-09 15:03 Jude DaShiell
  0 siblings, 0 replies; 13+ messages in thread
From: Jude DaShiell @ 2015-05-09 15:03 UTC (permalink / raw)
  To: help-gnu-emacs

If I had that problem I'd handle the work flow differently.
1) break the document into sequentially numbered files,
2) examine each numbered file and change file name to different number if 
necessary and if number I wanted to use was already used, I'd probably add 
100 to the number the new file name got as a temporary measure.  Once all 
files had correct numbers on them,
3) use cat and send the output to the original document destructively.
Maye an emacs extension can handle this but if so I don't know which.


-- Twitter: JudeDaShiell




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-05-10 13:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-09 11:18 pushing and popping the mark Sam Halliday
2015-05-09 11:30 ` Sam Halliday
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

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.