Re: [O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip
Thank you, Jambunathan. I was exploring (defconst org-file-apps-defaults-cygwin '((remote . emacs) (t . cygstart %s) (system . cygstart %s) (ps.gz . gv %s) (eps.gz . gv %s) (dvi . xdvi %s) (fig . xfig %s))) (defun org-default-apps () Return the default applications for this operating system. (cond ((eq system-type 'darwin) org-file-apps-defaults-macosx) ((eq system-type 'cygwin) org-file-apps-defaults-cygwin) ((eq system-type 'windows-nt) org-file-apps-defaults-windowsnt) (t org-file-apps-defaults-gnu)))And it works for me so far. Your code is more compact but an ad-hoc solution as well. It is worth to take into consideration. Thanks again. I suppose you would like to know I have also tweaked your directions about odt-mathml for cygwin: (setq org-latex-to-mathml-convert-command java -jar $(cygpath -pw %j) -unicode -force -df %o %I) (setq org-latex-to-mathml-jar-file /home/user/tmp-odt/mathtoweb.jar) with great success (Java 1.7 update 25, mathtoweb 4.0.0). Miguel. Jambunathan K kjambunat...@gmail.com writes: (eval-after-load 'org '(when (eq system-type 'gnu/linux) ^ ^ 'cygwin (setcdr (assq 'system org-file-apps-defaults-gnu ) cygstart %s) (setcdr (assq t org-file-apps-defaults-gnu ) cygstart %s)))
Re: [O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip
Miguel Ruiz rbeni...@yahoo.es writes: (defconst org-file-apps-defaults-cygwin '((remote . emacs) (t . cygstart %s) (system . cygstart %s) (ps.gz . gv %s) (eps.gz . gv %s) (dvi . xdvi %s) (fig . xfig %s))) (defun org-default-apps () Return the default applications for this operating system. (cond ((eq system-type 'darwin) org-file-apps-defaults-macosx) ((eq system-type 'cygwin) org-file-apps-defaults-cygwin) ((eq system-type 'windows-nt) org-file-apps-defaults-windowsnt) (t org-file-apps-defaults-gnu))) The cygwin issue your report should have been picked up by now. It is a good idea to do a M-x report-emacs-bug so that this issue is recorded. I suppose you would like to know I have also tweaked your directions about odt-mathml for cygwin: (setq org-latex-to-mathml-convert-command java -jar $(cygpath -pw %j) -unicode -force -df %o %I) (setq org-latex-to-mathml-jar-file /home/user/tmp-odt/mathtoweb.jar) Thanks. I see mathml has improved since I added support for it. You are the second ever user I heard from. (Search for plasticml in the mailing list to see the other mathml thread) with great success (Java 1.7 update 25, mathtoweb 4.0.0). Good to hear that.
[O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip
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).
Re: [O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip
Thank you, Jambunathan. 1/ I'm running Emacs 24.3.1 (i686-pc-cygwin) of 2013-08-14 on moufang; it's Windows Emacs built into cygwin, so you don't have to have X11 installed in cygwin for graphical Emacs. 2/ I forgot to say I'm a running mintty 1.1.3 so open is not available, I can use cygstart instead. 3/ I will try the code you provide and I'll commit the list the progress I get. 4/ So far, cygwin+emacs+orgmode+python+perl+latex it's very nice, specially by the fact that you can propagate an ultra-customized working-environment as easy as just copy, no doubt, a very big folder. Miguel. El Sábado 30 de noviembre de 2013 11:18, Jambunathan K kjambunat...@gmail.com escribió: Miguel Ruiz rbeni...@yahoo.es writes: Remove all your configurations and try this. This will use windows open. (require 'org) ;; Make sure org is loaded (defun org-default-apps () Return the default applications for this operating system. (cond ((eq system-type 'darwin) org-file-apps-defaults-macosx) ((memq system-type '(cygwin windows-nt)) ;; org-file-apps-defaults-windowsnt) (t org-file-apps-defaults-gnu))) cygstart %s Any reason why this one is preferable windows's default open. Is cygstart a recent addition or is it available even on older distributions. - How can redefine or supress 'system in (org-open-file (org-odt-export-to-odt nil s v) 'system) line in ox-odt.el? ODT files are zip files (can be opened in archive-mode) or they can be opened in doc-view. Use of 'system has generally not proved to be problematic in practice. I think it is possible to accomplish what you want without touch or modifying that particular line. - May I propose to developers to include (defconst org-file-apps-defaults-cygwin ... or similar? It would be a good idea. But, does the Emacs come from cygwin distribution or is it NT Emacs (ftp://ftp.gnu.org/gnu/emacs/windows/). Sorry, I am unable to provide concrete feedback. As sometime user of Cygwin + Windows, I found that Cygwin is a pain and started using native Windows Emacs and Gnu Win32 libraries. I have now moved to Debian now.
Re: [O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip
Miguel Ruiz rbeni...@yahoo.es writes: Remove all your configurations and try this. This will use windows open. (require 'org) ;; Make sure org is loaded (defun org-default-apps () Return the default applications for this operating system. (cond ((eq system-type 'darwin) org-file-apps-defaults-macosx) ((memq system-type '(cygwin windows-nt)) ;; org-file-apps-defaults-windowsnt) (t org-file-apps-defaults-gnu))) cygstart %s Any reason why this one is preferable windows's default open. Is cygstart a recent addition or is it available even on older distributions. - How can redefine or supress 'system in (org-open-file (org-odt-export-to-odt nil s v) 'system) line in ox-odt.el? ODT files are zip files (can be opened in archive-mode) or they can be opened in doc-view. Use of 'system has generally not proved to be problematic in practice. I think it is possible to accomplish what you want without touch or modifying that particular line. - May I propose to developers to include (defconst org-file-apps-defaults-cygwin ... or similar? It would be a good idea. But, does the Emacs come from cygwin distribution or is it NT Emacs (ftp://ftp.gnu.org/gnu/emacs/windows/). Sorry, I am unable to provide concrete feedback. As sometime user of Cygwin + Windows, I found that Cygwin is a pain and started using native Windows Emacs and Gnu Win32 libraries. I have now moved to Debian now.
Re: [O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip
Jambunathan K kjambunat...@gmail.com writes: (eval-after-load 'org '(when (eq system-type 'gnu/linux) ^ ^ 'cygwin (setcdr (assq 'system org-file-apps-defaults-gnu ) cygstart %s) (setcdr (assq t org-file-apps-defaults-gnu ) cygstart %s)))
Re: [O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip
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.