* vim's jumplist equivalent in emacs?
@ 2006-12-07 8:46 Thomas
2006-12-07 10:57 ` Mathias Dahl
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Thomas @ 2006-12-07 8:46 UTC (permalink / raw)
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?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
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:07 ` Holger Sparr
2 siblings, 0 replies; 14+ messages in thread
From: Mathias Dahl @ 2006-12-07 10:57 UTC (permalink / raw)
"Thomas" <totohero@empal.com> writes:
> 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?
Yes, after doing an isearch, ending up some place in the buffer, you
can do C-u C-SPC to jump to the starting positions. This works because
isearch sets the mark where the search started. C-u C-SPC will jump
between the marks in the mark ring.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
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-07 17:07 ` Holger Sparr
2 siblings, 1 reply; 14+ messages in thread
From: Robert Thorpe @ 2006-12-07 13:02 UTC (permalink / raw)
Thomas wrote:
> 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?
Emacs has no jump list unfortunately. Almost every operation will set
the mark though, as Mathias said.
If you do a search you can get back to where you were using C-u C-spc.
There are other useful operations. If you find a tag with M-. then C-u
C-spc will return you to where you were. Though in Emacs C-u C-spc
will not return you to where you were when opening a file.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
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:07 ` Holger Sparr
2 siblings, 0 replies; 14+ messages in thread
From: Holger Sparr @ 2006-12-07 17:07 UTC (permalink / raw)
On Thu, 07 Dec 2006, "Thomas" <totohero@empal.com> wrote:
> 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?
The others pointed out C-u C-SPC. There is C-x C-SPC, too.
,----[ C-h k C-SPC ]
| C-SPC runs the command set-mark-command
| which is an interactive compiled Lisp function in `simple.el'.
| It is bound to C-@, C-SPC.
| (set-mark-command arg)
|
| Set mark at where point is, or jump to mark.
| With no prefix argument, set mark, and push old mark position on local
| mark ring; also push mark on global mark ring if last mark was set in
| another buffer. Immediately repeating the command activates
| `transient-mark-mode' temporarily.
|
| With argument, e.g. C-u C-@, jump to mark, and pop a new position
| for mark off the local mark ring (this does not affect the global
| mark ring). Use C-x C-@ to jump to a mark off the global
| mark ring (see `pop-global-mark').
|
| If `set-mark-command-repeat-pop' is non-nil, repeating
| the C-@ command with no prefix pops the next position
| off the local (or global) mark ring and jumps there.
|
| With a double C-u prefix argument, e.g. C-u C-u C-@, unconditionally
| set mark where point is.
|
| Setting the mark also sets the "region", which is the closest
| equivalent in Emacs to what some editors call the "selection".
|
| Novice Emacs Lisp programmers often try to use the mark for the wrong
| purposes. See the documentation of `set-mark' for more information.
|
| [back]
`----
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
2006-12-07 13:02 ` Robert Thorpe
@ 2006-12-07 17:17 ` Holger Sparr
2006-12-12 5:43 ` totohero
2006-12-12 5:54 ` Thomas
0 siblings, 2 replies; 14+ messages in thread
From: Holger Sparr @ 2006-12-07 17:17 UTC (permalink / raw)
On Thu, 07 Dec 2006, "Robert Thorpe" <rthorpe@realworldtech.com> wrote:
> Emacs has no jump list unfortunately. Almost every operation will set
> the mark though, as Mathias said.
>
> If you do a search you can get back to where you were using C-u C-spc.
> There are other useful operations. If you find a tag with M-. then C-u
> C-spc will return you to where you were. Though in Emacs C-u C-spc
> will not return you to where you were when opening a file.
You could push the mark before opening another file (advice the opening
function) and use the global-mark-ring with C-x C-SPC to jump back.
Holger
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
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
1 sibling, 1 reply; 14+ messages in thread
From: totohero @ 2006-12-12 5:43 UTC (permalink / raw)
Thank you all for the answers about using marks.
But I thought they lack jumping forward and I decided to start my first
emacs lisp code as follows. (I mapped C-p, C-o, C-l to the functions) I
think this code is really ugly and any comments are welcome. And can
anyone please advice me how to make 'push-place-uniq' automatically
called every time when I execute some kind of jump actions like
searching texts, opening a file or searching tags etc?
(defvar backward-jump-list nil)
(defvar forward-jump-list nil)
(setq backward-jump-list nil)
(setq forward-jump-list nil)
(defmacro push-place-uniq (place jump-list)
;; if the place is already at the head of jump-list, ignore it
;; otherwise add it at the head of jump-list
(list 'if
(list 'equal place (list 'car jump-list))
t
(list 'push place jump-list)))
(defun get-current-place ()
"Return (current-buffer current-point)"
(interactive)
(cons (current-buffer) (point)))
(defun push-current-place ()
"Push current-place to backward-jump-list and clear
forward-jump-list"
(interactive)
(setq forward-jump-list nil)
(push-place-uniq (get-current-place) backward-jump-list))
(defun backward-jump ()
"Move to the place at the head of backward-jump-list."
"Pop it from backward-jump-list and push it to forward-jump-list"
(interactive)
(cond
(backward-jump-list
(push-place-uniq (get-current-place) forward-jump-list)
(setq next-place (pop backward-jump-list))
(cond ((equal next-place (get-current-place))
(setq next-place (pop backward-jump-list))))
(setq current-buffer (car next-place))
(setq current-point (cdr next-place))
(switch-to-buffer current-buffer)
(goto-char current-point)
(push-place-uniq next-place forward-jump-list))))
(defun forward-jump ()
"Move to the place at the head of forward-jump-list."
"Pop it from forward-jump-list and push it to backward-jump-list"
(interactive)
(cond
(forward-jump-list
(push-place-uniq (get-current-place) backward-jump-list)
(setq next-place (pop forward-jump-list))
(cond ((equal next-place (get-current-place))
(setq next-place (pop forward-jump-list))))
(setq current-buffer (car next-place))
(setq current-point (cdr next-place))
(switch-to-buffer current-buffer)
(goto-char current-point)
(push-place-uniq next-place backward-jump-list))))
(global-set-key "\C-p" 'push-current-place)
(global-set-key "\C-o" 'backward-jump)
(global-set-key "\C-l" 'forward-jump)
Holger Sparr 작성:
> On Thu, 07 Dec 2006, "Robert Thorpe" <rthorpe@realworldtech.com> wrote:
>
> > Emacs has no jump list unfortunately. Almost every operation will set
> > the mark though, as Mathias said.
> >
> > If you do a search you can get back to where you were using C-u C-spc.
> > There are other useful operations. If you find a tag with M-. then C-u
> > C-spc will return you to where you were. Though in Emacs C-u C-spc
> > will not return you to where you were when opening a file.
>
> You could push the mark before opening another file (advice the opening
> function) and use the global-mark-ring with C-x C-SPC to jump back.
>
> Holger
>
> --
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
2006-12-07 17:17 ` Holger Sparr
2006-12-12 5:43 ` totohero
@ 2006-12-12 5:54 ` Thomas
2006-12-12 7:41 ` Thomas
2006-12-12 18:43 ` Robert Thorpe
1 sibling, 2 replies; 14+ messages in thread
From: Thomas @ 2006-12-12 5:54 UTC (permalink / raw)
Thank you all for the answers about using marks.
But I thought they lack jumping forward and I decided to start my first
emacs lisp code as follows. (I mapped C-p, C-o, C-l to the functions) I
think this code is really ugly and any comments are welcome. And can
anyone please advice me how to make 'push-place-uniq' automatically
called every time when I execute some kind of jump actions like
searching texts, opening a file or searching tags etc?
(defvar backward-jump-list nil)
(defvar forward-jump-list nil)
(setq backward-jump-list nil)
(setq forward-jump-list nil)
(defmacro push-place-uniq (place jump-list)
;; if the place is already at the head of jump-list, ignore it
;; otherwise add it at the head of jump-list
(list 'if
(list 'equal place (list 'car jump-list))
t
(list 'push place jump-list)))
(defun get-current-place ()
"Return (current-buffer current-point)"
(interactive)
(cons (current-buffer) (point)))
(defun push-current-place ()
"Push current-place to backward-jump-list and clear
forward-jump-list"
(interactive)
(setq forward-jump-list nil)
(push-place-uniq (get-current-place) backward-jump-list))
(defun backward-jump ()
"Move to the place at the head of backward-jump-list."
"Pop it from backward-jump-list and push it to forward-jump-list"
(interactive)
(cond
(backward-jump-list
(push-place-uniq (get-current-place) forward-jump-list)
(setq next-place (pop backward-jump-list))
(cond ((equal next-place (get-current-place))
(setq next-place (pop backward-jump-list))))
(setq current-buffer (car next-place))
(setq current-point (cdr next-place))
(switch-to-buffer current-buffer)
(goto-char current-point)
(push-place-uniq next-place forward-jump-list))))
(defun forward-jump ()
"Move to the place at the head of forward-jump-list."
"Pop it from forward-jump-list and push it to backward-jump-list"
(interactive)
(cond
(forward-jump-list
(push-place-uniq (get-current-place) backward-jump-list)
(setq next-place (pop forward-jump-list))
(cond ((equal next-place (get-current-place))
(setq next-place (pop forward-jump-list))))
(setq current-buffer (car next-place))
(setq current-point (cdr next-place))
(switch-to-buffer current-buffer)
(goto-char current-point)
(push-place-uniq next-place backward-jump-list))))
(global-set-key "\C-p" 'push-current-place)
(global-set-key "\C-o" 'backward-jump)
(global-set-key "\C-l" 'forward-jump)
Holger Sparr 작성:
> On Thu, 07 Dec 2006, "Robert Thorpe" <rthorpe@realworldtech.com> wrote:
>
> > Emacs has no jump list unfortunately. Almost every operation will set
> > the mark though, as Mathias said.
> >
> > If you do a search you can get back to where you were using C-u C-spc.
> > There are other useful operations. If you find a tag with M-. then C-u
> > C-spc will return you to where you were. Though in Emacs C-u C-spc
> > will not return you to where you were when opening a file.
>
> You could push the mark before opening another file (advice the opening
> function) and use the global-mark-ring with C-x C-SPC to jump back.
>
> Holger
>
> --
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
2006-12-12 5:54 ` Thomas
@ 2006-12-12 7:41 ` Thomas
2006-12-12 18:43 ` Robert Thorpe
1 sibling, 0 replies; 14+ messages in thread
From: Thomas @ 2006-12-12 7:41 UTC (permalink / raw)
It didn't take me much time to find so many problems with above code.
It cannot jump to a buffer which does not exist though the file exists.
And it cannot be used with hyperlinked buffers like *Help*. Maybe
(get-buffer) and (point) are not sufficient to present the current
position.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
2006-12-12 5:43 ` totohero
@ 2006-12-12 7:58 ` Holger Sparr
0 siblings, 0 replies; 14+ messages in thread
From: Holger Sparr @ 2006-12-12 7:58 UTC (permalink / raw)
On Tue, 12 Dec 2006, totohero@gmail.com wrote:
> Thank you all for the answers about using marks.
> But I thought they lack jumping forward and I decided to start my first
> emacs lisp code as follows. (I mapped C-p, C-o, C-l to the functions) I
> think this code is really ugly and any comments are welcome. And can
> anyone please advice me how to make 'push-place-uniq' automatically
> called every time when I execute some kind of jump actions like
> searching texts, opening a file or searching tags etc?
(info "(elisp)Advising Functions")
^ press C-x C-e here
Might be a point to begin with.
Holger
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
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
` (2 more replies)
1 sibling, 3 replies; 14+ messages in thread
From: Robert Thorpe @ 2006-12-12 18:43 UTC (permalink / raw)
Thomas wrote:
> Thank you all for the answers about using marks.
> But I thought they lack jumping forward
How do you "jump forward". You can't really jump to something you have
not yet visited.
> and I decided to start my first
>
> emacs lisp code as follows. (I mapped C-p, C-o, C-l to the functions) I
I find I use some of those, such as C-l quite a lot, you might not
of-course.
Maybe try mapping to places in the Emacs keymap that Emacs does not
map. For example both C-digit and M-digit produce a prefix argument
corresponding to whatever the digit happens to be. So C-8 C-p means
move 8 lines previous. You don't need both, so why not use one of them
for your own personal keys. Or use the function keys.
> think this code is really ugly and any comments are welcome. And can
> anyone please advice me how to make 'push-place-uniq' automatically
> called every time when I execute some kind of jump actions like
> searching texts, opening a file or searching tags etc?
Jump actions are not treated uniformally in Emacs, except in that they
set mark as we discussed earlier. What you could do is look in the
mark ring.
> (defvar backward-jump-list nil)
> (defvar forward-jump-list nil)
>
>
> (setq backward-jump-list nil)
> (setq forward-jump-list nil)
>
>
> (defmacro push-place-uniq (place jump-list)
> ;; if the place is already at the head of jump-list, ignore it
> ;; otherwise add it at the head of jump-list
> (list 'if
> (list 'equal place (list 'car jump-list))
> t
> (list 'push place jump-list)))
You could do that a little more tidily with quasiquotation. See C-h f
backquote
<remaining code snipped>
Nothing in your code screams at me as though it's wrong, but it seems
to replicate the job of the mark rings.
I think I see your problem though. It seems the behaviour of C-u C-SPC
is quite strange.
Maybe what you may want is something like the cycle function in this
mode...
http://www.emacswiki.org/cgi-bin/wiki/doremi-cmd.el
There may be something better though, I'll think about it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
2006-12-12 18:43 ` Robert Thorpe
@ 2006-12-13 0:50 ` Thomas
2006-12-13 1:15 ` Thomas
2006-12-13 8:29 ` Holger Sparr
2 siblings, 0 replies; 14+ messages in thread
From: Thomas @ 2006-12-13 0:50 UTC (permalink / raw)
Hello, Robert.
Robert Thorpe 작성:
> Thomas wrote:
> > Thank you all for the answers about using marks.
> > But I thought they lack jumping forward
>
> How do you "jump forward". You can't really jump to something you have
> not yet visited.
>
I mean I can jump forward N times after I have jump backward N times
before.
> > and I decided to start my first
> >
> > emacs lisp code as follows. (I mapped C-p, C-o, C-l to the functions) I
>
> I find I use some of those, such as C-l quite a lot, you might not
> of-course.
>
> Maybe try mapping to places in the Emacs keymap that Emacs does not
> map. For example both C-digit and M-digit produce a prefix argument
> corresponding to whatever the digit happens to be. So C-8 C-p means
> move 8 lines previous. You don't need both, so why not use one of them
> for your own personal keys. Or use the function keys.
>
> > think this code is really ugly and any comments are welcome. And can
> > anyone please advice me how to make 'push-place-uniq' automatically
> > called every time when I execute some kind of jump actions like
> > searching texts, opening a file or searching tags etc?
>
> Jump actions are not treated uniformally in Emacs, except in that they
> set mark as we discussed earlier. What you could do is look in the
> mark ring.
As far as I have understood, a mark ring records each marks in a buffer
and a global mark ring records a mark in each buffer but I intended a
global list that records each mark of each buffer.
>
> > (defvar backward-jump-list nil)
> > (defvar forward-jump-list nil)
> >
> >
> > (setq backward-jump-list nil)
> > (setq forward-jump-list nil)
> >
> >
> > (defmacro push-place-uniq (place jump-list)
> > ;; if the place is already at the head of jump-list, ignore it
> > ;; otherwise add it at the head of jump-list
> > (list 'if
> > (list 'equal place (list 'car jump-list))
> > t
> > (list 'push place jump-list)))
>
> You could do that a little more tidily with quasiquotation. See C-h f
> backquote
>
> <remaining code snipped>
>
> Nothing in your code screams at me as though it's wrong, but it seems
> to replicate the job of the mark rings.
I think my code could be more compact if I remove unnecessary copies of
similar functions and abandon the habit of C-like programming. I have
to study more :-)
>
> I think I see your problem though. It seems the behaviour of C-u C-SPC
> is quite strange.
> Maybe what you may want is something like the cycle function in this
> mode...
> http://www.emacswiki.org/cgi-bin/wiki/doremi-cmd.el
>
doremi-cmd is close to what I wanted though it is not the 'global list'
that I mentioned above. Thank you.
> There may be something better though, I'll think about it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
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
2006-12-13 8:29 ` Holger Sparr
2 siblings, 1 reply; 14+ messages in thread
From: Thomas @ 2006-12-13 1:15 UTC (permalink / raw)
Robert Thorpe 작성:
> Thomas wrote:
> > Thank you all for the answers about using marks.
> > But I thought they lack jumping forward
>
> How do you "jump forward". You can't really jump to something you have
> not yet visited.
I mean I may jump forward N times if I had jump backward N times
before.
>
> > and I decided to start my first
> >
> > emacs lisp code as follows. (I mapped C-p, C-o, C-l to the functions) I
>
> I find I use some of those, such as C-l quite a lot, you might not
> of-course.
>
> Maybe try mapping to places in the Emacs keymap that Emacs does not
> map. For example both C-digit and M-digit produce a prefix argument
> corresponding to whatever the digit happens to be. So C-8 C-p means
> move 8 lines previous. You don't need both, so why not use one of them
> for your own personal keys. Or use the function keys.
>
> > think this code is really ugly and any comments are welcome. And can
> > anyone please advice me how to make 'push-place-uniq' automatically
> > called every time when I execute some kind of jump actions like
> > searching texts, opening a file or searching tags etc?
>
> Jump actions are not treated uniformally in Emacs, except in that they
> set mark as we discussed earlier. What you could do is look in the
> mark ring.
Yes, the combination of mark ring and global mark ring may fulfill my
needs though what I want exactly is kind of one global list that
records all marks of all buffers.
>
> > (defvar backward-jump-list nil)
> > (defvar forward-jump-list nil)
> >
> >
> > (setq backward-jump-list nil)
> > (setq forward-jump-list nil)
> >
> >
> > (defmacro push-place-uniq (place jump-list)
> > ;; if the place is already at the head of jump-list, ignore it
> > ;; otherwise add it at the head of jump-list
> > (list 'if
> > (list 'equal place (list 'car jump-list))
> > t
> > (list 'push place jump-list)))
>
> You could do that a little more tidily with quasiquotation. See C-h f
> backquote
>
> <remaining code snipped>
>
> Nothing in your code screams at me as though it's wrong, but it seems
> to replicate the job of the mark rings.
I think my code could be more compact if I can remove unnecessary
copies of similar functions and abandon the habit of C-like
programming. I should study more :-)
>
> I think I see your problem though. It seems the behaviour of C-u C-SPC
> is quite strange.
> Maybe what you may want is something like the cycle function in this
> mode...
> http://www.emacswiki.org/cgi-bin/wiki/doremi-cmd.el
>
> There may be something better though, I'll think about it.
doremi is helpful to me. Thank you.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: vim's jumplist equivalent in emacs?
2006-12-12 18:43 ` Robert Thorpe
2006-12-13 0:50 ` Thomas
2006-12-13 1:15 ` Thomas
@ 2006-12-13 8:29 ` Holger Sparr
2 siblings, 0 replies; 14+ messages in thread
From: Holger Sparr @ 2006-12-13 8:29 UTC (permalink / raw)
On Tue, 12 Dec 2006, "Robert Thorpe" <rthorpe@realworldtech.com> wrote:
> Thomas wrote:
>> Thank you all for the answers about using marks.
>> But I thought they lack jumping forward
>
> How do you "jump forward". You can't really jump to something you have
> not yet visited.
>
A note:
(info "(emacs)Saving Emacs Sessions")
^ press C-x C-e here
When using desktop-save-mode you can customize 'desktop-globals-to-save
and 'desktop-locals-to-save by adding the 'global-mark-ring or the
'mark-ring respectively.
Holger
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: vim's jumplist equivalent in emacs?
2006-12-13 1:15 ` Thomas
@ 2006-12-17 2:17 ` Drew Adams
0 siblings, 0 replies; 14+ messages in thread
From: Drew Adams @ 2006-12-17 2:17 UTC (permalink / raw)
> 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.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2006-12-17 2:17 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2006-12-13 8:29 ` Holger Sparr
2006-12-07 17:07 ` Holger Sparr
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.