From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UJLBOPQvn2PtkQAAbAwnHQ (envelope-from ) for ; Sun, 18 Dec 2022 16:21:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WKm2OPQvn2PONgEA9RJhRA (envelope-from ) for ; Sun, 18 Dec 2022 16:21:24 +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 8C81E1E5EC for ; Sun, 18 Dec 2022 16:21:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6vT3-000419-S4; Sun, 18 Dec 2022 10:20:45 -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 1p6vSm-000404-Ix for emacs-orgmode@gnu.org; Sun, 18 Dec 2022 10:20:29 -0500 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6vSk-0000tk-RZ for emacs-orgmode@gnu.org; Sun, 18 Dec 2022 10:20:28 -0500 Received: by mail-qt1-x82a.google.com with SMTP id x11so6487343qtv.13 for ; Sun, 18 Dec 2022 07:20:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:user-agent:references:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=5ZQVyKe7yPVAor+uAA+I88ytbkZVzGEIl4bzYWiXvXA=; b=H7s0njQUm0wjp48OsQIEiT1E7gqAIEDiwpaBO7pSwOXhqKr8AeJcJDOQnKmdJSk2Xs vQBdyQnLyKtWOAc1B7wUhlxP3lfALIECtqbei5wooNTg8AF3APR+/jlufRksD9MmzBTD kYLjgBZuHrLhGwrBS7hROtvPaFAaKwVbGhUrro9QrE8AeYXJkWIbtxFSYWrtbag6PcSQ SN/pP4rgWMBnDjK4VRkyv9flQoj9ZA7y5G37tsif3IReGoDR2xwfRNnsNHU0JuKPCD0T i+qisR7ZIfUXx4qLglOgevTHn6Ao7Jj++1EjOhbl6qChE0EJfWq+XYsYl+Or4XGPi/HB hUTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:user-agent:references:date :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5ZQVyKe7yPVAor+uAA+I88ytbkZVzGEIl4bzYWiXvXA=; b=P7VPBSom7mLiivVGuLruYAyx7s/IvTrDZ8dE62QsJ48XdC/+m4H/WPRXbgpYu373P7 BtvPe6oLeZt6aKGGTU/p+xFElElGayU/GvadBijgZr7ZWH/oegEOApqKk9DmSLMqr5ag 0FWuvUJO4P972XipDZhMvG/3ieWkj+pvagBn/rbR7JelhjRD1PGtYZVs8esdkuKU9ffK cC0Xfv9vmqpGtRKs/dZ3c5M6F1+5/RWOpuM4+M05cbpYP/QCgjzE+CVtVmHYBRh3XuxF hUCFIL/G0HVaqz61xIyvq2Jr91fXy7MmbzfAmG+YrRhQxBjNuW370bqwjsbHBU2S8sRG 4KNQ== X-Gm-Message-State: ANoB5pkwhKkYloquJakj73zxOmIT8eYpgf6gJspmOy1qb5wdRIcBGpks wTyniP68ZQd+YIAEuemhtgAWOByGaiE= X-Google-Smtp-Source: AA0mqf6Pge0OGViB0I7eS7JdNnS3YqRji9NnL3CoRj7d2U8PHRJBX/U1VBbEUITMW+PElkleyVHiSg== X-Received: by 2002:a05:622a:4d0b:b0:3a8:1d3c:47e1 with SMTP id fd11-20020a05622a4d0b00b003a81d3c47e1mr37136025qtb.58.1671376825008; Sun, 18 Dec 2022 07:20:25 -0800 (PST) Received: from lenovoGen4Sil (c-73-130-184-99.hsd1.pa.comcast.net. [73.130.184.99]) by smtp.gmail.com with ESMTPSA id k8-20020a05620a414800b006fc8fc061f7sm5411223qko.129.2022.12.18.07.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Dec 2022 07:20:24 -0800 (PST) From: Justin Silverman To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] issue with texmathp [9.6 (release_9.6-22-g78d283 @ /home/jds6696/.emacs.d/straight/build/org-mode/)] Date: Sun, 18 Dec 2022 10:17:25 -0500 References: <87v8mktt38.fsf@gmail.com> <878rjfsj9o.fsf@localhost> <874jtzhypq.fsf@gmail.com> <87tu1yqu3l.fsf@localhost> User-agent: mu4e 1.8.13; emacs 28.2 In-reply-to: <87tu1yqu3l.fsf@localhost> Message-ID: <87mt7khh9o.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::82a; envelope-from=jsilve24@gmail.com; helo=mail-qt1-x82a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=H7s0njQU; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671376884; a=rsa-sha256; cv=none; b=aSi/oJJNdx9hd/Irf2bvEm3Hu+SLgk5v0jm0SSFkq8jGV1oVbDDqHEaIropH3ccnu4R+ZD heJQ2do3WHTrPx4YYvt1Rk/JUz2ffiLTCywMRx0WdIYVX+2bQ+4fTpGwJlJSXJez+ahvjR tEBVOIc2CNZnhJjateaDnrsejvBiE4gkY/K3IuFQ47f5ztcF0OkYHGhGGjQNeHqUp8Nim+ nD3xbz6UrYJBR7W/6vCWGSCaD2X9ptDR2FScGpP3+h0d3iuZAQxPwsgLo99oGd0UJzzxDC TXiQmkEKNcuxO3A84HVRQnck0npLJxDUz1B5k0s7z/D1UM5y/UFtRsfmIdB79Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671376884; 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=5ZQVyKe7yPVAor+uAA+I88ytbkZVzGEIl4bzYWiXvXA=; b=Vjm4KAMFpK5IFriG/w6vuarB9vdRY6QgL8rhJTGijg57VNl3O67KNQcPAYWKVjxDLaxvXK pf8iE62Wcb7wfcICHmhRgV7Bp8j26fA9cBfDmZ8+V3QURQ7c1HY3Lqp/UXXd6qP2lSYrFd /u7v95fifXd0/IgLqDhEvlxUSNQXcDJzKJfw21Kz/36gJ5eLhoksfoCLZPbRsAma46TKbp pJXJ+imAKZv0OikiJ/3GzLcr7euq0aDFgyE504NfWRpvUAhnkz0NvSg8phf8m3+k1F+zkH 4xUaKzOSvHqCz/gQtt57CjyqGE4jt/9VKsAC4Qo9IsITZhsAh/28CtasHPcRtw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=H7s0njQU; 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-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -3.49 X-Spam-Score: -3.49 X-Migadu-Queue-Id: 8C81E1E5EC X-TUID: bjbC7Q6qm7/C --=-=-= Content-Type: text/plain Content-Disposition: inline That makes sense. Yes it breaks some of my snippets which have a condition texmathp (I don't write latex without enclosing in latex math environment in org). Its an easy enough fix for me though: (add-hook 'org-cdlatex-mode-hook (lambda () (advice-remove 'texmathp 'org--math-always-on))) does the trick. Justin Ihor Radchenko writes: > Justin Silverman writes: > >> Thanks for the quick response. I just had a chance to check it out. Unfortunately (unless I am mistaken), with the change, `texmathp' is now always returning t... which is not very helpful. > > Not exactly. I just tried to follow the docstring > > (defun org--math-always-on (orig-fun &rest args) > "Always return t in Org buffers. > This is because we want to insert math symbols without dollars even outside > the LaTeX math segments. If Org mode thinks that point is actually inside > an embedded LaTeX fragment, let `texmathp' do its job. > `\\[org-cdlatex-mode-map]'" > > So, `texmathp' will return t outside latex, inside inline latex, and > _maybe_ inside latex environments. Only inside latex environments, Org > delegates the job to `textmathp'. > > Let me know if this change broke any real workflows. --=-=-=--