[O] Wrapping section into LaTeX statements?

2012-05-11 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I want to wrap a section of a document into LaTeX statements, as I would like 
to redefine
\subsectionbreak so that it does a \pagebreak before - but *only in one 
section*:

* A normal section
* Here I want the redefinition
#+BEGIN_LaTeX
  \let\oldsubsection = \subsection
  \renewcommand{\subsection}[1]{
\pagebreak{}
\oldsubsection{#1}
  }
#+END_LaTeX
** subsection 1
** subsection 2
* And here I want to use the old sectionbreak
#+BEGIN_LaTeX
  \renewcommand{\subsection}[1]{
\oldsubsection{#1}
  }
#+END_LaTeX
** subsection 1
** subsection 2

Now I can do this as above, but I don't like it, as the second LaTeX code 
actually should be at
the end of the previous section and if I insert a section, I have to move the 
LaTeX code.

I could put it into the previous section, but then it would be in the 
subsection 2, and if I add a
subsection 3, I would have to move the LaTeX code into this subsection.

So nothing is optimal - is there an alternative which makes more sense and is 
easier to maintain?

Thanks,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+s3zoACgkQoYgNqgF2egozQQCcDGf9OG2VgPXc0/GEC1zZjJkw
8AsAnAlZTTekpjOW0Z82aPrIyklXTEug
=ilmi
-END PGP SIGNATURE-



Re: [O] [babel] [BUG] table with header line as parameter

2012-05-11 Thread Andreas Leha
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 I do not know what could be the cause of this, but I can't have a
 table with header as argument to a source block any more:

 #+name: table_w_header
 | one | two |
 |-+-|
 | 1   | 3   |

 #+begin_src R :var tbl=table_w_header

 #+end_src

 If I do C-c C-v v on the above source block, I get this backtrace:

 ,
 | Debugger entered--Lisp error: (wrong-type-argument sequencep hline)
 |   length(hline)
 |   mapcar(length ((one two) hline (1 3)))
 |   org-babel-R-assign-elisp(tbl ((one two) hline (1 3)) nil nil)
 |   #[(pair) \302@A\303\304 \A\305\232\303\306 \A\305\232$\207
 | [pair params org-babel-R-assign-elisp assoc :colnames yes
 | :rownames] 7]((tbl (one two) hline (1 3)))
 |   mapcar(#[(pair) \302@A\303\304 \A\305\232\303\306
 | \A\305\232$\207 [pair params org-babel-R-assign-elisp assoc
 | :colnames yes :rownames] 7] ((tbl (one two) hline (1 3
 |   org-babel-variable-assignments:R(((:cache . no) (:colname-names
 | (tbl one two)) (:comments . ) (:exports . code) (:hlines
 | . no) (:noweb . no) (:padline . ) (:padnewline . yes)
 | (:result-params replace) (:result-type . value) (:results
 | . replace) (:rowname-names) (:session . none) (:shebang . )
 | (:tangle . no) (:var tbl (1 3
 |   org-babel-expand-body:R(\n ((:cache . no) (:colname-names (tbl
 | one two)) (:comments . ) (:exports . code) (:hlines . no)
 | (:noweb . no) (:padline . ) (:padnewline . yes)
 | (:result-params replace) (:result-type . value) (:results
 | . replace) (:rowname-names) (:session . none) (:shebang . )
 | (:tangle . no) (:var tbl (1 3
 |   org-babel-expand-src-block()
 |   call-interactively(org-babel-expand-src-block nil nil)
 `

 I tested on with emacs -Q on
 1. GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.1) of 
 2012-05-02 on zelenka, modified by Debian
 2. GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-07 
 on trouble, modified by Debian

 My org-version: Org-mode version 7.8.09 with last commit
 ,
 | commit 56520a6936351d6fcc149652e1ff30f50c43eb4e
 | Merge: 505cc7a 0ebeb77
 | Author: Nicolas Goaziou n.goaz...@gmail.com
 | Date:   Wed May 9 23:34:05 2012 +0200
 | 
 | Merge branch 'maint'
 `
 So, the fix discussed in
 [[https://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01444.html]]
 should be there.


 Not sure if this could be connected:  I updated my emacs-snapshot (the
 24 version) from [[http://emacs.naquadah.org]] today.


 Any help is highly appreciated,
 Andreas


Hi all,

sorry for answering to my own message.

I thought, that I did not pull between working state and broken state, but
apparently I did.

So, in the end, =git bisect= now told me the responsible commit:
,
| fb7ebd2dae66a7b42aecff695fe40461a33a76ed is the first bad commit
| commit fb7ebd2dae66a7b42aecff695fe40461a33a76ed
| Author: Eric Schulte eric.schu...@gmx.com
| Date:   Wed Apr 25 15:34:15 2012 -0400
| 
| clean up the code implementing reads of irregular data into R
| 
| * lisp/ob-R.el (org-babel-R-assign-elisp): Clean up the code
|   implementing reads of irregular data into R.
`

This commit is revertable, and reverting this commit also solves the
described issue for me.

Cheers,
Andreas




Re: [O] Wrapping section into LaTeX statements?

2012-05-11 Thread Thomas S. Dye
Rainer M Krug r.m.k...@gmail.com writes:

 Hi

 I want to wrap a section of a document into LaTeX statements, as I would like 
 to redefine
 \subsectionbreak so that it does a \pagebreak before - but *only in one 
 section*:

 * A normal section
 * Here I want the redefinition
 #+BEGIN_LaTeX
   \let\oldsubsection = \subsection
   \renewcommand{\subsection}[1]{
 \pagebreak{}
 \oldsubsection{#1}
   }
 #+END_LaTeX
 ** subsection 1
 ** subsection 2
 * And here I want to use the old sectionbreak
 #+BEGIN_LaTeX
   \renewcommand{\subsection}[1]{
 \oldsubsection{#1}
   }
 #+END_LaTeX
 ** subsection 1
 ** subsection 2

 Now I can do this as above, but I don't like it, as the second LaTeX code 
 actually should be at
 the end of the previous section and if I insert a section, I have to move the 
 LaTeX code.

 I could put it into the previous section, but then it would be in the 
 subsection 2, and if I add a
 subsection 3, I would have to move the LaTeX code into this subsection.

 So nothing is optimal - is there an alternative which makes more sense and is 
 easier to maintain?

 Thanks,

 Rainer
Aloha Rainer,

* section

\pagebreak
** subsection 1
** subsection 2

Would this work?  Note that \pagebreak doesn't have a required
argument--the optional argument \pagebreak[] lets LaTeX decide whether
or not to break the page.

All the best,
Tom

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



[O] Feedback on org-collector Worg page

2012-05-11 Thread John Hendy
I'm happy to do the updating that might come out of these comments.
Org-collector was recently mentioned on the mailing list and I took a
second to play with it a bit by following the page on Worg.
-- http://orgmode.org/worg/org-contrib/org-collector.html

The location of the src table was not specified in the article. I
found out after a bit of trial and error that the org-collector block
will search only the previous headline and any children. Thus, one
needs to be careful where the org-collector block is. To use the
example on Worg, someone might create their financial tracker document
like so:

--
* Statistics
[bunch of org-collector blocks]

* Raw Data
** Jan Purchases
** Feb Purchases
** Etc.
--

This would not work, as the org-collector blocks are only looking in
the * Statistics headline. This is probably worth mentioning on Worg
if I'm correct (again, I'm happy to do this). Either that, or perhaps
the scope of the headlines searched could be changed if others find
this undesirable. Or I've totally botched and don't have the right
understanding and this is all a false alarm! :)

Secondly, I was attempting to use this on my contacts.org file and
kept getting errors. Probably a bad first start for a guinea pig file.
I finally narrowed down that my :Phone: property in the form (xxx)
xxx. was causing the error. It seems that properties with
parentheses cause org-collector to try and run it as a function. If I
add a property to the example file (call it foo) and give it the
value (test), I get the error on C-c C-c (void-function test).

Comments?


Best regards,
John



[O] (no subject)

2012-05-11 Thread Rick Frankel
From 113bbbe1ce9540e2af8c613ba655599fc474cedd Mon Sep 17 00:00:00 2001
From: Rick Frankel r...@rickster.com
Date: Fri, 11 May 2012 16:54:32 -0400
Subject: [PATCH] Add support for perl dbi to SQL code block

* lisp/ob-sql.el (org-babel-execute:sql): Add dbi as a suppored engine.

Invokes `dbish' with the arguments specified to :cmdline. Minimum is
usually the dbi:{dbd} argument, plus the username and password if
required.
For example:
#+begin_src sql :engine dbi :cmdline dbi:Pg:database=postgres
---
 lisp/ob-sql.el |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index e3f6edd..c6d4790 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -71,6 +71,11 @@ This function is called by `org-babel-execute-src-block'.
(org-babel-temp-file sql-out-)))
 (header-delim )
  (command (case (intern engine)
+('dbi (format dbish --batch %s  %s | sed '%s'  %s
+ (or cmdline )
+ (org-babel-process-file-name in-file)
+ /^+/d;s/^\|//;$d
+ (org-babel-process-file-name out-file)))
 ('monetdb (format mclient -f tab %s  %s  %s
   (or cmdline )
   (org-babel-process-file-name in-file)
@@ -90,7 +95,11 @@ This function is called by `org-babel-execute-src-block'.
(or cmdline )))
 (t (error no support for the %s sql engine engine)
 (with-temp-file in-file
-  (insert (org-babel-expand-body:sql body params)))
+  (insert
+   (case (intern engine)
+('dbi /format partbox\n)
+(t ))
+   (org-babel-expand-body:sql body params)))
 (message command)
 (shell-command command)
 (if (or (member scalar result-params)
-- 
1.7.10.1




Re: [O] (no subject)

2012-05-11 Thread Eric Schulte
Thanks for the patch, I would like to apply it.

Have you signed the FSF papers for contribution to Org-mode and Emacs?
If you haven't would you be willing to?  See the Org-mode contribution
instructions for more information.
http://orgmode.org/worg/org-contribute.html

Thanks!

r...@rickster.com (Rick Frankel) writes:

 From 113bbbe1ce9540e2af8c613ba655599fc474cedd Mon Sep 17 00:00:00 2001
 From: Rick Frankel r...@rickster.com
 Date: Fri, 11 May 2012 16:54:32 -0400
 Subject: [PATCH] Add support for perl dbi to SQL code block

 * lisp/ob-sql.el (org-babel-execute:sql): Add dbi as a suppored engine.

 Invokes `dbish' with the arguments specified to :cmdline. Minimum is
 usually the dbi:{dbd} argument, plus the username and password if
 required.
 For example:

  lisp/ob-sql.el |   11 ++-
  1 file changed, 10 insertions(+), 1 deletion(-)

 diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
 index e3f6edd..c6d4790 100644
 --- a/lisp/ob-sql.el
 +++ b/lisp/ob-sql.el
 @@ -71,6 +71,11 @@ This function is called by `org-babel-execute-src-block'.
 (org-babel-temp-file sql-out-)))
(header-delim )
   (command (case (intern engine)
 +('dbi (format dbish --batch %s  %s | sed '%s'  %s
 +   (or cmdline )
 +   (org-babel-process-file-name in-file)
 +   /^+/d;s/^\|//;$d
 +   (org-babel-process-file-name out-file)))
  ('monetdb (format mclient -f tab %s  %s  %s
(or cmdline )
(org-babel-process-file-name in-file)
 @@ -90,7 +95,11 @@ This function is called by `org-babel-execute-src-block'.
   (or cmdline )))
  (t (error no support for the %s sql engine engine)
  (with-temp-file in-file
 -  (insert (org-babel-expand-body:sql body params)))
 +  (insert
 +   (case (intern engine)
 +  ('dbi /format partbox\n)
 +  (t ))
 +   (org-babel-expand-body:sql body params)))
  (message command)
  (shell-command command)
  (if (or (member scalar result-params)

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] Feedback on org-collector Worg page

2012-05-11 Thread Eric Schulte
John Hendy jw.he...@gmail.com writes:

 I'm happy to do the updating that might come out of these comments.
 Org-collector was recently mentioned on the mailing list and I took a
 second to play with it a bit by following the page on Worg.
 -- http://orgmode.org/worg/org-contrib/org-collector.html

 The location of the src table was not specified in the article. I
 found out after a bit of trial and error that the org-collector block
 will search only the previous headline and any children. Thus, one
 needs to be careful where the org-collector block is. To use the
 example on Worg, someone might create their financial tracker document
 like so:

 --
 * Statistics
 [bunch of org-collector blocks]

 * Raw Data
 ** Jan Purchases
 ** Feb Purchases
 ** Etc.
 --

 This would not work, as the org-collector blocks are only looking in
 the * Statistics headline. This is probably worth mentioning on Worg
 if I'm correct (again, I'm happy to do this). Either that, or perhaps
 the scope of the headlines searched could be changed if others find
 this undesirable. Or I've totally botched and don't have the right
 understanding and this is all a false alarm! :)

 Secondly, I was attempting to use this on my contacts.org file and
 kept getting errors. Probably a bad first start for a guinea pig file.
 I finally narrowed down that my :Phone: property in the form (xxx)
 xxx. was causing the error. It seems that properties with
 parentheses cause org-collector to try and run it as a function. If I
 add a property to the example file (call it foo) and give it the
 value (test), I get the error on C-c C-c (void-function test).

 Comments?


Hi John,

I wrote the org-collector some years ago, but haven't used it in a long
time.  After a quick scan your comments look great, and I'm sure they
would improve the worg page, so please go ahead and make any changes you
see fit.  My one caveat is that you may want to (if you haven't already)
look through the org-collector.el file for comments, which may explain
some of the surprising behaviors.

Thanks,



 Best regards,
 John


-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] (no subject)

2012-05-11 Thread Bernt Hansen
Eric Schulte eric.schu...@gmx.com writes:

 * lisp/ob-sql.el (org-babel-execute:sql): Add dbi as a suppored engine.

s/suppored/supported/

-Bernt



Re: [O] Babel, gnuplot, post processing

2012-05-11 Thread Eric Schulte
skip scp0...@gmail.com writes:

 How can I perform post processing on eps files produced by gnuplot
 source blocks? I want to take out the extra white space margins in the
 eps file by running eps2eps utility on the eps file produced by
 gnuplot.


I believe that if given a :file header argument the gnuplot block will
return the path to the altered file as it's return result.  You could
use a :var header argument to feed this path into a shell script code
block which could call eps2eps on the resulting file.

With this setup, every time the sh code block is evaluated it will call
the gnuplot code block before it is run.  See the relevant manual
chapter for more information.
http://orgmode.org/manual/Working-With-Source-Code.html

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] [babel] [BUG] table with header line as parameter

2012-05-11 Thread Eric Schulte
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 I do not know what could be the cause of this, but I can't have a
 table with header as argument to a source block any more:

 #+name: table_w_header
 | one | two |
 |-+-|
 | 1   | 3   |

 #+begin_src R :var tbl=table_w_header

 #+end_src

 If I do C-c C-v v on the above source block, I get this backtrace:

 ,
 | Debugger entered--Lisp error: (wrong-type-argument sequencep hline)
 |   length(hline)
 |   mapcar(length ((one two) hline (1 3)))
 |   org-babel-R-assign-elisp(tbl ((one two) hline (1 3)) nil nil)
 |   #[(pair) \302@A\303\304 \A\305\232\303\306 \A\305\232$\207
 | [pair params org-babel-R-assign-elisp assoc :colnames yes
 | :rownames] 7]((tbl (one two) hline (1 3)))
 |   mapcar(#[(pair) \302@A\303\304 \A\305\232\303\306
 | \A\305\232$\207 [pair params org-babel-R-assign-elisp assoc
 | :colnames yes :rownames] 7] ((tbl (one two) hline (1 3
 |   org-babel-variable-assignments:R(((:cache . no) (:colname-names
 | (tbl one two)) (:comments . ) (:exports . code) (:hlines
 | . no) (:noweb . no) (:padline . ) (:padnewline . yes)
 | (:result-params replace) (:result-type . value) (:results
 | . replace) (:rowname-names) (:session . none) (:shebang . )
 | (:tangle . no) (:var tbl (1 3
 |   org-babel-expand-body:R(\n ((:cache . no) (:colname-names (tbl
 | one two)) (:comments . ) (:exports . code) (:hlines . no)
 | (:noweb . no) (:padline . ) (:padnewline . yes)
 | (:result-params replace) (:result-type . value) (:results
 | . replace) (:rowname-names) (:session . none) (:shebang . )
 | (:tangle . no) (:var tbl (1 3
 |   org-babel-expand-src-block()
 |   call-interactively(org-babel-expand-src-block nil nil)
 `

 I tested on with emacs -Q on
 1. GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.1) of 
 2012-05-02 on zelenka, modified by Debian
 2. GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 
 2012-04-07 on trouble, modified by Debian

 My org-version: Org-mode version 7.8.09 with last commit
 ,
 | commit 56520a6936351d6fcc149652e1ff30f50c43eb4e
 | Merge: 505cc7a 0ebeb77
 | Author: Nicolas Goaziou n.goaz...@gmail.com
 | Date:   Wed May 9 23:34:05 2012 +0200
 | 
 | Merge branch 'maint'
 `
 So, the fix discussed in
 [[https://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01444.html]]
 should be there.


 Not sure if this could be connected:  I updated my emacs-snapshot (the
 24 version) from [[http://emacs.naquadah.org]] today.


 Any help is highly appreciated,
 Andreas


 Hi all,

 sorry for answering to my own message.

 I thought, that I did not pull between working state and broken state, but
 apparently I did.

 So, in the end, =git bisect= now told me the responsible commit:
 ,
 | fb7ebd2dae66a7b42aecff695fe40461a33a76ed is the first bad commit
 | commit fb7ebd2dae66a7b42aecff695fe40461a33a76ed
 | Author: Eric Schulte eric.schu...@gmx.com
 | Date:   Wed Apr 25 15:34:15 2012 -0400
 | 
 | clean up the code implementing reads of irregular data into R
 | 
 | * lisp/ob-R.el (org-babel-R-assign-elisp): Clean up the code
 |   implementing reads of irregular data into R.
 `

 This commit is revertable, and reverting this commit also solves the
 described issue for me.

 Cheers,
 Andreas



Hi Andreas,

Thanks for reporting and for bisecting (which made fixing much easier).
I've just pushed up a fix.

Please let me know if problems persist.

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



[O] Problem exporting to PDF (and viewing)

2012-05-11 Thread Richard Stanton
Using Org-mode version 7.8.09 (release_7.8.09-553-g5750f0) (and earlier 
versions) I've encountered a problem on my Windows machine when I try to export 
an Org file to LaTeX, then to Pdf, then viewing (using C-c C-e d).

In my init.el I have the lines

  (eval-after-load org
'(progn
   (if (assoc \\.pdf\\' org-file-apps)
   (setcdr (assoc \\.pdf\\' org-file-apps) 
c:/progra~1/sumatrapdf/sumatrapdf.exe  %s) 
 (add-to-list 'org-file-apps '(\\.pdf\\' . 
c:/progra~1/sumatrapdf/sumatrapdf.exe %s) t
)

This results in:
 
org-file-apps is a variable defined in `org.el'.
Its value is ((auto-mode . emacs)
 (\\.mm\\' . default)
 (\\.x?html?\\' . default)
 (\\.pdf\\' . c:/progra~1/sumatrapdf/sumatrapdf.exe %s))

When I try to export an org file by typing C-c C-e d, sumatrapdf opens up OK, 
but complains with an error like this:

Error loading c:\dropbox\org\c\:\dropbox\org\personal.pdf

Any idea why I get the repeated path? A similar constructions works fine on my 
Mac, so I'm not quite sure what's going wrong here.




Re: [O] ATTR_HTML for a clickable image, howto?

2012-05-11 Thread Samuel Wales
Hi Christian,

Thanks for your thoughtful comments.  I have a better understanding of
it now.  Here is more as a sort of summary for searchers.

On 2012-04-11, Christian Moe m...@christianmoe.com wrote:
 Are those two separate questions, perhaps? I tried with
 org-export-as-region, and I still got the full HEAD section. So the

I mean this: If prefix arg body-only is set, omit file header,
footer, and table of contents, and only produce the region of
converted text, useful for cut-and-paste operations. (from the
docstring).

Blogger (and many other places online) already has a HEAD section, and
my understanding is that you can't have 2 HEAD sections.  (I presume
there does not exist a HEAD-APPEND section in the HTML standard.)

So letting Org produce the HEAD section seems to be not possible here.

 No doubt there's some way you could wrap everything inside the BODY
 section in a DIV, but any CSS in its STYLE attribute would apply to
 that div element as a whole, i.e. to all the contents, not selectively
 to bits and parts inside it. That's probably not what you want.

To summarize, it appears as if you can't use full CSS (like whatever
{ whatever: whatever; }) as a wrapper at all in the body section, so
you need a HEAD section or a separate CSS file to be able to style
specific types of elements the way it is normally done.  The rough
Lisp analogy seems to be that you cannot use let to bind a variable
that is used in various places, but you can use setq (in a section
that can only be used once) or load.

That's the answer I was looking for.  I looked it up more and it seems
to be the case.

Thanks.

 4. org-exp-blocks.el;

I don't understand this enough yet to know how much effort would be
required.  Good to know you think it might work.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com



Re: [O] Problem exporting to PDF (and viewing)

2012-05-11 Thread Richard Stanton
Checking further, this works fine using the default Windows shell in Emacs, but 
fails if I use bash as my shell. Unfortunately, I like to use bash, which I 
achieve with the following lines in my init.el: 

  (setq shell-file-name bash)
  (setenv SHELL shell-file-name) 
  (setq explicit-shell-file-name shell-file-name)

 -Original Message-
 From: Richard Stanton
 Sent: Friday, May 11, 2012 4:52 PM
 To: emacs-orgmode@gnu.org
 Subject: Problem exporting to PDF (and viewing)
 
 Using Org-mode version 7.8.09 (release_7.8.09-553-g5750f0) (and earlier
 versions) I've encountered a problem on my Windows machine when I try to
 export an Org file to LaTeX, then to Pdf, then viewing (using C-c C-e d).
 
 In my init.el I have the lines
 
   (eval-after-load org
 '(progn
(if (assoc \\.pdf\\' org-file-apps)
(setcdr (assoc \\.pdf\\' org-file-apps)
 c:/progra~1/sumatrapdf/sumatrapdf.exe  %s)
  (add-to-list 'org-file-apps '(\\.pdf\\' .
 c:/progra~1/sumatrapdf/sumatrapdf.exe %s) t
 )
 
 This results in:
 
 org-file-apps is a variable defined in `org.el'.
 Its value is ((auto-mode . emacs)
  (\\.mm\\' . default)
  (\\.x?html?\\' . default)
  (\\.pdf\\' . c:/progra~1/sumatrapdf/sumatrapdf.exe %s))
 
 When I try to export an org file by typing C-c C-e d, sumatrapdf opens up OK,
 but complains with an error like this:
 
 Error loading c:\dropbox\org\c\:\dropbox\org\personal.pdf
 
 Any idea why I get the repeated path? A similar constructions works fine on
 my Mac, so I'm not quite sure what's going wrong here.