Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-20 Thread Ihor Radchenko
Vangelis Evangelou writes: > Scenario 2: > >1. Load auctex and set TeX-parse-self to t >2. Create a scratch buffer and type in "\documentclass{amsart}". Note >that this is different from Scenario 1. The difference is that amsart uses >the amstex package. Org export to latex also u

Re: [BUG] Org mode fails when export to latex buffer with auctex when TeX-parse-self is t [9.7.11 (release_9.7.11 @ /usr/local/share/emacs/30.1/lisp/org/)]

2025-07-20 Thread Ihor Radchenko
Vangelis Evangelou writes: > I started with emacs -q. Then in the scratch buffer, I evaluated the > following code > > (use-package reftex-auc) > (use-package tex > :load-path "site-lisp/auctex-14.0.9" > :custom > (TeX-parse-self t)) > > Then, I created an org buffer which I exported to lat

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-19 Thread Vangelis Evangelou
Hi Pedro. I tried what you said, but I couldn't get it to work. I switched to the feature/all-tex-fonts branch for org and compiled org, but I still got the same error. Perhaps I didn't do this correctly. On Sat, 19 Jul 2025 at 11:34, Pedro Andres Aranda Gutierrez < paag...@gmail.com> wrote: > A

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-19 Thread Vangelis Evangelou
Hi Pedro. > I've come up with a solution, which is to customise the mode the export buffer is opened with. You could set it to plain latex-mode instead of LaTeX-mode. This will disable auctex functionality. Would that be an issue for you? I don't see that being a problem. > If you are interested

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-17 Thread Pedro Andres Aranda Gutierrez
Hi Vangelis, I've come up with a solution, which is to customise the mode the export buffer is opened with. You could set it to plain latex-mode instead of LaTeX-mode. This will disable auctex functionality. Would that be an issue for you? I don't see any specific advantage in having the auctex fu

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-17 Thread Pedro Andres Aranda Gutierrez
Hi,I’m quite busy with the export as such. It’s an interesting challenge and I currently would like to document it along a variation of your workaround and then maybe discuss whether we want LaTeX-mode or plain latex-mode regardless Of AucTeX in the list. There may be some benefit of using LaTeX mo

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-17 Thread Vangelis Evangelou
Hi Perdo. Did you manage to get a solution to this? Best, Vangelis On Tue, 1 Jul 2025 at 18:05, Vangelis Evangelou wrote: > Hi Pedro. > > You haven't loaded reftex though. What if you add (use-package reftex) in > your configuration? > > On Tue, 1 Jul 2025 at 16:36, Pedro Andres Aranda Gutierr

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-01 Thread Vangelis Evangelou
Hi Pedro. You haven't loaded reftex though. What if you add (use-package reftex) in your configuration? On Tue, 1 Jul 2025 at 16:36, Pedro Andres Aranda Gutierrez < paag...@gmail.com> wrote: > Just to close this. I'm not able to completely reproduce the > environment. Attach is a test report. >

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-01 Thread Pedro Andres Aranda Gutierrez
OK, forget it, I'll try myself to see if I can reproduce... Thanks for your help and patience, /PA On Tue, 1 Jul 2025 at 11:09, Vangelis Evangelou wrote: > > Hi Pedro. > > I tried what you said, but for some reason the local variables text doesn't > get printed. Could it be because the error oc

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-01 Thread Vangelis Evangelou
Hi Pedro. I tried what you said, but for some reason the local variables text doesn't get printed. Could it be because the error occurs before the export filter? In any case, I don't think this is a path towards a solution because local variables are set when the file is visited (opened). Here, t

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-01 Thread Pedro Andres Aranda Gutierrez
Hmmm... This is a very trick case indeed. Apart from discerning if we want to blame it or not, what I would also like to take profit is from this for the future. If we encounter other cases and appending local variables to the export buffer solves out headache, we catch several flies with one stro

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-01 Thread Pedro Andres Aranda Gutierrez
Sorry, fast typing while chasing an Internet purchase is definitely not part of my abilities :-) On Tue, 1 Jul 2025 at 10:41, Pedro Andres Aranda Gutierrez wrote: > > Hmmm... > > This is a very trick case indeed. Apart from discerning if we want to > blame it or not, what I would also like to tak

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-07-01 Thread Vangelis Evangelou
Hi Ichor. I did you what you said. There are two scenarios Scenario 1: 1. Load auctex and set TeX-parse-self to t 2. Create a scratch buffer and type in "\documentclass{article}" 3. Load LaTeX-mode with M-x LaTeX-mode Scenario 2: 1. Load auctex and set TeX-parse-self to t 2. Crea

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-30 Thread Ihor Radchenko
Vangelis E writes: > Does this mean that you will implement my suggestion in my previous email? > >> On 30 Jun 2025, at 17:42, Pedro Andres Aranda Gutierrez >> wrote: >> >> Thanks for trying! I'm just trying to find a flexible solution for >> future requirements like this... >> /PA >> ... Be

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-30 Thread Vangelis E
Does this mean that you will implement my suggestion in my previous email? > On 30 Jun 2025, at 17:42, Pedro Andres Aranda Gutierrez > wrote: > > Thanks for trying! I'm just trying to find a flexible solution for > future requirements like this... > /PA > >> On Mon, 30 Jun 2025 at 09:54, Vang

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-30 Thread Pedro Andres Aranda Gutierrez
Thanks for trying! I'm just trying to find a flexible solution for future requirements like this... /PA On Mon, 30 Jun 2025 at 09:54, Vangelis Evangelou wrote: > > Hi Perdo. > > No, that doesn't fix it. I can see that add-texparse-filter is added to the > org-export-filter-final-output-functions

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-30 Thread Vangelis Evangelou
Hi Perdo. No, that doesn't fix it. I can see that add-texparse-filter is added to the org-export-filter-final-output-functions, but the text doesn't appear in the exported *Org LATEX Export* buffer. On Mon, 30 Jun 2025 at 07:49, Pedro Andres Aranda Gutierrez < paag...@gmail.com> wrote: > PS: You

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-29 Thread Pedro Andres Aranda Gutierrez
PS: You can also add the code in your Emacs Lisp test code Sorry for the convoluted suggestion... /PA On Sun, 29 Jun 2025 at 19:16, Pedro Andres Aranda Gutierrez wrote: > > Last try: > put the following after the header and before the text in your buffer, > evaluate the block (C-c C-c) and then

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-29 Thread Pedro Andres Aranda Gutierrez
Last try: put the following after the header and before the text in your buffer, evaluate the block (C-c C-c) and then export to a buffer C-c C-e l L --- cut here #+BEGIN_SRC emacs-lisp :exports none :results none :eval export (defun add-texparse-filter (output backend info) "Disable TeX-parse-s

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-29 Thread Vangelis Evangelou
Hi Pedro. > This looks more like a side effect of using the auctex package I see. That makes sense. However, the function org-latex-export-as-latex calls LaTeX-mode, which is an alias for ‘latex-mode’ in ‘tex-mode.el’ that comes with emacs. However, auctex defines its own LaTeX-mode. I think org-

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-28 Thread Pedro Andres Aranda Gutierrez
Hi Thx a lot for the explanation... answers inline On Sat, 28 Jun 2025 at 18:04, Vangelis Evangelou wrote: > > Hi Pedro. > > > I don't think this is a bug. It's more of a side effect ... > > I'm not sure what you are referring to. I assume that since the program does > not produce the intended o

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-28 Thread Vangelis Evangelou
Hi Pedro. > I don't think this is a bug. It's more of a side effect ... I'm not sure what you are referring to. I assume that since the program does not produce the intended output, then it's a bug. > I'd like to understand what this reftex-TeX-master-file variable means and what the effect of T

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-27 Thread Pedro Andres Aranda Gutierrez
Hi Vangelis... Me and thinking?.. rather difficult... Now seriously... I don't think this is a bug. It's more of a side effect and I'd like to understand what this reftex-TeX-master-file variable means and what the effect of TeX-parse-self is. A workaround may be what you propose or to (setq-l

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-27 Thread Vangelis Evangelou
Hi Pedro. The export works as expected *without* loading auctex. It also works as expected *with* loading auctex, but with TeX-parse-self to nil. Perhaps the best solution is to amend org-latex-export-as-latex to set TeX-parse-self to nil before calling LaTeX-mode, e.g., with (let ((TeX-parse-self

Re: [BUG] Org mode fails when export to latex buffer with auctex

2025-06-27 Thread Pedro Andres Aranda Gutierrez
Vangelis writes: > Hello. > > I started with emacs -q. Then in the scratch buffer, I evaluated the > following code > > (use-package reftex-auc) > (use-package tex > :load-path "site-lisp/auctex-14.0.9" > :custom > (TeX-parse-self t)) > > Then, I created an org buffer which I exported to lat

[BUG] Org mode fails when export to latex buffer with auctex when TeX-parse-self is t [9.7.11 (release_9.7.11 @ /usr/local/share/emacs/30.1/lisp/org/)]

2025-06-27 Thread Vangelis Evangelou
Hello. I started with emacs -q. Then in the scratch buffer, I evaluated the following code (use-package reftex-auc) (use-package tex :load-path "site-lisp/auctex-14.0.9" :custom (TeX-parse-self t)) Then, I created an org buffer which I exported to latex buffer (C-c C-e l L). I get the erro