From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Tips for quick jumping back and forth
Date: Wed, 11 Jul 2012 22:40:11 +0800 [thread overview]
Message-ID: <87pq822wgt.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 4FFD814E.8020702@yandex.ru
On Wed, Jul 11 2012, Dmitry Gutov wrote:
> Philipp Haselwarter <philipp@haselwarter.org> writes:
>> It'd be neat if there were different ways to navigate through the ring;
>> when I discovered Toby Cubitt's excellent undo-tree-mode it somewhat
>> revolutionized my editing habits. I imagine that having a tree-like
>> representation of the marks that allows to easily navigate back and
>> forth would be very pleasant.
>
> Not sure about sideways navigation, but at least going back and forward
> between marks would be an improvement.
>
> The distinction between local and global mark rings also, I think,
> complicates things.
Since this thread seems determined to live forever, here are two useful
functions I copied from the interwebs somewhere:
--8<---------------cut here---------------start------------->8---
(defun jump-to-mark ()
"Jumps to the local mark, respecting the `mark-ring' order.
This is the same as using \\[set-mark-command] with the prefix argument."
(interactive)
(set-mark-command 1))
(global-set-key (kbd "M-`") 'jump-to-mark)
(defun push-mark-no-activate ()
"Pushes `point' to `mark-ring' and does not activate the region
Equivalent to \\[set-mark-command] when \\[transient-mark-mode] is disabled"
(interactive)
(push-mark (point) t nil)
(message "Pushed mark to ring"))
(global-set-key (kbd "C-`") 'push-mark-no-activate)
--8<---------------cut here---------------end--------------->8---
I use "C-x C-SPC" for cycling through the global mark, and "M-`" for
cycling the local one.
E
--
GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
of 2012-07-08 on pellet
next prev parent reply other threads:[~2012-07-11 14:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 13:36 Tips for quick jumping back and forth Dmitry Gutov
2012-07-11 14:40 ` Eric Abrahamsen [this message]
2012-07-11 15:02 ` Drew Adams
2012-07-11 17:31 ` Dmitry Gutov
2012-07-11 18:33 ` Drew Adams
2012-07-11 21:03 ` Dmitry Gutov
2012-07-11 23:44 ` Drew Adams
2012-07-12 21:30 ` Dmitry Gutov
-- strict thread matches above, loose matches on Subject: below --
2012-07-07 15:27 Dmitry Gutov
2012-07-08 3:28 ` C K Kashyap
2012-07-08 3:31 ` suvayu ali
2012-07-08 3:35 ` C K Kashyap
2012-07-09 2:01 ` Ken Goldman
[not found] ` <mailman.4284.1341718295.855.help-gnu-emacs@gnu.org>
2012-07-08 3:47 ` rusi
[not found] ` <mailman.4283.1341718129.855.help-gnu-emacs@gnu.org>
2012-07-08 17:28 ` Xah Lee
2012-07-07 13:39 Dmitry Gutov
[not found] <mailman.4232.1341639863.855.help-gnu-emacs@gnu.org>
2012-07-07 8:02 ` José A. Romero L.
2012-07-07 10:48 ` Xah Lee
2012-07-08 4:25 ` B. T. Raven
2012-07-12 0:04 ` Edward at Work
2012-07-07 5:43 C K Kashyap
2012-07-07 6:19 ` Jambunathan K
2012-07-11 9:57 ` Philipp Haselwarter
2012-07-07 6:45 ` Andreas Röhler
2012-07-07 13:56 ` Francesco Mazzoli
[not found] ` <mailman.4249.1341669396.855.help-gnu-emacs@gnu.org>
2012-07-07 14:44 ` notbob
2012-07-20 13:02 ` Kevin Rodgers
2012-07-20 13:15 ` Jambunathan K
2012-07-09 2:59 ` Le Wang
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pq822wgt.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).