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

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

Re: how to set local key in dired to use vm on file


From: Henrik Enberg
Subject: Re: how to set local key in dired to use vm on file
Date: Sun, 21 Nov 2004 01:29:49 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Gilbert Harman <harman@Princeton.EDU> writes:

> Could anyone advise me how to use (set-local-key) or something else so that
> when I am in dired and the cursor is over a file, I get vm-visit-folder to
> visit that file?
>
> I can get as far as:
>
> (setq dired-mode-hook
>       '(lambda ()
>      (local-set-key "V" 'vm-visit-folder)))

Emacs already have support for this in dired-x.el.  Putting Something
like the following in your .emacs should bind "V" to the function you
want.

(add-hook 'dired-load-hook
          (lambda ()
            (require 'dired-x)
            (setq dired-bind-vm t)))

As an aside, `add-hook' is the prefered way to add stuff to a hook.
`setq' will overwrite any other stuff that may be in the hook.


reply via email to

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