From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gO8ZK6cFj2JyXgAAbAwnHQ (envelope-from ) for ; Thu, 26 May 2022 06:44:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2AUMKqcFj2IuPAEAG6o9tA (envelope-from ) for ; Thu, 26 May 2022 06:44:23 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4CA2C1136D for ; Thu, 26 May 2022 06:44:23 +0200 (CEST) Received: from localhost ([::1]:39092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu5ME-0007By-Gj for larch@yhetil.org; Thu, 26 May 2022 00:44:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu5LN-0007Ba-KH for emacs-orgmode@gnu.org; Thu, 26 May 2022 00:43:29 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:39693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nu5LL-0003qH-RS for emacs-orgmode@gnu.org; Thu, 26 May 2022 00:43:29 -0400 Received: by mail-pl1-x62c.google.com with SMTP id a13so510064plh.6 for ; Wed, 25 May 2022 21:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=WKEIfBlD2kpMEs9RLLkR9gyOJVAc6k/lsKRE2kH8eM0=; b=Qybi7mN5GnRCO3dTKlhnZ1E1uKCFNB9b9OhfjYttBcohhguFD+7C1eNShNba0NiN+p 4yCzjBkuMrgsdiNMUMGOkUQ6klDk7JpzIaVGk8hWKhO5V+vUuhvGTlIeCaSbHWgSaBiE Q8Wi2PUjyGFNGv8D0WR4J0LSgI7bCEGwvmU6sviyU1mk6kGt5OXzrpc/WOwvWSgMA83D GAgHWpiArkBAHMAUgnGfFXsU/8w5TaBXJdhWnXmRXJz/GxBv2FZVU9RK2NAVrWGodr3C gt+jyWRK6qQBV+KUcOCJV0qmMSyudccsR1MfM3/B/7wIFdsGHSILbVCvFupnfgP8Tx/L pv/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=WKEIfBlD2kpMEs9RLLkR9gyOJVAc6k/lsKRE2kH8eM0=; b=AnioP4609tzkFkDaNaBsat8w1vBstfS3PMD69NsVRcq+wiYHwz75p6bGck4/UlfOos GDLN8la4Q8C4CFUi8SkczWKkN26ooJQRqtmOx4HusEZX0A6dLtwSkSI6y3521iyV40nP yeOmUqMEvu76M4jbczy9ZfqAAQMwqPhaue9nMa1TjpJ1wdmLvF/lPOTsoofy6aYyMblH IWjTFnf2s++ikhz0F2dxDJN3AyvtIKosTbS9y+5mo9t7hBP0L0b0dkyqh5/IlqJzV04t lmznyZZx+Fg2HhoEUNC8i2mIznbNCzYnVJCUhnCqPAW10IwCani1CegLwujH9Mj0hXIT Axyw== X-Gm-Message-State: AOAM53201vqsR9gGqFjhOk1K10+SedKE4/ozVxXfAZ6I5U5JFq+ROTOP DR1/X+IQgqsN9G325NvswWg= X-Google-Smtp-Source: ABdhPJxlZDeYZhsEKCYvLLcSOtjlxV5oXKk0rcRjWDL90gR7g7EfUvrWKwNoZs2DMCiL06+E9gC93w== X-Received: by 2002:a17:90a:17e8:b0:1df:4e82:a7aa with SMTP id q95-20020a17090a17e800b001df4e82a7aamr666710pja.4.1653540206283; Wed, 25 May 2022 21:43:26 -0700 (PDT) Received: from localhost ([74.222.20.18]) by smtp.gmail.com with ESMTPSA id v5-20020a62a505000000b005183434ec86sm272704pfm.135.2022.05.25.21.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 21:43:25 -0700 (PDT) From: Ihor Radchenko To: Daniel Fleischer Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Avoid ignoring LaTeX export output errors when org-latex-pdf-process is a list In-Reply-To: References: <87k0aep6mx.fsf@localhost> Date: Thu, 26 May 2022 12:44:06 +0800 Message-ID: <87o7zk6gyx.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653540263; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WKEIfBlD2kpMEs9RLLkR9gyOJVAc6k/lsKRE2kH8eM0=; b=ELhwniJ9IvySC1pfYEy1XNhz1xvGCI+uxHKiEyewIeOaVb3oZ8xZMmkbTr7+ekfJaknjVU crkQFjcQ7HNnXVIPp/qceSO5eVevP3mT7JmTtBd1t2f6LldxwyFQRbScmWxyMiEp79/Cmb caOZwAO1UW1VxA92wQmWxjE1Uj5omG8SkZIIQ2BEHRopBxE0MXoI/8PFc/Dwx9S/Mfe7Jx QFbHsIqI6xP5e2RlDdkUEGostIdLWD+cynEJvRfinvIpFLhfnnYK8qHk6Ymu9U7bNXXrKV MMtZnztFd+8qvJhE3rSjT2PYgZdPirXK2vfBr1bexvv9i7i0anR3SjxVXFHPDg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653540263; a=rsa-sha256; cv=none; b=blW+XeI9VpAbPWXVQ2U+gvqlyH5BzEA+kHxzE29AIMoaSCSCj5bIqaSjTVK8zKoiGuYBWb Yg+sN+sPcQXz+ipR/Xb24/tLINZJuoaQmIAGInhwPC4HcBvFq9jqCplv+VzR0OYr96jCio IEiftbu2pcH24ZepJ1AP9fQ4pCIUSxAmf3kbF/MXEbMcWTBUGeiRJmljKO5tPcVZ9wa07v lSjFd84T09p1ED6LGEbZLlDV63HTsxrqofRkhJ2Ly+1IMMNfJDELX9wB2FQRvxymGQ5tlg XOnY6ORAw6zA3z5JMPLJb5j31I/o+vKu0tpVmA+CW+NpWXM1vdhMk32/vqIDqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Qybi7mN5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Qybi7mN5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4CA2C1136D X-Spam-Score: -3.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: mpTIcqnPIMsC Daniel Fleischer writes: > Ihor Radchenko [2022-05-22 Sun 11:51] wrote: > >> The attached patch is fixing a rather annoying problem when >> org-latex-pdf-process is set to a list. Currently, only output of the >> last command in the list is preserved in *Org PDF LaTeX output* buffer, >> which sometimes prevents ox-latex from detecting compilation warnings. > >> ox-latex relies on *Org PDF LaTeX output* to contain the output of latex >> compiler. However, unless the last command in the org-latex-pdf-process >> is something like pdflatex, the compiler errors are erased by >> `shell-command' called by `org-compile-file'. > > Looks good. So the log buffer is going to be a concatenation of all the > logs. Will ox-latex parse the longer log in a meaningful way? ox-latex parses warnings according to org-latex--collect-warnings and org-latex-known-warnings. It simply uses regular expressions. By default, org-latex-pdf-process is using latexmk and will have no issues. In theory, if the user adds some funny command outputting warning/error-like string to org-latex-pdf-process, there might be a confusing. But I see it as unlikely. The current behavior of keeping only the last command output is worse, IMHO. > Is it just for the user to find issues by herself after a failed > compilation? It is orthogonal to the patch, but yes. org-latex-compile does the following if it finds warnings/errors: (let ((warnings (org-latex--collect-warnings log-buf))) (message (concat "PDF file produced" (cond ((eq warnings 'error) " with errors.") (warnings (concat " with warnings: " warnings)) (t "."))))) You just get a message indicating that there are some errors/warnings (or even no message in some cases, when the proposed patch is not applied). Best, Ihor