GNU bug report logs - #61568
Problems using reftex from Org mode's latex blocks

Previous Next

Package: auctex;

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.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: alain.cochard <at> unistra.fr
Cc: 61568 <at> debbugs.gnu.org, bug-auctex <at> gnu.org
Subject: Re: bug#61568: Problems using reftex from Org mode's latex blocks
Date: Fri, 17 Feb 2023 11:23:29 +0100
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




This bug report was last modified 1 year and 79 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.