[O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip

2013-11-30 Thread Miguel Ruiz
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

2013-11-30 Thread Miguel Ruiz
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] How do I specify the language for a :results code block

2013-11-30 Thread Alan Schmitt
Hello Thomas and Charles,

ccbe...@ucsd.edu writes:

 A simple example: generate code in sh that is run in emacs-lisp

This is almost what I want, with two differences: I don't want to run
the generated code, but to pretty-print it, and I want to do this with
another language than emacs-lisp.

 #+name: make-elisp
 #+BEGIN_SRC sh :exports none :var fun=+
 echo ( $fun 1 2)
 #+END_SRC

 #+BEGIN_SRC emacs-lisp :noweb yes :exports results
 make-elisp()
 #+END_SRC

 #+RESULTS:
 : 3

 #+BEGIN_SRC emacs-lisp :noweb yes :exports results
 make-elisp(-)
 #+END_SRC

 #+RESULTS:
 : -1

 #+BEGIN_SRC emacs-lisp :noweb yes :exports results
 make-elisp(list)
 #+END_SRC

 #+RESULTS:
 | 1 | 2 |

I tried this, but I cannot make it fit my purpose. What I want is a
function that will create an org mode source block to be exported as
nicely formatted source code.

Here is what I tried:

#+name: fetchcoq
#+BEGIN_SRC sh :exports none :var f=demo.v
head $f
#+END_SRC

#+BEGIN_SRC coq :noweb yes :exports code
fetchcoq(demo.v)
#+END_SRC

If I export this, I get a block with lists, as if the results of
fetchcoq was translated into an elisp data structure:

,
| ((Definition toto : forall x exists y x = y.) (  ) (Lemma foo: 
forall x x=x. ))
`

I tried this alternate approach, to directly generate the block:

#+name: fetchcoq2
#+BEGIN_SRC sh :exports none :results raw :var f=demo.v
echo #+BEGIN_SRC coq
head $f
echo
echo #+END_SRC
#+END_SRC

#+call: fetchcoq2(demo.v)

But then I get a result like this, with extra quoting:

#+RESULTS:
: #+BEGIN_SRC coq
: Definition toto : forall x, exists y, x = y.
: 
: Lemma foo: forall x, x=x.
: #+END_SRC

I feel like I'm missing something obvious. :results code is exactly
what I want (put the results in a SRC block), but I don't know how to
specify the headers of the generated code block.

Thanks,

Alan



[O] Cannot generate latex preview images (Was: imaxima babel)

2013-11-30 Thread Alan Schmitt
Hello,

yggdra...@gmx.co.uk writes:

 Alan Schmitt alan.schm...@polytechnique.org writes:

 I tried previewing the fragment, but I got the error:

 ,
 | Failed to create dvi file from
 /var/folders/68/fvntfrw92y50gkk_67rkhsfwgn/T/orgtex16220cbr.tex
 `

 Looking at the tex file and the log file, it seems that the tex files is
 to be processed by xelatex, but the command called seems to be pdfTeX. I
 probably have something misconfigured, but I don't know what it is. Any
 suggestion?

 Are you sure you have 'dvipng' installed as mentioned in the manual? 
 ,
 | If you have `dvipng' installed, LaTeX fragments can be processed to
 | produce preview images of the typeset expressions:
 `
 I have dvipng 1.14 that comes with texlive 2013-3 in F20 which seems to
 work fine.


I do have dvipng installed, but the problem seems to come before that.

If I have a org buffer with the single following line:

#+BEGIN_SRC org
$$\alpha$$
#+END_SRC

If I try to preview the image, I get this error:

