[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: double-click or return in dired to launch application
From: |
J-P Theberge |
Subject: |
Re: double-click or return in dired to launch application |
Date: |
04 Mar 2004 17:33:57 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Benjamin Rutt <brutt+news@bloomington.in.us> writes:
> Joel Smith <joelvsmith@earthlink.net> writes:
>
> > is it possible to double-click on a file in dired and have it launch
> > an application, i.e. click on a .doc document and word opens with
> > the document. i'm using emacsnt, but it would be interesting to set
> > this up at home on my linux box as well. thanks.
>
> I have the following set up to do file associations and actions:
>
> (setq dired-guess-shell-alist-user
> '(("\\.jpe?g\\'" "xli")
> ("\\.gif\\'" "xli")
> ("\\.pdf\\'" "acroread")
> ("\\.pdf.gz\\'" "gv")
> ("\\.ps.gz\\'" "gv")
> ("\\.ps\\'" "gv")))
>
> which allows me to specify what happens when I apply the ! key in
> dired to a specific file. I suppose you could add something like
>
> ("\\.doc\\'" "start")
>
> to that list in windows and it should work (use "ooffice" instead of
> "start" in linux). Then, you could press ! RET on one of those files.
> I'm not sure if that's what you want.
>
> As to how to get it to work from a double-click, I'm not sure if it's
> possible or not to intercept double-clicks, anyone?
Something like this should work:
(define-key dired-mode-map [(double-mouse-1)] 'dired-do-shell-command)
-jp