[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Add catch-up all LaTeX errors
From: |
Sebastien Vauban |
Subject: |
Re: [O] [PATCH] Add catch-up all LaTeX errors |
Date: |
Wed, 26 Mar 2014 19:55:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) |
Nicolas Goaziou wrote:
> "Francesco Pizzolante" <address@hidden> writes:
>
>>> IOW, it cannot tell the difference between a successful export and an
>>> export failure with an already existing PDFFILE.
>>
>> This is not true as this code checks for the `errors' variable in all
>> cases. With an already existing PDFFILE, you will end up with this
>> message: 'Process completed with errors: ...'.
>
> If "file.pdf" exists before the export, you will always get "Process
> completed", even if the current export was a total failure (e.g., no
> file produced).
>
> IIUC, you're really looking after a way to know if a pdf file was really
> produced. Reporting "Process completed with errors : [unknown error]"
> will certainly not help on this you because some errors are not fatal
> (i.e., they are skipped and the pdf file is still produced).
>
>> From my point of view, the issue comes from the fact that the `errors'
>> variable is not correctly filled in with errors from the LaTeX log file.
>
> [...]
>
>> While the wikibooks reference
>> (http://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings) tells that to
>> be sure to catch *all* errors, we have to check for any line beginning
>> with '!'.
>
> I agree, but this is not sufficient, see below.
>
>> Then, in the case where the `errors' variable would effectively contain
>> any error from the log file, the code you mention above would work in
>> any case.
>>
>> That's why I started with this patch (*and it works*):
>
> It depends on what you define as "working". We're talking about two
> different things. I think a better error system should report:
>
> 1. a PDF file not produced (or updated),
> 2. a PDF file produced with errors,
> 3. a PDF file produced with warnings (maybe),
> 4. a PDF file produced cleanly.
>
> 4 already works. Your patch improves 2, but 1 is still wrong.
FWIW, I'm using this in some export code I have:
--8<---------------cut here---------------start------------->8---
(let* ((orgfile (buffer-file-name))
(base-name (file-name-base orgfile))
(htmlfile (concat base-name ".html"))
(pdffile (concat base-name ".pdf")))
...
(when (file-exists-p pdffile)
(if (file-newer-than-file-p orgfile pdffile)
(org-latex-export-to-pdf)
(message "PDF is up to date with Org file"))))
--8<---------------cut here---------------end--------------->8---
That way, we know if the PDF file has been (re-)produced: it must be
newer than the Org file...
Best regards,
Seb
--
Sebastien Vauban
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Francesco Pizzolante, 2014/03/26
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Nicolas Goaziou, 2014/03/26
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Francesco Pizzolante, 2014/03/26
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Nicolas Goaziou, 2014/03/26
- Re: [O] [PATCH] Add catch-up all LaTeX errors,
Sebastien Vauban <=
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Nicolas Goaziou, 2014/03/27
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Sebastien Vauban, 2014/03/27
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Nicolas Goaziou, 2014/03/28
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Sebastien Vauban, 2014/03/28
- Re: [O] [PATCH] Add catch-up all LaTeX errors, Francesco Pizzolante, 2014/03/27
Re: [O] [PATCH] Add catch-up all LaTeX errors, Charles Millar, 2014/03/26