,
| Creating images for buffer...1
| Failed to create dvi file from 
/var/folders/68/fvntfrw92y50gkk_67rkhsfwgn/T/orgtex292450MA.tex
`

If I look at that tex file I see this:

#+BEGIN_SRC latex
\documentclass{article}
\usepackage[usenames]{color}
\usepackage{xltxtra}
\usepackage[T1]{fontenc}
% Package fixltx2e omitted
\usepackage{graphicx}
% Package longtable omitted
% Package float omitted
% Package wrapfig omitted
% Package rotating omitted
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
% Package hyperref omitted
\tolerance=1000
\pagestyle{empty} % do not remove
% The settings below are copied from fullpage.sty
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-3cm}
\setlength{\oddsidemargin}{1.5cm}
\addtolength{\oddsidemargin}{-2.54cm}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-\headheight}
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\footskip}
\addtolength{\textheight}{-3cm}
\setlength{\topmargin}{1.5cm}
\addtolength{\topmargin}{-2.54cm}
\begin{document}
$$\alpha$$
\end{document}
#+END_SRC

This file can be compiled using xelatex (because of the xltxtra
package). However it seems that org tries to compile it with something
else, as seen in the log file:

,
| This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=latex 
2013.8.2)  30 NOV 2013 11:12
| entering extended mode
|  restricted \write18 enabled.
|  %-line parsing enabled.
| **/var/folders/68/fvntfrw92y50gkk_67rkhsfwgn/T/orgtex29245BXG.tex
| (/var/folders/68/fvntfrw92y50gkk_67rkhsfwgn/T/orgtex29245BXG.tex
| LaTeX2e 2011/06/27
| Babel 3.9f and hyphenation patterns for 78 languages loaded.
| (/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls
| Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
| (/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo
| File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
| )
| \c@part=\count79
| \c@section=\count80
| \c@subsection=\count81
| \c@subsubsection=\count82
| \c@paragraph=\count83
| \c@subparagraph=\count84
| \c@figure=\count85
| \c@table=\count86
| \abovecaptionskip=\skip41
| \belowcaptionskip=\skip42
| \bibindent=\dimen102
| )
| (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/color.sty
| Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
| 
| (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/color.cfg
| File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
| )
| Package color Info: Driver file: dvips.def on input line 130.
| 
| (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvips.def
| File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
| )
| (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvipsnam.def
| File: dvipsnam.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
| ))
| (/usr/local/texlive/2013/texmf-dist/tex/latex/xltxtra/xltxtra.sty
| Package: xltxtra 2010/09/20 v0.5e Improvements for the XeLaTeX format
| 
| (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
| Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
| Package ifluatex Info: LuaTeX not detected.
| )
| (/usr/local/texlive/2013/texmf-dist/tex/generic/ifxetex/ifxetex.sty
| Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
| )
| ! 
|  
|  * XeTeX is required to compile this document.
|  * Sorry!
|  .
| \RequireXeTeX ...}
|   \endgroup \fi 
| l.26 \RequireXeTeX
|   
| ? 
| ! Emergency stop.
| \RequireXeTeX ...}
|   \endgroup \fi 
| l.26 \RequireXeTeX
|   
| End of file on 

Re: [O] Cannot generate latex preview images

2013-11-30 Thread Nicolas Goaziou
Hello,

Alan Schmitt alan.schm...@polytechnique.org writes:

 The reason I have xltxtra is because I add it to the latex packages to
 use for export:

   (add-to-list 'org-latex-packages-alist '( xltxtra t))
 ^^^

With this t, you are asking to use it also for snippets.  See
`org-latex-packages-alist' for more information.


Regards,

-- 
Nicolas Goaziou



Re: [O] Getting checkboxes in HTML output?

2013-11-30 Thread Rick Frankel
On Sat, Nov 30, 2013 at 07:54:42AM +0100, Carsten Dominik wrote:

 I don't thing the partial ones work - we should just make then
 unchecked in export if there is nothing better.  the grey dos not
 convey the right information.

I agree, but couldn't think of any other way. There are 3 other
unicode options:

1. A box with an X  (☒ U+2612 BALLOT BOX WITH X)
2. A bare (unboxed) X (✗ U+2717 BALLOT X)
3 A bare checkmark (✓ U+2713 CHECK MARK)

I  also found this character:

   U+237B ⍻ not check mark

If you think one of those would work we could use it instead.


 My vote:
 - Unicode characters as default
 - Both active and inactive checkboxes as option for people who want
 them, via a customize variable.
 - Partial checkboxes should be shown as unchecked.

I will implement the replacement of the ascii characters with the
unicode and the look at the html checkbox options.

FWIW, there are other issues w/ the active version besides the changes
not being saved -- If you are using hierarchical list or rollups
indicators ([x/y], [x%]), they will not be updated w/o some
javascript.

