Hello,

I use cygwin only cli, so I depend on html, pdf and odt MSWindows viewer.

I could manage to add this code to my .emacs:

(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")))))

so I can org-open-file html/pdf/odt files successfully.

But with (require 'ox-odt) + C-c C-e o O , my odt files open in emacs instead 
of LibreOffice.

I am aware of (org-open-file (org-odt-export-to-odt nil s v) 'system) line in 
ox-odt.el: 
- If I run (org-open-file "file.odt") I get the desired behaviour; 
- If I run (org-open-file "file.odt" 'system) I get file.odt open in emacs as a 
zip file.

So:

- How can redefine or supress 'system in (org-open-file (org-odt-export-to-odt 
nil s v) 'system) line in ox-odt.el?

- May I propose to developers to include (defconst 
org-file-apps-defaults-cygwin ... or similar?

- Could you help me in any other way?

Thank you so much.

Miguel Ruiz,
Sevilla (Spain).

Reply via email to