Icicles - Tripping

Previous: Icicles - Multi-InputsIciclesIciclesIndexNext: Icicles - Key Completion

Tripping with Icicles

Among the more useful multi-commands are those whose actions take you to some location indicated by the completion candidate. This is the way commands such as ‘icicle-bookmark’, ‘icicle-find-tag’, ‘icicle-Info-goto-node’, and ‘icicle-occur’ work – you can use ‘next’ and so on to move among candidates to choose them to act on, but when you do act on them, Icicles takes you to the places they name.

So just holding down both the Control key and ‘next’ takes you from one place to the next. And ‘C-mouse-2’ takes you directly to the location you click. Typically, ‘C-g’ aborts the trip and puts you back at your starting point, and ‘RET’ ends the trip at the chosen destination.

There are many such Icicles tripping (or navigation or browsing) commands, and they all work similarly. They give you the normal cycling behavior provided by vanilla Emacs commands such as ‘find-tag’ (via `M-.’, `C-u M-.’, ‘M-*’ etc.) or ‘set-mark-command’ (via ‘C-u C-SPC’). But unlike the vanilla Emacs commands, the keys for this cycling are always the same.

More importantly, you need not cycle through all possibilities. You can go directly to particular locations with ‘C-RET’, ‘C-mouse-2’ or using completion. And your input filters the available candidates, as always. And you can, as always, use progressive completion, chipping away, and so on to define your ‘C-next’ trip itinerary using a process of refinement.

Whereas vanilla Emacs gives you some commands that let you use completion to enter a destination and go there, and it gives you other commands that let you cycle among locations, Icicles rolls all of that into one. And you use the same keys, always, to navigate.

Here are some of the Icicles tripping commands:

(You need library Bookmark+ for ‘icicle-search-bookmark-list-marked’. You need library Dired+ for ‘icicle-occur-dired-marked-recursive’ and ‘icicle-search-dired-marked-recursive’. You need library wide-n.el for ‘icicle-wide-n’.)

Note: Icicles search commands and commands ‘icicle-find-tag’, ‘icicle-goto-marker’, ‘icicle-goto-any-marker’, and ‘icicle-goto-global-marker’ effectively bind user option `icicle-incremental-completion’ to ‘always’, because I think you typically want to start them out with incremental completion turned on. Remember that you can use `C-#’ (once or twice) to turn incremental completion off.

Highlighting the Destination

‘icicle-bookmark-region-other-window’ activates the bookmarked region (highlighting it) when you visit it, if you use TransientMarkMode (or, e.g., DeleteSelectionMode).

Starting with Emacs 22, most Icicles commands that have single positions as their trip visits (e.g. ‘icicle-bookmark’, ‘icicle-Info-goto-node’, ‘icicle-goto-marker’, ‘icicle-find-tag’) highlight those positions temporarily as they are visited. Except for the Icicles search commands, this highlighting is provided by library crosshairs.el. If crosshairs.el and the libraries it requires are not in your ‘load-path’, then no such highlighting occurs. See CrosshairHighlighting. Here’s a screenshot showing the effect:


The commands that employ Icicles search benefit from its highlighting when you visit a search hit. Here’s a screenshot to show the effect. The current location is in pink; other hits are in cyan:


This page has additional screenshots for Icicles search commands: Icicles - Search Commands, Overview.

See Also:

Previous: Icicles - Multi-InputsIciclesIciclesIndexNext: Icicles - Key Completion

DrewsElispLibraries referenced here: Lisp:icicles.el

CategoryMenus CategoryCommands CategoryBufferSwitching CategoryCompletion CategoryDocumentation CategoryHelp CategoryProgrammerUtils CategoryCode