From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Re: Publishing using the new exporter Date: Wed, 10 Oct 2012 21:15:33 +0200 Message-ID: <5075C955.3010408@mpip-mainz.mpg.de> References: <50602E92.3080705@mpip-mainz.mpg.de> <87y5jzafab.fsf@gmail.com> <50609817.705@mpip-mainz.mpg.de> <87a9vz7stn.fsf@gmail.com> <507045B7.9010101@mpip-mainz.mpg.de> <877gr3cwzi.fsf@gmail.com> <507181CD.1050005@mpip-mainz.mpg.de> <87391prumz.fsf@gmail.com> <5072F9BD.7020505@mpip-mainz.mpg.de> <87y5jgrjrt.fsf@gmail.com> <50730F2B.5030902@mpip-mainz.mpg.de> <5073F753.4010209@mpip-mainz.mpg.de> <87sj9m461v.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM1ku-0005oy-Fk for emacs-orgmode@gnu.org; Wed, 10 Oct 2012 15:15:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TM1ks-00040u-Nk for emacs-orgmode@gnu.org; Wed, 10 Oct 2012 15:15:44 -0400 Received: from gate1.mpip-mainz.mpg.de ([194.95.63.248]:28704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM1ks-00040b-CF for emacs-orgmode@gnu.org; Wed, 10 Oct 2012 15:15:42 -0400 In-Reply-To: <87sj9m461v.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org, Eric Schulte Hello, On 10/10/2012 06:59 PM, Nicolas Goaziou wrote: > Hello, > > Robert Klein writes: > >> I got i working with this patch: >> >> diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el >> index 80b8ddb..2d4ad35 100644 >> --- a/contrib/lisp/org-e-latex.el >> +++ b/contrib/lisp/org-e-latex.el >> @@ -2670,6 +2670,7 @@ Return PDF file name or an error if it couldn't >> be produced." >> (let* ((wconfig (current-window-configuration)) >> (texfile (file-truename texfile)) >> (base (file-name-sans-extension texfile)) >> + (default-directory base) >> errors) >> (message (format "Processing LaTeX file %s ..." texfile)) >> (unwind-protect >> >> >> After reading a bit in the emacs lisp reference manual I knew the >> issue is something with default-directory. Then I examined the code >> of the old exporter and looked for a "similar" place in the new >> exporter, happily finding a 'let*( ...'. Not sure, this is Ok or >> even the right place. Just happy at the moment it does work. >> >> Both cases (buffer visited in base-directory and not in >> base-directory) work with the change. > > I still cannot reproduce the problem, even with your recipe. Could you > double-check it? > > Also, there's nothing in `org-e-latex-compile' that should depend on > default-directory anyway. > > > Regards, > I did some more tests and it seems the issue happens when Emacs is just started and nothing (much) done in it. Test description below. Best regards Robert * Setting up emacs and org-mode ** cleaning up emacs configuration #+begin_src sh # clean out .emacs.d rm -rf ~/.emacs.d # re-create and copy plantuml.jar mkdir ~/.emacs.d cp ~roklein/.emacs.d/plantuml.jar ~/.emacs.d/ #+end_src ** fetching org-mode git master #+begin_src sh mkdir $HOME/elisp && cd $HOME/elisp git clone git://orgmode.org/org-mode.git #+end_src ** local org configuration (local.mk) #+begin_example :file ~/org-mode/local.mk # Installation prefix prefix = /home/roklein/.emacs.d # Where local lisp files go. lispdir = $(prefix)/org-mode/lisp # Where local data files go. datadir = $(prefix)/org-mode/etc # Where info files go. infodir = $(prefix)/org-mode/info # include files from contrib/lisp ORG_ADD_CONTRIB = org-e-* org-md org-export org-contacts #+end_example ** compile and install org-mode #+begin_src sh cd org-mode vi local.mk # see above make make install #+end_src This results in "Org-mode version 7.9.2 (release_7.9.2-432-g545166 @ /home/emacs/.emacs.d/org-mode/lisp/)" from emacs M-x org-version. * preparing the tests Here I create ~/.emacs and ~/Documents/org/example/index.org as in the former mail. Further I create an image ~/example.png, simply containing the text "FAIL!". Touch ~/Documents/org/other.org (not ...txt) * Test preparation for each test ** cleaning up - closing emacs if open - executing the following commands #+begin_src sh cd rm -rf public_html rm Documents/org/example/index.tex* rm Documents/org/example/index.pdf rm Documents/org/example/example.png rm .org-timestamps/* #+end_src * Test 1 - Do test preparation as above - Start emacs from the command line. - M-x org-e-publish example - Have to type "yes" twice for executing plantuml. * Result of Test 1 - html export is Ok - pdf export has the "FAIL!" image I created in the home directory. * Test 2 - Do test preparation as above - Start emacs from the command line. - C-x C-f ~/Documents/org/example/index.org - M-x org-e-publish example - Have to type "yes" twice for executing plantuml. * Result of Test 2 - html export is Ok - pdf export is Ok * Test 3 - Do test preparation as above - Start emacs from the command line. - C-x C-f ~/Documents/org/example/index.org - C-x b *Gnu Emacs* - M-x org-e-publish example - Have to type "yes" twice for executing plantuml. * Result of Test 3 - html export is Ok - pdf export is Ok * Test 4 - Do test preparation as above - Start emacs from the command line. - C-x C-f ~/Documents/org/example/index.org - C-x C-f ~/Documents/org/other.txt - M-x org-e-publish example - Have to type "yes" twice for executing plantuml. * Result of Test 4 - html export is Ok - pdf export is Ok * Test 5 - Do test preparation as above - Start emacs from the command line. - C-x C-f ~/Documents/org/example/index.org - C-x C-f ~/Documents/org/other.txt - C-x C-s - M-x org-e-publish example - Have to type "yes" twice for executing plantuml. * Result of Test 5 - html export is Ok - pdf export is Ok * Test 6 - Change ~/.emacs to autoload a file ~/Documents/org/other.org - Start emacs from the command line. - (It has *Gnu Emacs* as front buffer) - M-x org-e-publish example - Have to type "yes" twice for executing plantuml. * Result of Test 6 - html export is Ok - pdf export has the "FAIL!" image I created in the home directory. * Test 7 - .emacs as in Test 6 - Start emacs from the command line. - C-x C-f ~/Documents/org/example/index.org - M-x org-e-publish example - Have to type "yes" twice for executing plantuml. * Result of Test 7 - html export is Ok - pdf export is Ok * Test 8 - Change ~/.emacs to autoload a file ~/Documents/org/other.org - Start emacs from the command line. - C-x C-f ~/Documents/org/example/index.org - change buffer to other.org: C-f b other.org - M-x org-e-publish example - Have to type "yes" twice for executing plantuml. * Result of Test 8 - html export is Ok - pdf export is Ok * Conclusion In these tests the issue only happens, when I start Emacs and publish without doing anything(much?) else before publishing. Perhaps there is an issue with the setup and some stuff doesn't get initialized.