From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip Date: Sat, 30 Nov 2013 21:32:12 +0530 Message-ID: <87zjolx4hn.fsf@gmail.com> References: <1385801099.31770.YahooMailNeo@web171905.mail.ir2.yahoo.com> <87pppi19fo.fsf@gmail.com> <1385808225.47874.YahooMailNeo@web171903.mail.ir2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmn1V-0007Ly-C6 for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 11:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vmn1M-0005Fx-Vs for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 11:04:01 -0500 Received: from mail-pd0-x234.google.com ([2607:f8b0:400e:c02::234]:57745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmn1M-0005Fr-JN for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 11:03:52 -0500 Received: by mail-pd0-f180.google.com with SMTP id q10so15268367pdj.25 for ; Sat, 30 Nov 2013 08:03:51 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Miguel Ruiz Cc: "emacs-orgmode@gnu.org" Ignore my earlier suggestion. > (if (eq system-type 'cygwin) > (add-hook 'org-mode-hook > '(lambda () > (delete '("\\.x?html?\\'" . default) org-file-apps) > (add-to-list 'org-file-apps '("\\.x?html?\\'" . "cygstart %s")) > (delete '("\\.pdf\\'" . default) org-file-apps) > (add-to-list 'org-file-apps '("\\.pdf\\'" . "cygstart %s")) > (delete '("\\.odt\\'" . default) org-file-apps) > (add-to-list 'org-file-apps '("\\.odt\\'" . "cygstart %s"))))) You can also remove the above settings. ---------------------------------------------------------------- Use the following setting instead. `org-default-apps' uses the value of `org-file-apps-defaults-gnu' for cygwin as well. You just need to remove the mailcap entry in that variable and replace it with "cygstart" as below. (eval-after-load 'org '(when (eq system-type 'gnu/linux) (setcdr (assq 'system org-file-apps-defaults-gnu ) "cygstart %s") (setcdr (assq t org-file-apps-defaults-gnu ) "cygstart %s"))) ---------------------------------------------------------------- As you rightly suggest, `org-default-apps' doesn't handle `system-type' value of 'cygwin.