[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: |
V. L. Simpson |
Subject: |
Re: how to set local key in dired to use vm on file |
Date: |
20 Nov 2004 18:43:44 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
>>>>> "Gilbert" == 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)))
You shouldn't use setq on mode-hooks. Use add-hook instead.
The dired-ex package has 'dired-bind-vm' for doing exactly what you want.
example
(add-hook 'dired-load-hook
(lambda ()
(load "dired-x")
(setq dired-bind-vm t)))
dired-load-hook is better than dired-mode-hook as it's only run
the first time you use dired. Trust me, it's what you want. 8-]
Have fun,
vls