From: escherdragon@gmail.com
To: help-gnu-emacs@gnu.org
Subject: Re: Sunrise Commander: Version 3 released.
Date: Wed, 18 Mar 2009 09:58:41 -0700 (PDT) [thread overview]
Message-ID: <bd3c51bd-0f6f-4f5c-8f88-1c6a13abea89@c11g2000yqj.googlegroups.com> (raw)
In-Reply-To: a86353d7-e4dd-40ab-91e0-72ae19b2aad8@w24g2000prd.googlegroups.com
On 18 Mar, 13:26, rustom <rustompm...@gmail.com> wrote:
(...)
> > 0.5) Get and install Markus Triska's openwith -- it will allow to open
> > your files using external programs based on file extension. It can be
> > found in the Emacs Wiki:http://www.emacswiki.org/emacs/OpenWith
>
> > Isn't this solution good enough? I find it fantastic, but to be honest
> > I haven't tried it on Windows.
>
> Does not work on windows.
Oh, that's a real shame. Luckily not hard to fix :) I've just
submitted the following patch for Mr. Triska to consider applying it
to the standard distribution:
*************************** CUT HERE ***************************
--- openwith.el 2009-01-19 10:26:09.000000000 +0100
+++ openwith.el 2009-03-18 15:44:30.000000000 +0100
@@ -75,16 +75,19 @@
(setq oa (car assocs)
assocs (cdr assocs))
(when (save-match-data (string-match (car oa) file))
- (let ((params (mapcar (lambda (x) (if (eq x 'file) file x))
- (nth 2 oa))))
- (when (or (not openwith-confirm-invocation)
- (y-or-n-p (format "%s %s? " (cadr oa)
- (mapconcat #'identity params
" "))))
- (apply #'start-process "openwith-process" nil (cadr oa)
params)
- (kill-buffer nil)
- ;; inhibit further actions
- (error "Opened %s in external program"
- (file-name-nondirectory file))))))))
+ (let ((params (mapcar (lambda (x) (if (eq x 'file) file x))
+ (nth 2 oa))))
+ (when (or (not openwith-confirm-invocation)
+ (y-or-n-p (format "%s %s? " (cadr oa)
+ (mapconcat #'identity params " "))))
+ (if (and (fboundp 'w32-shell-execute)
+ (string= "open" (nth 1 oa)))
+ (w32-shell-execute "open" file)
+ (apply #'start-process "openwith-process" nil (cadr oa) params))
+ (kill-buffer nil)
+ ;; inhibit further actions
+ (error "Opened %s in external program"
+ (file-name-nondirectory file))))))))
;; when no association was found, relay the operation to other
handlers
(let ((inhibit-file-name-handlers
(cons 'openwith-file-handler
*************************** CUT HERE ***************************
with this modification, openwith works OK on windows too. You
configure it the same way one does in linux:
M-x customize-variable RET openwith-associations RET
just instead of using real program names, use the string
"open" (without the quotes) as the program to open all the extensions
of the files you want managed directly by windows.
Hope this helps.
Cheers,
--
José A. Romero L.
escherdragon@gmail.com
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)
next prev parent reply other threads:[~2009-03-18 16:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-28 16:05 Sunrise Commander: Version 3 released escherdragon
2009-03-01 2:06 ` Leo
[not found] ` <mailman.2120.1235873238.31690.help-gnu-emacs@gnu.org>
2009-03-01 17:23 ` escherdragon
2009-03-13 7:30 ` rustom
2009-03-17 20:00 ` escherdragon
2009-03-18 8:57 ` rustom
2009-03-18 9:42 ` escherdragon
2009-03-18 12:26 ` rustom
2009-03-18 14:56 ` Drew Adams
2009-03-18 16:58 ` escherdragon [this message]
2009-03-18 14:51 ` Drew Adams
[not found] ` <mailman.3502.1237387928.31690.help-gnu-emacs@gnu.org>
2009-03-18 17:03 ` escherdragon
2009-03-18 18:46 ` Drew Adams
[not found] ` <mailman.3512.1237401999.31690.help-gnu-emacs@gnu.org>
2009-03-19 0:19 ` escherdragon
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=bd3c51bd-0f6f-4f5c-8f88-1c6a13abea89@c11g2000yqj.googlegroups.com \
--to=escherdragon@gmail.com \
--cc=help-gnu-emacs@gnu.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.