Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Define key for bookmark-jump

3 views
Skip to first unread message

Fabian Braennstroem

unread,
Aug 22, 2007, 6:40:18 PM8/22/07
to
Hi,

I would like to define a key for different bookmark-jumps;
mainly I will use them to jump to different directories in
dired:
e.g. I would like to set key '1' to jump to bookmark with
'bookmark_name':

(local-set-key "1" 'bookmark-jump "bookmark_name")

but the above does not work ... actually I have no idea
about the needed syntax. It would be nice, if someone could
help!?

Regards!
Fabian

Emilio Lopes

unread,
Aug 23, 2007, 2:45:39 PM8/23/07
to
Fabian Braennstroem writes:

> e.g. I would like to set key '1' to jump to bookmark with
> 'bookmark_name':

> (local-set-key "1" 'bookmark-jump "bookmark_name")

Achtung, untested:

(define-key dired-mode-map "1"
(lambda ()
(interactive)
(bookmark-jump "bookmark name")))

--
Emílio C. Lopes
Munich, Germany

Fabian Braennstroem

unread,
Aug 23, 2007, 5:40:09 PM8/23/07
to
Hi Emilio,

Emilio Lopes schrieb am 08/23/2007 06:45 PM:
> Fabian Braennstroem writes:
>
>> e.g. I would like to set key '1' to jump to bookmark with
>> 'bookmark_name':
>
>> (local-set-key "1" 'bookmark-jump "bookmark_name")
>
> Achtung, untested:
>
> (define-key dired-mode-map "1"
> (lambda ()
> (interactive)
> (bookmark-jump "bookmark name")))

Simple enough and much faster than using a macro :-) Thanks!

Regards!
Fabian

0 new messages