From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Export to pdf when path name has ~ Date: Thu, 26 May 2016 21:52:48 +0200 Message-ID: <8760u0d2b3.fsf@saiph.selenimh> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b61L0-0002Wb-V7 for emacs-orgmode@gnu.org; Thu, 26 May 2016 15:53:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b61Kz-0003el-UD for emacs-orgmode@gnu.org; Thu, 26 May 2016 15:52:58 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:54365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b61Kz-0003eV-NL for emacs-orgmode@gnu.org; Thu, 26 May 2016 15:52:57 -0400 In-Reply-To: (Stig Brautaset's message of "Tue, 24 May 2016 17:59:27 +0100") 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" To: Stig Brautaset Cc: emacs-orgmode@gnu.org, Rasmus Hello, Stig Brautaset writes: > And, indeed, running pdflatex on that file works perfectly fine from the shell: > > #+BEGIN_EXAMPLE > 17:37:57 /tmp> /Library/TeX/texbin/pdflatex ~/Org/TODO.tex > This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex) > restricted \write18 enabled. > entering extended mode > (/Users/stig/Org/TODO.tex > LaTeX2e <2015/01/01> > > [...] > > Output written on TODO.pdf (10 pages, 206446 bytes). > Transcript written on TODO.log. > #+END_EXAMPLE > > > ... except if you use the full path (rather than the symlink), in which case > pdflatex chockes on the filename: > > #+begin_example > 17:27:25 /tmp> pdflatex "/Users/stig/Library/Mobile Documents/com~apple~CloudDocs/Org/TODO.tex" > This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex) > restricted \write18 enabled. > entering extended mode > ! I can't find file `"/Users/stig/Library/Mobile Documents/com"'. > > \protect > <*> "/Users/stig/Library/Mobile Documents/com~ > apple~CloudDocs/Org/TODO.tex" Indeed. It seems pdflatex doesn't like the ~ sign excepted at the beginning of the filename. It doesn't seem to be Org related though. In any case, I'm wondering if we really need to send the full canonical path (as returned by `file-truename') of the tex file to the pdflatex process. For example, we could set `default-directory' to the directory of the tex file and provide only relative filename with %f. If needed, %F may be used for the full path. I don't think it would introduce incompatibilities. WDYT? Regards, -- Nicolas Goaziou