Subject: bug#69681: closed (Re: bug#69681: 14.0.3; texmathp misbehaves in Org mode)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 11 Mar 2024 10:40:02 +0000

Your bug report

#69681: 14.0.3; texmathp misbehaves in Org mode

which was filed against the auctex package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
69681: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69681
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#69681: 14.0.3; texmathp misbehaves in Org mode
From: Arash Esbati <[email-masked]>
To: Tony Zorman <[email-masked]>
Cc: Tony Zorman via bug-auctex via Bug reporting list for AUCTeX <[email-masked]>, [email-masked]
Date: Mon, 11 Mar 2024 11:38:28 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Tony Zorman <[email-masked]> writes:

> On Sun, Mar 10 2024 09:00, Arash Esbati wrote:
>> I don't use Org so maybe I don't understand the above correctly, but
>> does this change meets your requirement?
>>
>> [… 16 lines elided …]
>
> indeed, this is along the lines that I was thinking about.

Great, I installed that change now (806bdb01ca).

> I should probably have rather sent a patch instead of opening a bug
> report (sorry! :)), but I wasn't exactly sure what people would want to
> do about this (if anything).

Sending a patch as a bug report is the best option, actually.  It can't
go lost and we can track it more easily.

I'm closing this report.

Best, Arash

Subject: 14.0.3; texmathp misbehaves in Org mode
From: Tony Zorman <[email-masked]>
To: [email-masked]
Date: Sat, 09 Mar 2024 20:27:59 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

this is mostly a follow-up on [#61410], in which texmathp.el was made
aware of verbatim constructs. The current check for this is

    (if (and (fboundp 'LaTeX-verbatim-p)
             (LaTeX-verbatim-p (cdr match)))
      …)

The comment above that code snippet mentions texmathp running as
standalone, but perhaps it was still intended to run in a TeX buffer.
The actual check in LaTeX-verbatim-p is just to see whether

    (nth 3 (syntax-ppss))

returns nil or not. However, Org mode seems to treat inline and display
maths as a string, which causes texmathp to misbehave. (I know that Org
has org--math-p as an around advice, but I disabled that for the
purposes of this test.)

Would it perhaps be possible to amend the above check to see whether the
current major mode is a TeX-derived one?

Thanks!
Tony

[#61410]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61410

Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, Motif Version 2.3.8, cairo version 1.18.0)
Package: 14.0.3

-- 
Tony Zorman | https://tony-zorman.com/