all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joel Smith <joelvsmith@earthlink.net>
Subject: Re: double-click or return in dired to launch application
Date: 05 Mar 2004 09:41:25 -0500	[thread overview]
Message-ID: <ueks79x0q.fsf@JVSMITH.i-did-not-set--mail-host-address--so-shoot-me> (raw)
In-Reply-To: wc3ishkmx5n.fsf@mu.cis.ohio-state.edu

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?
> -- 
> Benjamin

I put in dired-x and added dired-guess-shell-alist-user to my .emacs like

 (add-hook 'dired-load-hook
           (function (lambda ()
                       (load "dired-x")
                       ;; Set global variables here.  For example:
                       ;; (setq dired-guess-shell-gnutar "gtar")
		       (setq dired-guess-shell-alist-user
			     '(("\\.jpe?g\\'" "xli")
			       ("\\.pdf\\'" "Acrobat")
			       ("\\.pdf.gz\\'" "gsview32")
			       ("\\.ps.gz\\'" "gsview32")
			       ("\\.doc\\'" "start")
			       ("\\.ps\\'" "gsview32")))
                       )))

I type ! RET and a word document appeared on the screen.  wow!  but the only 
problem is that when the word document is open, emacs freezes until the 
process is closed.  How do I run these things in the background?  

I'm not sure how to use the double-click response, i.e. how to use 
dired-do-shell-command with the list provided by dired-guess-shell-alist-user.
i'll stick with the first method provided i can run things in the background.
Thanks for the help.

  parent reply	other threads:[~2004-03-05 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-04 15:32 double-click or return in dired to launch application Joel Smith
2004-03-04 15:47 ` Benjamin Rutt
2004-03-04 19:09   ` Marcus Frings
2004-03-04 22:23     ` J-P Theberge
2004-03-05  9:12       ` Marcus Frings
2004-03-04 22:33   ` J-P Theberge
2004-03-05 14:41   ` Joel Smith [this message]
2004-03-05 16:38     ` Enila Nero
2004-03-04 18:15 ` Reiner Steib

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=ueks79x0q.fsf@JVSMITH.i-did-not-set--mail-host-address--so-shoot-me \
    --to=joelvsmith@earthlink.net \
    /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.