help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Tips for quick jumping back and forth


From: Drew Adams
Subject: RE: Tips for quick jumping back and forth
Date: Wed, 11 Jul 2012 08:02:21 -0700

>  > 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.

What you want is a quick way to navigate to any previously marked position.  And
of course a quick way to mark each position (e.g. a quick key).  It does not
matter what "mark" means here - it could be but need not be an Emacs marker
(e.g. from `C-SPC').

AFAICT, it also does not matter whether the marks were defined using a treelike
pattern of navigation in the first place.  At least not to me, it doesn't.  And
anyway you don't want to have imposed a particular navigation pattern (e.g. tree
traversal of some sort).  You want to be able to navigate among marks in any
order.

More importantly, to navigate to an arbitrary "marked" position, you need
_direct_ access.  It's of course also nice to be able to cycle among any group
of those positions, including all of them.  But cycling, whether tree traversal
or other, is essentially a fallback, primitive way to get where you want to go.

To get to an arbitrary position - especially to get there directly, it helps for
the position to have a name or to be highlighted in some way, so that you can
easily (a) recognize it and (b) directly point to it (e.g. mouse, or name
completion).

Here are two great ways to do these things, IMNSHO:

1. Autonamed bookmarks, with Bookmark+.  You can create them with a single
keystroke.  They have recognizable names that by default show their buffer
positions.  They can optionally be highlighted in a number of different ways and
based on a number of different conditions/events.  They can be temporary or you
can save them persistently (individually or en masse).  You can cycle among any
group of them by just hitting a repeating key.

So a single key to create, easily recognized, direct-access navigation, cycling.

2a. Icicles.  First, it improves what Bookmark+ offers, by providing various
ways to match the bookmark names, and letting you easily change sort orders for
cycling.

2b. Icicles.  Second, it gives you the same kind of navigation for the ordinary
markers of the `mark-ring' and the `global-mark-ring' (separately) as it does
for bookmarks.  You can use the same key to set a marker and to navigate to one.
What about the names - how do you recognize a marker and access it directly?
The text of the line is the name.  By default the completion candidates are in
marker (i.e., buffer position) order - just hit a key to change to the next sort
order.

So a single key to create, easily recognized, direct-access navigation, cycling.

Have fun.  HTH.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]