From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Add catch-up all LaTeX errors Date: Wed, 26 Mar 2014 17:12:40 +0100 Message-ID: <87vbv1szuv.fsf@gmail.com> References: <87vc14i5wp.fsf@somewhere.org> <87siq5gh6w.fsf@somewhere.org> <87zjkdt3le.fsf@gmail.com> <87mwgdgea9.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSqRQ-0006sJ-Ci for emacs-orgmode@gnu.org; Wed, 26 Mar 2014 12:12:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSqRK-00053F-AR for emacs-orgmode@gnu.org; Wed, 26 Mar 2014 12:12:36 -0400 Received: from plane.gmane.org ([80.91.229.3]:59516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSqRK-000537-3T for emacs-orgmode@gnu.org; Wed, 26 Mar 2014 12:12:30 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WSqRF-0005Fg-Nz for emacs-orgmode@gnu.org; Wed, 26 Mar 2014 17:12:25 +0100 In-Reply-To: <87mwgdgea9.fsf@somewhere.org> (Francesco Pizzolante's message of "Wed, 26 Mar 2014 16:39:26 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Francesco Pizzolante Cc: mailing-list-org-mode , Francesco Pizzolante "Francesco Pizzolante" 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. Regards, -- Nicolas Goaziou