From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id oJClFWVgymUOVwEAqHPOHw:P1 (envelope-from ) for ; Mon, 12 Feb 2024 19:16:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id oJClFWVgymUOVwEAqHPOHw (envelope-from ) for ; Mon, 12 Feb 2024 19:16:05 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=O+S67Xx8; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707761765; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=SveMYH40kbde5IuYGaqjr7Br6JUqWVRbjUCCteMnSEs=; b=PDH6fOISqYVOvy7WaR99kX/MElGMt1bS4vfYt85lz2DNeS/2i+jfVnY2QqU/daleD7yxeJ ZTrlpsliEQoaxtROPtNmwAA0gc5tqPfzLbukciNxzng7R3OS9sYrg84J6il2LunL7zFhKh MQXMJsxs6MkX5sQpReOxafMLgmisktwm3a5hWUyBG23rQgz5hrrf6/UVlL/V64EksyUpOB nD5fKxHqgzG0oX4nnmUzyyB9nRXITgjx09kcPBCWmQkKqpW84bXPhQwxTvR12sEbmlALiB 3qaFK4US/+5IF3HdRIamB4+nV9GcTqttCSl/euKBo2wUHLYOWDIpg/BKKwEGdA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=O+S67Xx8; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707761765; a=rsa-sha256; cv=none; b=FRw/ecaUia5xBy8bLdXzVw7e8seR0cOn0Dvfdxx/7fCriYcz7g2ABPAo4OYegAkrQ+T+w0 QCKcq9OuCEL/8NKccOMwhTSR0QszK5mkgYjBKzj+SltY/7J63/vb1wLoOjhqkLQ1CqvXyW HcebIC4n5eOX7X5s5JfgyFkOG94H7E8eGMQ80fi+U+S2ptoyhg+A0Z3lUCWqfDMLa8sbrF VPdXqkTJlWYnM7IcyJ+i9sGXiGXNc1p4O7K8/IAuMrJ/j7USpug4DUlPR+Da06Gec3iYd4 kAIKyRdoA9tpAbol3U74SiFqLMIv7xV19xaS0NhCx2vOdWXzzN90yuW0lsFqxw== 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 405ED41697 for ; Mon, 12 Feb 2024 19:16:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZapu-0006KP-8z; Mon, 12 Feb 2024 13:15:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZapp-0006Ju-Nn for emacs-orgmode@gnu.org; Mon, 12 Feb 2024 13:15:17 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZapm-0008JO-1U for emacs-orgmode@gnu.org; Mon, 12 Feb 2024 13:15:16 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 02E18240027 for ; Mon, 12 Feb 2024 19:15:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707761711; bh=KXhELPemUZEgA8RGKMEKcZ3x980i5kUlG0YKbn3Rzyk=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=O+S67Xx8EiIGeH5dvLtiVbLGvmSx7E0LHob24jpvE24hvmiCA051WgI9AQAtS1a5g UwkrwpGDiRWrl4e630i9Y8t24mH+YGR1IE20ygUEd5vDCfrhK8BeLOXg2RLj/nByjO mucX9GOla5tCKEB6GAvuJntzUE93rsO0RBjnJbPdMDA1bHL6Ip2TKcVeGnB9KIKs7+ xyclxYwbVwqhEhFgAW2r9B0IMG+WB9VSN/UuvFahvB10pzh/ZpTGUOlhMAisRU7ndD wyEy1qgNFCMiCGZvMWjBUeraDV+ehRH8rPPu5Pm3shKEF+7uC/DgHHlSeB+PxfAcyy iH2SQh1fk1NgA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TYXgL2nhsz6tm4 for ; Mon, 12 Feb 2024 19:15:09 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: Re: [patch] ox.latex.el: Add missing character warnings In-Reply-To: <87zfw5zowr.fsf@posteo.net> ("Juan Manuel =?utf-8?Q?Mac=C3=AD?= =?utf-8?Q?as=22's?= message of "Mon, 12 Feb 2024 15:24:20 +0000") References: <87zfw5zowr.fsf@posteo.net> Date: Mon, 12 Feb 2024 18:15:07 +0000 Message-ID: <87sf1xzh04.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -10.20 X-Migadu-Queue-Id: 405ED41697 X-Spam-Score: -10.20 X-Migadu-Scanner: mx11.migadu.com X-TUID: 2JeFHzQJFLAR --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sorry, the previous patch was incomplete. The attached patch is correct. Best regards, Juan Manuel=20 Juan Manuel Mac=C3=ADas writes: > Rationale for the attached patch: It seems that a common problem that > users have with exporting to LaTeX is unicode characters that cannot be > represented in pdfLaTeX or LuaLaTeX/XelaTeX. In the Unicode TeX engines > the warning is insidious, since the missing character warning is not > preceded by a 'warning' string. > > Naturally, the added Org warnings do not solve the problem, but at least > they give some clues on how to properly adjust the document. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ox-latex.el-Add-missing-character-warnings.patch >From 19fb7b81d6ce3a657c86497707f590063b27683c Mon Sep 17 00:00:00 2001 From: Juan Manuel Macias Date: Mon, 12 Feb 2024 16:10:28 +0100 Subject: [PATCH] lisp/ox-latex.el: Add missing character warnings * (org-latex-known-warnings): Two missing character warnings are added: one for LuaLaTeX/XelaTeX and another for pdfLaTeX. --- lisp/ox-latex.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index cfa2b8178..da4792c04 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1511,6 +1511,8 @@ logfiles to remove, set `org-latex-logfiles-extensions'." ("Underfull \\hbox" . "[underfull hbox]") ("Overfull \\hbox" . "[overfull hbox]") ("Citation.*?undefined" . "[undefined citation]") + ("LaTeX Error: Unicode character" . "[unicode character(s) not set up for use with pdflatex. You can run lualatex or xelatex instead]") + ("Missing character: There is no" . "[Missing character(s): please load an appropriate font with the fontspec package]") ("Undefined control sequence" . "[undefined control sequence]")) "Alist of regular expressions and associated messages for the user. The regular expressions are used to find possible warnings in the @@ -4435,7 +4437,11 @@ encountered or nil if there was none." (save-excursion (goto-char (point-max)) (when (re-search-backward "^[ \t]*This is .*?TeX.*?Version" nil t) - (if (re-search-forward "^!" nil t) 'error + (if (and + (re-search-forward "^!\\(.+\\)" nil t) + ;; This error is passed as missing character warning + (not (string-match-p "Unicode character" (match-string 1)))) + 'error (let ((case-fold-search t) (warnings "")) (dolist (warning org-latex-known-warnings) -- 2.43.1 --=-=-=--