rick
 
 
 On 29.11.2013, at 17:11, Rick Frankel r...@rickster.com wrote:
 
  On 2013-11-28 16:58, Matt Price wrote:
  On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
  sva-n...@mygooglest.com wrote:
  Achim Gratz wrote:
  Rick Frankel writes:
  For xhtml compatibility, it would need to be 'checked=checked'. I've
  done a quick look at the html dtd, and i does look like input elements
  are allowed outside of forms, but i would need to double
  check... Also, the fallback to [-] for the partially checked state
  is a bit inconsistent, perhaps changing background color or other
  attributre of the checkbox would be better.
  I'd much prefer if you'd be using character entities for that since you
  can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
  LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
  candidates).  That probably makes it UTF-8 only since I don't think
  these symbols are defined for plain (X)HTML, so for other encodings
  things should probably stay as they are.
  FWIW, here's what I do for the HTML export:
  In JS:
  #+begin_src js
  $(function () {
  $('li  code:contains([X])')
  .parent()
  .addClass('checked')
  .end()
  .remove();
  $('li  code:contains([-])')
  .parent()
  .addClass('halfchecked')
  .end()
  .remove();
  $('li  code:contains([ ])')
  .parent()
  .addClass('unchecked')
  .end()
  .remove();
  });
  #+end_src
  In CSS:
  #+begin_src css
  li.checked {
  list-style-image: url('../images/checked.png');
  }
  li.halfchecked {
  list-style-image: url('../images/halfchecked.png');
  }
  li.unchecked {
  list-style-image: url('../images/unchecked.png');
  }
  #+end_src
  with 3 nice pictures of green V, red X, and blue || (line pause on
  recorders).
  so, I don't know if I'm the only one here who feels this way, but I
  would like to be able to export to an HTML file with ACTUAL HECKBOXES
  that I cna check off, say on a phone, when I put the milk in the
  shopping art, or pack the swim goggles in the vacation bag, or
  whatever.  Maybe though I should be thinking in terms of some other
  export application, remember the milk or something.  Am I describing a
  different use case than other users here, perhaps?
  
  My 3 cents:
  
  I don't see that active checkboxes would help since i don't see a use
  case where you can save the html back with the modified input. The
  github usecase mentioned in anothre thread requires a bunch of
  javascript to work (and write-out the modified file).
  
  While Sebastien's solution is visually appealing, i don't think
  requiring image assets is viable for the core exporter (note that it
  could be done w/o javascript, another dependency i would like to
  avoid).
  
  I've attached an html file which shows the various possible options. My
  comments:
  
  1. As mentioned above, I don't see active checkboxes as useful
  since the modified state is transient.
  2. I don't really like the disabled checkboxes visually.
  3. Either of the other two approaches (the list item style, which
  parallels Sebastien's approach w/o using images) works for me.
  Visually I like the list item style solution, but doesn't really
  make the intent clear.
  
  So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
  BOX WITH CHECK instead of the ascii character currently used and
  indicate partially checked boxes ([-]) with greyed text.
  
  Opinions?
  
  rick
  
  checkbox.html



Re: [O] How do I specify the language for a :results code block

2013-11-30 Thread Thomas S. Dye
Alan Schmitt alan.schm...@polytechnique.org writes:

 I tried this alternate approach, to directly generate the block:

 #+name: fetchcoq2
 #+BEGIN_SRC sh :exports none :results raw :var f=demo.v
 echo #+BEGIN_SRC coq
 head $f
 echo
 echo #+END_SRC
 #+END_SRC

 #+call: fetchcoq2(demo.v)

 But then I get a result like this, with extra quoting:

 #+RESULTS:
 : #+BEGIN_SRC coq
 : Definition toto : forall x, exists y, x = y.
 : 
 : Lemma foo: forall x, x=x.
 : #+END_SRC

 I feel like I'm missing something obvious. :results code is exactly
 what I want (put the results in a SRC block), but I don't know how to
 specify the headers of the generated code block.

You need :results raw at the end of the call line.

#+name: fetchcoq2
#+BEGIN_SRC sh :exports none :results raw :var f=demo.v
echo #+BEGIN_SRC coq
echo $f
echo #+END_SRC
#+END_SRC

#+results: fetchcoq2
#+BEGIN_SRC coq
demo.v
#+END_SRC

#+call: fetchcoq2(demo.v) :results raw

#+results:
#+BEGIN_SRC coq
demo.v
#+END_SRC

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Babel support for the D language

2013-11-30 Thread Thomas S. Dye
Aloha Thierry,

Thierry Banel tbanelweb...@free.fr writes:

 Done !
 The first draft of
 http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-D.html
 has been committed.

I pushed some minor edits.  Looks good!

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Getting checkboxes in HTML output?

2013-11-30 Thread Carsten Dominik
Hi Rick,

On 30.11.2013, at 15:07, Rick Frankel r...@rickster.com wrote:

 On Sat, Nov 30, 2013 at 07:54:42AM +0100, Carsten Dominik wrote:
 
 I don't thing the partial ones work - we should just make then
 unchecked in export if there is nothing better.  the grey dos not
 convey the right information.
 
 I agree, but couldn't think of any other way. There are 3 other
 unicode options:
 
   1. A box with an X  (☒ U+2612 BALLOT BOX WITH X)
   2. A bare (unboxed) X (✗ U+2717 BALLOT X)
   3 A bare checkmark (✓ U+2713 CHECK MARK)
 
 I  also found this character:
 
   U+237B ⍻ not check mark
 
 If you think one of those would work we could use it instead.

No, I don't think any of them does it.

 
 
 My vote:
 - Unicode characters as default
 - Both active and inactive checkboxes as option for people who want
 them, via a customize variable.
 - Partial checkboxes should be shown as unchecked.
 
 I will implement the replacement of the ascii characters with the
 unicode and the look at the html checkbox options.
 
 FWIW, there are other issues w/ the active version besides the changes
 not being saved -- If you are using hierarchical list or rollups
 indicators ([x/y], [x%]), they will not be updated w/o some
 javascript.

Thank you Rick!

- Carsten

 
 rick
 
 
 On 29.11.2013, at 17:11, Rick Frankel r...@rickster.com wrote:
 
 On 2013-11-28 16:58, Matt Price wrote:
 On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
 sva-n...@mygooglest.com wrote:
 Achim Gratz wrote:
 Rick Frankel writes:
 For xhtml compatibility, it would need to be 'checked=checked'. I've
 done a quick look at the html dtd, and i does look like input elements
 are allowed outside of forms, but i would need to double
 check... Also, the fallback to [-] for the partially checked state
 is a bit inconsistent, perhaps changing background color or other
 attributre of the checkbox would be better.
 I'd much prefer if you'd be using character entities for that since you
 can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
 LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
 candidates).  That probably makes it UTF-8 only since I don't think
 these symbols are defined for plain (X)HTML, so for other encodings
 things should probably stay as they are.
 FWIW, here's what I do for the HTML export:
 In JS:
 #+begin_src js
 $(function () {
 $('li  code:contains([X])')
 .parent()
 .addClass('checked')
 .end()
 .remove();
 $('li  code:contains([-])')
 .parent()
 .addClass('halfchecked')
 .end()
 .remove();
 $('li  code:contains([ ])')
 .parent()
 .addClass('unchecked')
 .end()
 .remove();
 });
 #+end_src
 In CSS:
 #+begin_src css
 li.checked {
 list-style-image: url('../images/checked.png');
 }
 li.halfchecked {
 list-style-image: url('../images/halfchecked.png');
 }
 li.unchecked {
 list-style-image: url('../images/unchecked.png');
 }
 #+end_src
 with 3 nice pictures of green V, red X, and blue || (line pause on
 recorders).
 so, I don't know if I'm the only one here who feels this way, but I
 would like to be able to export to an HTML file with ACTUAL HECKBOXES
 that I cna check off, say on a phone, when I put the milk in the
 shopping art, or pack the swim goggles in the vacation bag, or
 whatever.  Maybe though I should be thinking in terms of some other
 export application, remember the milk or something.  Am I describing a
 different use case than other users here, perhaps?
 
 My 3 cents:
 
 I don't see that active checkboxes would help since i don't see a use
 case where you can save the html back with the modified input. The
 github usecase mentioned in anothre thread requires a bunch of
 javascript to work (and write-out the modified file).
 
 While Sebastien's solution is visually appealing, i don't think
 requiring image assets is viable for the core exporter (note that it
 could be done w/o javascript, another dependency i would like to
 avoid).
 
 I've attached an html file which shows the various possible options. My
 comments:
 
 1. As mentioned above, I don't see active checkboxes as useful
 since the modified state is transient.
 2. I don't really like the disabled checkboxes visually.
 3. Either of the other two approaches (the list item style, which
 parallels Sebastien's approach w/o using images) works for me.
 Visually I like the list item style solution, but doesn't really
 make the intent clear.
 
 So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
 BOX WITH CHECK instead of the ascii character currently used and
 indicate partially checked boxes ([-]) with greyed text.
 
 Opinions?
 
 rick
 
 checkbox.html




Re: [O] Cygwin (org-open-file (org-odt-export-to-odt nil s v) 'system) opens odt as zip

2013-11-30 Thread Jambunathan K

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

2013-11-30 Thread Jambunathan K


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

2013-11-30 Thread Jambunathan K

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.