From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Problem exporting to PDF (and viewing) Date: Sat, 12 May 2012 10:39:30 -0400 Message-ID: <23805.1336833570@alphaville> References: <40C7B1BFC291ED4E9D10436D07736A33470478B315@EXMAIL7.haas.uc.berkeley.edu> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STDUB-0003Bi-48 for emacs-orgmode@gnu.org; Sat, 12 May 2012 10:39:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STDU9-0002K4-3a for emacs-orgmode@gnu.org; Sat, 12 May 2012 10:39:54 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:17565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STDU8-0002IA-Sx for emacs-orgmode@gnu.org; Sat, 12 May 2012 10:39:53 -0400 In-Reply-To: Message from Jonathan Leech-Pepin of "Sat\, 12 May 2012 10\:23\:55 EDT." 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: Jonathan Leech-Pepin Cc: Richard Stanton , "emacs-orgmode@gnu.org" Jonathan Leech-Pepin wrote: > I suspect you should be able to get it to recognize "C:/Program\ > Files/sumatrapdf/sumatrapdf.exe". >=20 > Alternately if the exe is found on your PATH (you may need to add it > by hand), you should be able to manage with: >=20 > (executable-find "sumatrapdf.exe") >=20 > which should be able to track back the path to the appropriate file. >=20 > On Sat, May 12, 2012 at 12:10 AM, Richard Stanton > wrote: > > Checking further, this works fine using the default Windows shell in Em= acs, 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: > > > > =C2=A0 =C2=A0 =C2=A0(setq shell-file-name "bash") > > =C2=A0 =C2=A0 =C2=A0(setenv "SHELL" shell-file-name) > > =C2=A0 =C2=A0 =C2=A0(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 > >> > >> =C2=A0 (eval-after-load "org" > >> =C2=A0 =C2=A0 '(progn > >> =C2=A0 =C2=A0 =C2=A0 =C2=A0(if (assoc "\\.pdf\\'" org-file-apps) > >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setcdr (assoc "\\.pdf\\'" or= g-file-apps) > >> "c:/progra~1/sumatrapdf/sumatrapdf.exe =C2=A0%s") > >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(add-to-list 'org-file-apps '("\\.pd= f\\'" . > >> "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) > >> =C2=A0("\\.mm\\'" . default) > >> =C2=A0("\\.x?html?\\'" . default) > >> =C2=A0("\\.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 fi= ne on > >> my Mac, so I'm not quite sure what's going wrong here. I don't do Windoze, but this looks to me like a typo in some init file, perhaps a missing semicolon? I'd grep the usual suspects (on Linux, this would be /etc/*, and all the config/init files and directories under $HOME (.profile, .bashrc, .emacs, etc etc), but I have no idea what these would be on Windoze - you might even have to search the *shudder* registry) for c:\dropbox\org. Nick