From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Export to pdf when path name has ~ Date: Fri, 27 May 2016 09:04:44 +0200 Message-ID: <87r3cougkz.fsf@gmx.us> References: <8760u0d2b3.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6BpP-0008CB-Cc for emacs-orgmode@gnu.org; Fri, 27 May 2016 03:05:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6BpK-0001si-Am for emacs-orgmode@gnu.org; Fri, 27 May 2016 03:05:03 -0400 Received: from plane.gmane.org ([80.91.229.3]:47904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6BpJ-0001sc-LL for emacs-orgmode@gnu.org; Fri, 27 May 2016 03:04:58 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b6BpH-0002lL-IQ for emacs-orgmode@gnu.org; Fri, 27 May 2016 09:04:55 +0200 Received: from ip-178-203-233-130.hsi10.unitymediagroup.de ([178.203.233.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2016 09:04:55 +0200 Received: from rasmus by ip-178-203-233-130.hsi10.unitymediagroup.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2016 09:04:55 +0200 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > 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? It would make sense to run the process starting from the path of the compiling org document (in Stig’s example from the Org folder). AFAIK this is what AUCTeX does (modulus the value of TeX-master) and I think the build in TeX compiler as well. I also agree that the best way would be to change the meaning of %f. Rasmus -- I hear there's rumors on the, uh, Internets. . .