From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id jnHHISP2GmSbxAAASxT56A (envelope-from ) for ; Wed, 22 Mar 2023 13:35:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GPrmHyP2GmRmLQAAG6o9tA (envelope-from ) for ; Wed, 22 Mar 2023 13:35:47 +0100 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 3463B16926 for ; Wed, 22 Mar 2023 13:35:47 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="EdCv8/E2"; 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=1679488547; 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=HWDgNCuWYdueJca8US6VGEpC9aY4/RC/eWPj+EbVR3A=; b=aOxCUDgFpitjMolnNauXqMm+z6bpMWhxzCgEZCnavqX/NKToaye/yX0bJe981NmyoRegTi cOk7Ybbi/FxCgwP37V6tpgbMY/jzRqNbA6tdxVEpnRciuYlE8QelB9PTlZgfiy5du5q2d3 bnlk76PJYtg1UUDcCqqB7TT6VgAU4ogeXV6FnhapCgxfekXH3Yr65wfuWCyka+jcQ0xLvk G/YuUMaWfTsaHJIfdJDX53WuujHzqfaWezuLve7WeIBCsu6XW4olwsqbjZPt7ySkUXDFHJ dQtqpZ7cYIR8CAJx2jpoY+6vynyFN+ZBhiAksH0vAfi1/N5+/zYJE6981lCENQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679488547; a=rsa-sha256; cv=none; b=WDo/noaZAfUrVqKlfEyE5LtfJU89m5qCJnz6KdB2s/mfVgrG3cQu8vCknZj1VfIJMpVgz+ PueIJUVAea8SX6wvVSOzLOJUeSJ0TVVKYZT9i0/ArqduRBNT6XQlV/UHYgd37/9zwrqDVP +PSrVvulp4dHh33HPlpW2hD1VFlseTY3qdkt4pn+xP2dVldMxtRqmkQ1Lfa9B4Z9uHGmn6 7rmXg+VUG5IeKSl41kEHmPbrpTmHqu8dm32rtFlaMGRBjKKRonrZjtQKb0uXm8VSWGvhjg zLGv6o/d19n68IRYPmPAiEa1lD08nv+WvQjzyL4xYwDhBCYLXaUvINsLIqF1ow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="EdCv8/E2"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pexg1-0005Kt-3x; Wed, 22 Mar 2023 08:34:49 -0400 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 1pexfz-0005Kl-R6 for emacs-orgmode@gnu.org; Wed, 22 Mar 2023 08:34:47 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pexfx-0001EP-NU for emacs-orgmode@gnu.org; Wed, 22 Mar 2023 08:34:47 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E06182407F2 for ; Wed, 22 Mar 2023 13:34:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1679488483; bh=QBqLTfDz9sCr40xo77Jv6TVFHc6l8u7NaJSHpaXsO5U=; h=From:To:Cc:Subject:Date:From; b=EdCv8/E21+h+SwGiOM9uRnDBTGNVb3430aixD/tY1FTAqtUlgW9K4eMZkAofVfqlN eJjfM/Z83kx6OeK/PMdiOJ4pEtCCEMTGy9cuc41sIEx+p+u8D5NlOJ4hsOKRbodhCi 5csfxNe4G0lvXp5a6Uvo8dIYixYphqHmTypqgfRcEsa2wHh1Qg0ivWspBGLX055tHg hYTMJsLmjHdMfq/XqoC3UFLWjZ5V+Xi7cI70ThUjqfXylg1LaMZp/cwkqZv3fFXPo1 fDpuFFXDMCINtMlSz6q3/OB/BNChjG3Ga3F6IEpWs7f0Ih+2JZI73hglwyfI24NPQc eeUL/ozYkHE4A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PhSbR01DLz9rxL; Wed, 22 Mar 2023 13:34:42 +0100 (CET) From: Ihor Radchenko To: Yuchen Guo Cc: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= , iemacs@gmail.com, org-mode mailing list Subject: Re: Hyphen after LaTeX fragments In-Reply-To: <86ileukojk.fsf@lan> References: <8635684r94.fsf@qinghe.mail-host-address-is-not-set> <86ileukojk.fsf@lan> Date: Wed, 22 Mar 2023 12:36:45 +0000 Message-ID: <87bkklnesi.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: X-Migadu-Scanner: scn0.migadu.com List-Post: X-Migadu-Queue-Id: 3463B16926 X-Spam-Score: -6.57 X-Migadu-Spam-Score: -6.57 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-Country: US X-Migadu-Flow: FLOW_IN X-TUID: C6nILoonp0YL --=-=-= Content-Type: text/plain Yuchen Guo writes: > If it is deprecated in Org mode, maybe we can print a warning message in > echo area? Not in echo area, but we can add a linter. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-lint-Add-checker-for-.-LaTeX-fragments.patch >From 129e3aa03229fd2e5dd6ea9bf627e4d95a061744 Mon Sep 17 00:00:00 2001 Message-Id: <129e3aa03229fd2e5dd6ea9bf627e4d95a061744.1679488572.git.yantar92@posteo.net> From: Ihor Radchenko Date: Wed, 22 Mar 2023 13:35:22 +0100 Subject: [PATCH] org-lint: Add checker for $...$ LaTeX fragments * lisp/org-lint.el (org-lint-LaTeX-$): New checker warning about semi-obsolete $...$ LaTeX fragment syntax. Link: https://orgmode.org/list/86ileukojk.fsf@lan --- lisp/org-lint.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lisp/org-lint.el b/lisp/org-lint.el index 0e2967b6c..8d6d22be7 100644 --- a/lisp/org-lint.el +++ b/lisp/org-lint.el @@ -1227,6 +1227,14 @@ (defun org-lint-incomplete-citation (ast) (org-element-property :parent text)) "Possibly incomplete citation markup"))))) +(defun org-lint-LaTeX-$ (ast) + "Report semi-obsolete $...$ LaTeX fragments." + (org-element-map ast 'latex-fragment + (lambda (fragment) + (and (string-match-p "^[$][^$]" (org-element-property :value fragment)) + (list (org-element-property :begin fragment) + "Potentially confusing LaTeX fragment format. Prefer using more reliable \\(...\\)"))))) + ;;; Checkers declaration @@ -1450,6 +1458,11 @@ (org-lint-add-checker 'incomplete-citation #'org-lint-incomplete-citation :categories '(cite) :trust 'low) +(org-lint-add-checker 'LaTeX-$ + "Report potentially confusing $...$ LaTeX markup." + #'org-lint-LaTeX-$ + :categories '(markup)) + (provide 'org-lint) ;; Local variables: -- 2.39.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--