From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: minimal testing setup for pdf export? Date: Fri, 30 Aug 2019 10:13:41 -0400 Message-ID: References: <20190827081403.03c7b07b@lt70.mpip-mainz.mpg.de> <8fc0dad7-f387-0d81-7196-259f328f7f19@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005ff8530591563ba3" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48192) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3hfA-0000ok-AB for emacs-orgmode@gnu.org; Fri, 30 Aug 2019 10:14:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3hf3-0005AH-Bm for emacs-orgmode@gnu.org; Fri, 30 Aug 2019 10:13:59 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:42059) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3hf2-0004wb-T8 for emacs-orgmode@gnu.org; Fri, 30 Aug 2019 10:13:57 -0400 Received: by mail-pg1-x52d.google.com with SMTP id p3so3608826pgb.9 for ; Fri, 30 Aug 2019 07:13:54 -0700 (PDT) In-Reply-To: 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" Cc: org-mode-email --0000000000005ff8530591563ba3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 29, 2019 at 11:27 AM John Hendy wrote: > On Tue, Aug 27, 2019 at 6:34 PM Matt Price wrote: > > > > > > > > On Tue, Aug 27, 2019 at 1:33 PM John Kitchin > wrote: > >> > >> that does suggest that pdflatex is getting called somewhere else. > >> > >> Maybe you can edebug the export function and check the value of > default-directory to see where it is getting called. > >> > >> You could also try this > >> > >> #+BEGIN_SRC emacs-lisp > >> (defun my-build (quoted-tex-file) > >> (message "Building %s. Called from %s" quoted-tex-file > default-directory)) > >> > >> (setq org-latex-pdf-process 'my-build) > >> #+END_SRC > >> > >> It won't build the pdf, but it will tell you in the messages where it > was called from. It might help figure out what is happening. > > > > > > huh. that was kinda cool... but the value of default-directory seems t= o > be correct. However, this helped a bit: > > > > #+BEGIN_SRC emacs-lisp > > (shell-command-to-string "echo $PWD") > > > > #+END_SRC > > > > > > #+RESULTS: > > : /home/matt/src/org-mode > > > > Not sure what's going on here, but this value is the same in a regular > emacs and "emacs -Q". is this normal? > > > > Did this get solved? It kind of bothers me to think it hasn't. I also > think this is a case where erring on the side of overwhelming details > would help a lot. Could you start from the beginning with the exact > process using emacs -Q, post the full output of *Messages* and *Org > PDF LaTeX Output*? Like in the above, you post the output of $PWD, but > not what the *Messages* buffer contained from John's code. Maybe they > are the same, maybe they are different, but we can't tell. > > Example: > $ cd ~/ > $ emacs -Q > > M-x org-version > Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ > /usr/share/emacs/26.2/lisp/org/) > > C-x C-f pdf-test.org > > File contents: > * foo > > > C-x C-s > C-c C-e l p > > $ ls ~/ > pdf-test.org > pdf-test.pdf > pdf-test.tex > > Alternatively, insert the code from John Kitchin: > > Wrote /home/jwhendy/pdf-text.org > org-babel-exp process emacs-lisp at position 8... > Saving file /home/jwhendy/pdf-text.tex... > Wrote /home/jwhendy/pdf-text.tex > Processing LaTeX file pdf-text.tex... > Building pdf-text.tex. Called from /home/jwhendy/ > org-compile-file: File "/home/jwhendy/pdf-text.pdf" wasn=E2=80=99t produc= ed. > See "*Org PDF LaTeX Output*" for details > > I still don't feel I understand the full nature of your working > directory, what does and doesn't get saved in that directory, etc. I'd > love to help, but am not able to replicate for you! > > Thanks, > John > > John H, Thank you so much for the detailed instructions. I had a moment this morning so I updated Emacs, rebooted my laptop, and started to follow your instructions as closely as possible... and I can no longer reproduce my problem. I feel like I should be happier than I am! I wonder if perhaps there was some kind of strange path problem caused by a software update that I didn't pay attention to. In any case, I am as always grateful for the efforts of people on this list -- I learned at least a little bit about latex export and feel that I might finally be getting a little closer to where I need to be. Meanwhile, if the issue shows up again I'll be sure to check back in. Thanks! Matt > > > > >> John > >> > >> ----------------------------------- > >> Professor John Kitchin > >> Doherty Hall A207F > >> Department of Chemical Engineering > >> Carnegie Mellon University > >> Pittsburgh, PA 15213 > >> 412-268-7803 > >> @johnkitchin > >> http://kitchingroup.cheme.cmu.edu > >> > >> > >> > >> On Tue, Aug 27, 2019 at 8:57 AM Matt Price wrote: > >>> > >>> > >>> > >>> On Tue, Aug 27, 2019 at 8:27 AM John Kitchin > wrote: > >>>> > >>>> Can you manually compile the empty.tex file from the command line? e= g > >>>> > >>>> pdflatex empty > >>>> > >>> (reposting to group) > >>> > >>> pdflatex empty > >>> > >>> Seems to work fine. Hmmm... > >>>> > >>>> John > >>>> > >>>> ----------------------------------- > >>>> Professor John Kitchin > >>>> Doherty Hall A207F > >>>> Department of Chemical Engineering > >>>> Carnegie Mellon University > >>>> Pittsburgh, PA 15213 > >>>> 412-268-7803 > >>>> @johnkitchin > >>>> http://kitchingroup.cheme.cmu.edu > >>>> > >>>> > >>>> > >>>> On Tue, Aug 27, 2019 at 7:57 AM Julius Dittmar > wrote: > >>>>> > >>>>> Am 27.08.19 um 12:34 schrieb Matt Price: > >>>>> > This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arc= h > >>>>> > Linux) (preloaded format=3Dpdflatex) > >>>>> > restricted \write18 enabled. > >>>>> > entering extended mode > >>>>> > ! I can't find file `empty.tex'. > >>>>> > >>>>> So pdflatex is called and found. Then pdflatex can't find empty.tex= . > >>>>> That looks like pdflatex is called in another directory than where > >>>>> empty.tex resides. How that could happen, no idea. > >>>>> > >>>>> Julius > >>>>> > --0000000000005ff8530591563ba3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Aug 29, 2019 at 11:27 AM John= Hendy <jw.hendy@gmail.com>= wrote:
On Tue, = Aug 27, 2019 at 6:34 PM Matt Price <moptop99@gmail.com> wrote:
>
>
>
> On Tue, Aug 27, 2019 at 1:33 PM John Kitchin <jkitchin@andrew.cmu.edu> wro= te:
>>
>> that does suggest that pdflatex is getting called somewhere else.<= br> >>
>> Maybe you can edebug the export function and check the value of de= fault-directory to see where it is getting called.
>>
>> You could also try this
>>
>> #+BEGIN_SRC emacs-lisp
>> (defun my-build (quoted-tex-file)
>>=C2=A0 =C2=A0(message "Building %s. Called from %s" quote= d-tex-file default-directory))
>>
>> (setq org-latex-pdf-process 'my-build)
>> #+END_SRC
>>
>> It won't build the pdf, but it will tell you in the messages w= here it was called from. It might help figure out what is happening.
>
>
> huh.=C2=A0 that was kinda cool... but the value of default-directory s= eems to be correct.=C2=A0 However, this helped a bit:
>
> #+BEGIN_SRC emacs-lisp
> (shell-command-to-string "echo $PWD")
>
> #+END_SRC
>
>
> #+RESULTS:
> : /home/matt/src/org-mode
>
> Not sure what's going on here, but this value is the same in a reg= ular emacs and=C2=A0 "emacs -Q".=C2=A0 is this normal?
>

Did this get solved? It kind of bothers me to think it hasn't. I also think this is a case where erring on the side of overwhelming details
would help a lot. Could you start from the beginning with the exact
process using emacs -Q, post the full output of *Messages* and *Org
PDF LaTeX Output*? Like in the above, you post the output of $PWD, but
not what the *Messages* buffer contained from John's code. Maybe they are the same, maybe they are different, but we can't tell.

Example:
$ cd ~/
$ emacs -Q

M-x org-version
Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @
/usr/share/emacs/26.2/lisp/org/)

