GNU bug report logs -
#61568
Problems using reftex from Org mode's latex blocks
Previous Next
Reported by: alain.cochard <at> unistra.fr
Date: Fri, 17 Feb 2023 06:46:01 UTC
Severity: normal
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61568 in the body.
You can then email your comments to 61568 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Fri, 17 Feb 2023 06:46:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
alain.cochard <at> unistra.fr
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Fri, 17 Feb 2023 06:46:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello.
When Org mode is enabled, issuing [C-c '] (org-edit-special) within a
latex "export block" such as this one
#+begin_export latex
\documentclass{article}
\begin{document}
\section{1}
\section{2}
\end{document}
#+end_export
one is put into a special buffer which is latex aware. If reftex is
turned on in that buffer, 'Ref' is added to the modeline. Now, upon
[C-c (], one gets
RefTeX works only in buffers visiting a file
This is disappointing, but I could accept it. However upon [C-c =] one
gets
Wrong type argument: stringp, nil
which is much more problematic. Further, a prominent Org contributor
thinks it is a reftex bug and that "It is generally expected that
major modes do work in non-file buffers in Emacs." (thread
https://lists.gnu.org/archive/html/emacs-orgmode/2023-02/msg00388.html)
Hence this message.
Regards
NB: I am not subscribed to bug-auctex <at> gnu.org
--
EOST (École et Observatoire des Sciences de la Terre)
ITE (Institut Terre & Environnement) | alain.cochard <at> unistra.fr
5 rue René Descartes [bureau 110] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | [ slot available for rent ]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Fri, 17 Feb 2023 10:42:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
Alain.Cochard <at> unistra.fr writes:
Hi Alain,
> one is put into a special buffer which is latex aware. If reftex is
> turned on in that buffer, 'Ref' is added to the modeline. Now, upon
> [C-c (], one gets
>
> RefTeX works only in buffers visiting a file
>
> This is disappointing, but I could accept it. However upon [C-c =]
> one gets
>
> Wrong type argument: stringp, nil
>
> which is much more problematic.
RefTeX uses (buffer-file-name) at 37 locations for various reasons.
Maybe we could get away with having a reftex-buffer-file-name defined as
(or (buffer-file-name)
(buffer-name))
For the time being, can't you just `C-x C-w /tmp/tmp.tex RET' to make
the buffer file-visiting?
> Further, a prominent Org contributor thinks it is a reftex bug and
> that "It is generally expected that major modes do work in non-file
> buffers in Emacs." (thread
> https://lists.gnu.org/archive/html/emacs-orgmode/2023-02/msg00388.html)
That's generally good, yes. The thing is that RefTeX is a multi-file
mode which tries to parse all files belonging to the same document,
e.g., when your document looks like
main.tex
chapters/c1.tex
chapters/c2.tex
appendix.tex
Of course, you don't need that in your very use-case.
Bye,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Fri, 17 Feb 2023 10:42:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Fri, 17 Feb 2023 11:17:02 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
Thanks a lot for the prompt reply and for the explanations.
I don't know how to use your trick
C-x C-w /tmp/tmp.tex RET
If I do that and modify /tmp/tmp.tex, then I no longer have access to
that temporary Org buffer (at least I don't know how; that buffer
disappears from the *Buffer List* one gets with 'M-x buffer-menu').
The normal usage is to exit from that temporary buffer after having
modified it, falling back to the initial Org file with the modified
latex block.
--
EOST (École et Observatoire des Sciences de la Terre)
ITE (Institut Terre & Environnement) | alain.cochard <at> unistra.fr
5 rue René Descartes [bureau 110] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | [ slot available for rent ]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Fri, 17 Feb 2023 12:06:02 GMT)
Full text and
rfc822 format available.
Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):
Alain.Cochard <at> unistra.fr writes:
Hi Alain,
> I don't know how to use your trick
>
> C-x C-w /tmp/tmp.tex RET
>
> If I do that and modify /tmp/tmp.tex, then I no longer have access to
> that temporary Org buffer (at least I don't know how; that buffer
> disappears from the *Buffer List* one gets with 'M-x buffer-menu').
It's still the very same buffer. It just got a new name.
> The normal usage is to exit from that temporary buffer after having
> modified it, falling back to the initial Org file with the modified
> latex block.
Does that exiting not work anymore after writing the buffer to a file?
Ah, indeed, after writing to a file, it seems the org-binding C-c ' is
gone (and also the header line explaining the bindings). However, I was
able to take over my edits by manually doing M-x org-edit-src-exit RET.
Not very comfortable but should do the trick for the time being.
Bye,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Fri, 17 Feb 2023 12:06:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Fri, 17 Feb 2023 16:04:02 GMT)
Full text and
rfc822 format available.
Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):
Tassilo Horn writes on Fri 17 Feb 2023 12:50:
> Ah, indeed, after writing to a file, it seems the org-binding C-c '
> is gone (and also the header line explaining the bindings).
> However, I was able to take over my edits by manually doing M-x
> org-edit-src-exit RET. Not very comfortable but should do the
> trick for the time being.
Indeed. I would never have thought about that by myself. Thank you.
--
EOST (École et Observatoire des Sciences de la Terre)
ITE (Institut Terre & Environnement) | alain.cochard <at> unistra.fr
5 rue René Descartes [bureau 110] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | [ slot available for rent ]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Fri, 17 Feb 2023 16:04:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#61568
; Package
auctex
.
(Tue, 05 Mar 2024 09:42:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 61568 <at> debbugs.gnu.org (full text, mbox):
Alain.Cochard <at> unistra.fr writes:
> Tassilo Horn writes on Fri 17 Feb 2023 12:50:
>
> > Ah, indeed, after writing to a file, it seems the org-binding C-c '
> > is gone (and also the header line explaining the bindings).
> > However, I was able to take over my edits by manually doing M-x
> > org-edit-src-exit RET. Not very comfortable but should do the
> > trick for the time being.
>
> Indeed. I would never have thought about that by myself. Thank you.
It seems we have a working solution, therefore I'm closing this report.
Best, Arash
bug closed, send any further explanations to
61568 <at> debbugs.gnu.org and alain.cochard <at> unistra.fr
Request was from
Arash Esbati <arash <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 05 Mar 2024 09:42:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 02 Apr 2024 11:24:26 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 37 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.