[Top][All Lists]

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

[h-e-w] Re: Customizing run-shell-command

From: Mathias Dahl
Subject: [h-e-w] Re: Customizing run-shell-command
Date: 17 Dec 2004 14:50:33 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Henrik Andersson <address@hidden> writes:

> How can I change run-shell-command (X in Dired) to run
> acrord32 instead of xpdf on .pdf for instance or even
> better the program which is associated with the extension
> in windows?

I use this:

(defun dired-w32-open-files (&optional arg files)
  "*Open FILES using the applications registered to handle them.
Return an error message if there is no application registered to
handle the files.  This command simply calls `w32-shell-execute'
and only works on Window systems."
  (interactive (list current-prefix-arg (dired-get-marked-files nil 
  (unless (fboundp 'w32-shell-execute)
    (error "This command is not available on this system."))
  (mapc (lambda (fn)
          (w32-shell-execute "Open" (subst-char-in-string ?/ ?\\ 
(expand-file-name fn))))

Map it to some easy to use key.


reply via email to

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