C-x C-f pdf-test.org

File contents:
* foo
<eof>

C-x C-s
C-c C-e l p

$ ls ~/
pdf-te= st.org
pdf-test.pdf
pdf-test.tex

Alternatively, insert the code from John Kitchin:

Wrote /home/jwhendy/pdf-text.org
org-babel-exp process emacs-lisp at position 8...
Saving file /home/jwhendy/pdf-text.tex...
Wrote /home/jwhendy/pdf-text.tex
Processing LaTeX file pdf-text.tex...
Building pdf-text.tex. Called from /home/jwhendy/
org-compile-file: File "/home/jwhendy/pdf-text.pdf" wasn=E2=80=99= t produced.
See "*Org PDF LaTeX Output*" for details

I still don't feel I understand the full nature of your working
directory, what does and doesn't get saved in that directory, etc. I= 9;d
love to help, but am not able to replicate for you!

Thanks,
John

John H,
Thank you so much for the detailed = instructions. I had a moment this morning so I updated Emacs, rebooted my l= aptop, and started to follow your instructions as closely as possible... an= d I can no longer reproduce my problem. I feel like I should be happier tha= n I am! I wonder if perhaps there was some kind of strange path problem cau= sed by a software update that I didn't pay attention to.

In any case, I am as always grateful for the efforts of peo= ple on this list -- I learned at least a little bit about latex export and = feel that I might finally be getting a little closer to where I need to be.= =C2=A0

