From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 UJiRKwy/9GXCAgAAe85BDQ:P1 (envelope-from ) for ; Fri, 15 Mar 2024 22:35:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id UJiRKwy/9GXCAgAAe85BDQ (envelope-from ) for ; Fri, 15 Mar 2024 22:35:08 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tu-dresden.de header.s=dkim2022 header.b="vvX4/lL6"; 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=fail reason="SPF not aligned (relaxed)" header.from=tu-dresden.de (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710538508; 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=Uk4wA7tefd7eQvgd6BxdqpyJkWG1Zil9OM5JAUJIMLU=; b=FyD1U1rDQKUnZPpJE2lcI48SoUhfr9TbvoNZE4K2kGRyNtzM0gKpFofFj0+cR/jItW1/yL S/hCH+CCFPE1nO5fhYPQQuifjYTnG6QNFZJx+sC1u2sS4bKtLhrArrRkPFk4k4oMxMkz4e fa2fBRCtr8Vi7e4k8ekE09UK7RkQZch38cqxPfPhvkert/Yi10v9HQDWSXhLpkxnVHP/b3 6gv7bhDXSPYFhH9gSl1fGVbgVPU75klBpk+3PR+NUOSpRqRHJFDEFmaXpsb72gmw4WDHPQ fdxRSoMzW3Jh47qC/GsGuq2EYKuLsPngL6TrMZg+twBje6ldVoOHahkVvHCZZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710538508; a=rsa-sha256; cv=none; b=Tk/ZqLW6bezQjEq6+tgfaJe3zi+0ZdM3QgjdTqcFqeT5pKgV4y3gUMwWFj9TjuBoOufOra LUaK6Cx5AU0r1XsjtezfdppgMspsVPdliT42gAQcNWMzrWOaJF0HHualSBzSEklHzIbqri sIXZcDTcFz59W1tgYb3u8e6HptSteQsq8/7ADiHkVpQY0STnWTYIoTA1K6y2QBlTWkeHBA ubFf4whTJjQvVp5NQ/mGTYDHE0d+FeoKKHP0+OU0NhIlHQ/qzvvQbgbnlAgHku+7ibzF9y NJXR82vwnoc4/KdzZw15eWbUic/JKQETk1z3WCr5Xwbxfhd0VFBj3ZK4mosVGA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tu-dresden.de header.s=dkim2022 header.b="vvX4/lL6"; 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=fail reason="SPF not aligned (relaxed)" header.from=tu-dresden.de (policy=none) 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 2B6CC6C5A4 for ; Fri, 15 Mar 2024 22:35:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlENQ-0006Vz-7m; Fri, 15 Mar 2024 16:42:04 -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 1rlENO-0006VZ-EV for emacs-orgmode@gnu.org; Fri, 15 Mar 2024 16:42:02 -0400 Received: from mailout3.zih.tu-dresden.de ([141.30.67.74]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlENL-0005mo-MA for emacs-orgmode@gnu.org; Fri, 15 Mar 2024 16:42:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-dresden.de; s=dkim2022; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Uk4wA7tefd7eQvgd6BxdqpyJkWG1Zil9OM5JAUJIMLU=; b=vvX4/lL6i9UtX9LE2t8pRAmCA6 YoAy3elF/5vHDUvUnAGAs1gSrMzbn/MhqoK29X9n6Uqcv6w0vsvl1XFdbAp1ESZujRw4fV0EOvQsv xLoJGf3VWEfsSHEmPwn/2AJpZ8LJTLYr0P5izAUMtJnRtY+vupxPfM/6qI0BfWYRO02LCsqMRYNXB lMK8GAvL1oXardPFL9xqT3nDLm7Y1shjBRoLEg9mIWwYvRQXAJV1Db+Y03ViwExpiZngOodZE+Slw UjZNCh2J0smcvAsVmj8Cq9R8X4Tg7uZByxFWE6IAnZw3dCJMwqM+/Ml9ZXbO7UpEF/Vp8shJDOsBN 6qzakMlg==; Received: from [172.26.34.120] (helo=msx.tu-dresden.de) by mailout3.zih.tu-dresden.de with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rlENI-000VaK-6E; Fri, 15 Mar 2024 21:41:56 +0100 Received: from comonad (77.23.150.207) by msx-l320.msx.ad.zih.tu-dresden.de (172.26.34.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 15 Mar 2024 21:41:41 +0100 From: Tony Zorman To: Ihor Radchenko CC: Subject: Re: The org--math-p advice around texmathp In-Reply-To: <87frwrinu5.fsf@localhost> References: <878r2r5h1b.fsf@hyperspace> <87r0gewanm.fsf@localhost> <8734ssu6vv.fsf@hyperspace> <87frwrinu5.fsf@localhost> User-Agent: Notmuch/0.38.3, Emacs 30.0.50 Date: Fri, 15 Mar 2024 21:41:41 +0100 Message-ID: <8734srz0qi.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: MSX-L316.msx.ad.zih.tu-dresden.de (172.26.34.116) To msx-l320.msx.ad.zih.tu-dresden.de (172.26.34.120) X-TUD-Virus-Scanned: mailout3.zih.tu-dresden.de Received-SPF: pass client-ip=141.30.67.74; envelope-from=tony.zorman@tu-dresden.de; helo=mailout3.zih.tu-dresden.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, 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: -2.34 X-Spam-Score: -2.34 X-Migadu-Queue-Id: 2B6CC6C5A4 X-Migadu-Scanner: mx11.migadu.com X-TUID: EVjwaVGND0DR On Fri, Mar 15 2024 14:14, Ihor Radchenko wrote: > Tony Zorman writes: > >>> Because Org mode syntax is not LaTeX and `texmathp' assumes that we are inside >>> LaTeX buffer. So, we first check using Org syntax whether the point is >>> inside latex fragment in Org sense. >> >> But isn't what Org calls LaTeX math pretty equivalent to what would >> count as the same in a LaTeX buffer? From a quick scan of texmathp.el, I >> couldn't actually see a hard-dependency on a TeX-derived mode at all. I >> wouldn't really care about this so much, but the fact that the Org >> variant just misreports the position is a bit unfortunate, in my >> opinion. > > No, there is a difference. > > For example, something like \alpha is a valid Org mode entity. > Without `org--math-p' advice, if you do "`a" in Org buffer with > org-cdlatex-mode, you will see $\alpha$ inserted. With the advice, just > \alpha will be inserted. > > There are likely other similar edge cases. > > We would not choose to advice third-party function without a strong > reason. I believe you, but apparently I still haven't really understood the point of the advice. For example, I would think it's expected behaviour that "`a" in a string produces "\(\alpha\)" with CDLaTeX; indeed, so far I thought it was just a bug that it didn't! Likewise, that a standalone `a produces \alpha instead of \(\alpha\). Why is this not expected behaviour in Org? Tony -- Tony Zorman | https://tony-zorman.com/