From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id UO3rK+k/9GWOpwAAqHPOHw:P1 (envelope-from ) for ; Fri, 15 Mar 2024 13:32:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id UO3rK+k/9GWOpwAAqHPOHw (envelope-from ) for ; Fri, 15 Mar 2024 13:32:41 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hlQiB2sT; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710505961; a=rsa-sha256; cv=none; b=sb/vn2uFYSxm8v0FoW+lwxbjb1cI8stJ4whRHDJO2dKnG3Xy6SaXdV5e8z3B4W8gBC1aO3 HDr00tqVNYkgc939/OX4eV+jfhkqAhNCIRC+SSh4imoy4PvZ+R6gy+qQIle4ZajcHsXR7L +MLtQnHik0CTWdq83bGvDP1fBwqBdj1yuF+nIqUiNs+9o4m743M3qp6DLsx3ZduLGM1ZlZ ylqMMqi+OJNCmG6gPiC4ThAPO7YCaZlupZvBEvkf96pLK/HeqDbHU1q7cQFUjAJLCWMg2Y ZL7/AEyczveA5K6bvkU4byQawo9X2T5/IX7oco7mjiUMLP1fuYcTc9aJ3pl68g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hlQiB2sT; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710505961; 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=tXxE/0wtmGIkatDD3VyBTNplxnFwx4SvleAgOXpC0lc=; b=X8mxGj9X3VwZHCmF5pv5cYEvHQX24nyOonr5VGb8urfpGovKPFX3bDmdBRs2XNtpR2dRLw EZFgJHIzZAiSiIfgJbQCBMg+2o65CyCvXY1CimExh0H3OZDzO4KXLhc8PaTSq5Hll/zHm3 9MGhyBKksXqr+jO+vg9sOSURYWMlm+xw/edzYFPp5Suc23tWUbaKbHdz13IOYx/0cdXgIj +mC2INZQtXHDdFkdEwIxOxW9OFTnZgyCFF19dS5uousn7LQYT71c7jkoWFbTNIbpJKp2DS PB7plhhpk/FalOcJTkXs44aiQdmi7TpRhUHtgrzJ3z7YCitp1JkMqWHfL4Zvng== 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 7405868F65 for ; Fri, 15 Mar 2024 13:32:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rl5XT-00071r-Lu; Fri, 15 Mar 2024 07:15:51 -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 1rl5Wq-0006rf-0l for emacs-orgmode@gnu.org; Fri, 15 Mar 2024 07:15:19 -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 1rl5Wj-0007HL-82 for emacs-orgmode@gnu.org; Fri, 15 Mar 2024 07:15:09 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AC85E240106 for ; Fri, 15 Mar 2024 12:15:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710501301; bh=vLLhKMxuq8mAW7PvP715a1qooeSBWFt0GfkZrvlFHD4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=hlQiB2sT6JK5LXZHI1Y9MhCFgEflAE6zvybA2uV4c0S6Dnm1GhCE2YC2dR0g4Jalm nfg3Zqacpm8XXCtmadfuhwIOS89lo8YGHU1/ZU5QSotE7plytbE0xKln0JTmlHmqFv Gn9ARZptNXH3TBiwlVpqY5gFC/yrEpR0Dz75ndxaW+rwU8+vW8h5C9FZn5+utzhTaw mK4nwjsZxBNCRo+48l8bQrXjfRCD4RqvbBmwm+VMJoIL7F1tYKPUEcBvELUUFX6DRs PBmHSOAr0zrOqeDxWjjahMJr5TcX/JXIYLm8znlHzuAXUQIIWiTcHFomPvgx1oWDvt aRzWW1KbHvO6Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Tx1qm66DNz6twZ; Fri, 15 Mar 2024 12:15:00 +0100 (CET) From: Ihor Radchenko To: Tony Zorman Cc: emacs-orgmode@gnu.org Subject: Re: The org--math-p advice around texmathp In-Reply-To: <8734ssu6vv.fsf@hyperspace> References: <878r2r5h1b.fsf@hyperspace> <87r0gewanm.fsf@localhost> <8734ssu6vv.fsf@hyperspace> Date: Fri, 15 Mar 2024 14:14:42 +0000 Message-ID: <87frwrinu5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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_H4=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-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.89 X-Spam-Score: -6.89 X-Migadu-Queue-Id: 7405868F65 X-TUID: NRmvurU7xHFy 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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at