Meanwhile, if the issue shows up again= I'll be sure to check back in.

Thanks!
Matt

=C2=A0

>
>> John
>>
>> -----------------------------------
>> Professor John Kitchin
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> http://kitchingroup.cheme.cmu.edu
>>
>>
>>
>> On Tue, Aug 27, 2019 at 8:57 AM Matt Price <moptop99@gmail.com> wrote:
>>>
>>>
>>>
>>> On Tue, Aug 27, 2019 at 8:27 AM John Kitchin <jkitchin@andrew.cmu.edu= > wrote:
>>>>
>>>> Can you manually compile the empty.tex file from the comma= nd line? eg
>>>>
>>>> pdflatex empty
>>>>
>>> (reposting to group)
>>>
>>> pdflatex empty
>>>
>>> Seems to work fine. Hmmm...
>>>>
>>>> John
>>>>
>>>> -----------------------------------
>>>> Professor John Kitchin
>>>> Doherty Hall A207F
>>>> Department of Chemical Engineering
>>>> Carnegie Mellon University
>>>> Pittsburgh, PA 15213
>>>> 412-268-7803
>>>> @johnkitchin
>>>> http://kitchingroup.cheme.cmu.edu
>>>>
>>>>
>>>>
>>>> On Tue, Aug 27, 2019 at 7:57 AM Julius Dittmar <Julius.Dittmar@gmx.de> wrote:
>>>>>
>>>>> Am 27.08.19 um 12:34 schrieb Matt Price:
>>>>> > This is pdfTeX, Version 3.14159265-2.6-1.40.20 (T= eX Live 2019/Arch
>>>>> > Linux) (preloaded format=3Dpdflatex)
>>>>> >=C2=A0 restricted \write18 enabled.
>>>>> > entering extended mode
>>>>> > ! I can't find file `empty.tex'.
>>>>>
>>>>> So pdflatex is called and found. Then pdflatex can'= ;t find empty.tex.
>>>>> That looks like pdflatex is called in another director= y than where
>>>>> empty.tex resides. How that could happen, no idea.
>>>>>
>>>>> Julius
>>>>>
--0000000000005ff8530591563ba3--