From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Halliday Newsgroups: gmane.emacs.help Subject: pushing and popping the mark Date: Sat, 9 May 2015 04:18:38 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1431170428 18302 80.91.229.3 (9 May 2015 11:20:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 May 2015 11:20:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 09 13:20:28 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yr2nz-0005dO-SO for geh-help-gnu-emacs@m.gmane.org; Sat, 09 May 2015 13:20:28 +0200 Original-Received: from localhost ([::1]:58903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr2ny-0006P3-M7 for geh-help-gnu-emacs@m.gmane.org; Sat, 09 May 2015 07:20:26 -0400 X-Received: by 10.182.108.196 with SMTP id hm4mr4032985obb.33.1431170318296; Sat, 09 May 2015 04:18:38 -0700 (PDT) X-Received: by 10.140.31.196 with SMTP id f62mr27034qgf.30.1431170318179; Sat, 09 May 2015 04:18:38 -0700 (PDT) Original-Path: usenet.stanford.edu!m20no880522iga.0!news-out.google.com!t92ni250qga.1!nntp.google.com!z60no6247482qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.13.129.22; posting-account=kRukCAoAAAANs-vsVh9dFwo5kp5pwnPz Original-NNTP-Posting-Host: 82.13.129.22 User-Agent: G2/1.0 Injection-Date: Sat, 09 May 2015 11:18:38 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:212039 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104323 Archived-At: 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