unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: vim's jumplist equivalent in emacs?
Date: Sat, 16 Dec 2006 18:17:05 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICMEAHDKAA.drew.adams@oracle.com> (raw)
In-Reply-To: <1165972555.353843.278350@f1g2000cwa.googlegroups.com>

> In vim, some kind of user actions like text search, tag search or
> opening new file are regarded as 'jump action'. Every position, whether
> it's in one buffer or in another,  before/after those jumps are
> automatically recorded in 'jump list', so you can navigate
> forward/backward the postions using Ctrl+O / Ctrl+I. May I find a
> similar job done for emacs?

> doremi is helpful to me. Thank you.

> doremi-cmd is close to what I wanted though it is not the 'global list'
> that I mentioned above. Thank you.

Actually, there are two commands in doremi-cmd.el that could help, and one
is global: `doremi-marks' lets you cycle among marks in a buffer.
`doremi-global-marks' lets you cycle among global marks in multiple buffers.
Emacs has a ring of marks for each buffer, as well as a global ring of marks
that goes across all buffers. These two commands reflect that.

In addition, you might want to try Icicles. Commands `icicle-goto-marker'
and `icicle-goto-global-marker' let you navigate among the two kinds of
marks using completion, as well as by cycling. The completion is based on
the text of the line the mark is in (or "<EMPTY LINE>" if the line is
empty). IOW, in buffer *Completions*, you can "see" all of the marks that
are in lines that match your minibuffer input. You can use normal prefix
matching or regexp (e.g. substring) matching. When your input is empty, you
see the lines of all marks as navigation candidates. Typing filters the list
of candidates incrementally, so they always match your input.

`icicle-goto-marker' and `icicle-goto-global-marker' are multi-commands: You
can use `C-RET', `C-down', `C-next', and `C-mouse-2' to move around among
selected marks, before deciding on a final destination with `RET'. Just
repeating `C-down' is equivalent to what the doremi mark commands do by
repeating `down' - the Icicles commands offer quite a bit more flexibility.

These two Icicles commands are in fact specific applications of the generic
function (and command) `icicle-map'. That is, they are defined by using
`icicle-map' to apply a simple go-to function to mark-ring candidates.
`icicle-map' lets you apply any function to association-list entries in a
selective, interactive fashion. The alist keys are used as the completion
candidates, and choosing a candidate applies the function to that alist
entry (key + value).

When you use command `icicle-map' interactively, it prompts you for the
names of 1) a variable that has an alist value and 2) a function - you can
use completion for each name. In Emacs, there are many alist variables; by
default, they constitute the completion candidates for #1.

Icicles is here: http://www.emacswiki.org/cgi-bin/wiki/Icicles. HTH.

  reply	other threads:[~2006-12-17  2:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07  8:46 vim's jumplist equivalent in emacs? Thomas
2006-12-07 10:57 ` Mathias Dahl
2006-12-07 13:02 ` Robert Thorpe
2006-12-07 17:17   ` Holger Sparr
2006-12-12  5:43     ` totohero
2006-12-12  7:58       ` Holger Sparr
2006-12-12  5:54     ` Thomas
2006-12-12  7:41       ` Thomas
2006-12-12 18:43       ` Robert Thorpe
2006-12-13  0:50         ` Thomas
2006-12-13  1:15         ` Thomas
2006-12-17  2:17           ` Drew Adams [this message]
2006-12-13  8:29         ` Holger Sparr
2006-12-07 17:07 ` Holger Sparr

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=DNEMKBNJBGPAOPIJOOICMEAHDKAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).