all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "V. L. Simpson" <vls@freeshell.org>
Subject: Re: how to set local key in dired to use vm on file
Date: 20 Nov 2004 18:43:44 -0600	[thread overview]
Message-ID: <87fz34m3pb.fsf@ghidra.localhost> (raw)
In-Reply-To: mailman.304.1100995412.27204.help-gnu-emacs@gnu.org

>>>>> "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

  parent reply	other threads:[~2004-11-21  0:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.304.1100995412.27204.help-gnu-emacs@gnu.org>
2004-11-21  0:26 ` how to set local key in dired to use vm on file Pascal Bourguignon
2004-11-21  0:29 ` Henrik Enberg
2004-11-21  0:43 ` V. L. Simpson [this message]
2004-11-20 23:53 Gilbert Harman

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fz34m3pb.fsf@ghidra.localhost \
    --to=vls@freeshell.org \
    /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.
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.