From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: escherdragon@gmail.com Newsgroups: gmane.emacs.help Subject: Re: Sunrise Commander: Version 3 released. Date: Wed, 18 Mar 2009 09:58:41 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <83101699-846a-45a0-9632-6c95a6c1a4d9@e3g2000vbe.googlegroups.com> <753c080b-d061-46cc-8c60-6fbe6a08934b@e1g2000pra.googlegroups.com> <7d4d510f-9b6d-4164-b494-5e2a7db10b9f@v15g2000yqn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237398058 678 80.91.229.12 (18 Mar 2009 17:40:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Mar 2009 17:40:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 18 18:42:15 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LjzmB-0001W2-Hx for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Mar 2009 18:41:59 +0100 Original-Received: from localhost ([127.0.0.1]:53449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ljzkp-0000il-6p for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Mar 2009 13:40:35 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!postnews.google.com!c11g2000yqj.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 72 Original-NNTP-Posting-Host: 62.111.135.130 Original-X-Trace: posting.google.com 1237395521 18868 127.0.0.1 (18 Mar 2009 16:58:41 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 18 Mar 2009 16:58:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c11g2000yqj.googlegroups.com; posting-host=62.111.135.130; posting-account=mkEKGAoAAACAV2vhv5r9WHXWqsdL_niD User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 Voyager:3128 (squid) Original-Xref: news.stanford.edu gnu.emacs.help:167758 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63051 Archived-At: On 18 Mar, 13:26, rustom 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=3D "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=E9 A. Romero L. escherdragon@gmail.com "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed)