edit : here's a screencast of the problem for me : https://vid.me/uBHN

I have cloned this project :


I have then created a new file in the sections directory called this.tex as follows

\section{Further Work}

There are many things that, due to the sheer time constraints of the project,
  have been left undone.
Some are tasks that I consider to be bugs or areas of severe lacking,
  but some are critical bugs of the interface that should be taken into account
  when using it.

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../smp.tex"
%%% TeX-PDF-mode: t
%%% reftex-cite-format: "\\autocite{%l}"
%%% TeX-command-default: "arara"
%%% TeX-engine: xetex
%%% End:

After including that file in the main smp.tex file with \include{sections/this} and saving both files i then try to run reftex-citation and get the following error :

byte-code: No valid bibliography in this document, and no default available

I'm not sure why this is - and when I google for this error I get info about Reftex not finding the bibliography.

This doesn't make sense as when I open a file such as smppaper/sections/further-work.tex and run refTeX-citation I can see a list of the possible bibTeX entries.

It seems as though there's some kind of compilation going on but I'm not sure what this is, because it also seems that when I open a new file the citations are complied on the fly, this is a paste of the message buffer :

Loading /smppaper/auto/smp.el (source)...done
Loading /smppaper/auto/smp.el (source)...done
Loading /smppaper/sections/auto/this.el (source)...done
Loading /smppaper/auto/this.el (source)...done
Applying style hooks... done
byte-code: Beginning of buffer
Compiling label environment definitions...done
Scanning entire document...
Scanning file /home/vco/vermy/smppaper/smp.tex
Scanning file abstract.txt
Scanning file sections/this
Scanning section 1 ...
Scanning file sections/introduction
Scanning section 2 ...
Scanning file sections/mathematical-representation
Scanning section 3 ...
Scanning file sections/logical-representation
Scanning section 4 ...
Scanning file sections/interface-test
Scanning section 5 ...
Scanning file sections/interface-ssa
Scanning section 6 ...
Scanning file sections/further-work
Scanning section 7 ...
Scanning file sections/reflection
Scanning section 8 ...
Scanning file appendices/bundle-format
Scanning section A ...
Scanning file appendices/gui-organization
Scanning section B ...
Scanning document... done
Sorting bibitem...
Removing duplicates... done
Mark set

I'm not sure what this is doing, but looking at the lines such as Loading /smppaper/sections/auto/this.el (source)...done I thought they might be interesting, but I can't see anything in there that's different. When I look through further-work.el and compare it I can't see much difference.


(TeX-add-style-hook "further-work"
(lambda ()


(lambda ()
  (add-to-list 'LaTeX-verbatim-environments-local "lstlisting")
  (add-to-list 'LaTeX-verbatim-macros-with-braces-local "path")
  (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url")
  (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
  (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
  (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
  (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref")
  (add-to-list 'LaTeX-verbatim-macros-with-braces-local "lstinline")
  (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path")
  (add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline")

They don't seem to have anything that that (to me) relates to Reftex?

So I'm not sure what's happening or how to sort this.

  • Have you considered asking on the auctex mailinglist (it might also be them who is maintaining reftex), gnu.org/software/auctex/mailing-lists.html
    – daleif
    Mar 18, 2016 at 11:23
  • I could I'd be amazed if there isn't a simple solution to this though. I expect this is something I'm not understanding rather than something wrong with software
    – baxx
    Mar 18, 2016 at 11:39
  • As David said in the chat, there might not be that many reftex users on the site. I use it a lot for editing, but I rarely cite something (already don in the docs I edit). First of I'd test if everything works if all files are in the same dir.
    – daleif
    Mar 18, 2016 at 11:48
  • What version of Emacs are you using? This may be a bug; see the comments here: tex.stackexchange.com/a/141213/8528
    – jon
    Mar 18, 2016 at 15:45
  • Im using : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8). But the thing is it works when I try using it from a file that's already in the project. It doesn't work when i try it on a file that I've added to the project. @jon
    – baxx
    Mar 18, 2016 at 16:21


You must log in to answer this question.

Browse other questions tagged .