Discussion:
Citation problems
Erik Frisk
2005-02-28 16:17:41 UTC
Permalink
I am not sure if this is a reftex (reftex-version says 4.26) or an
auctex problem. My first guess was reftex, but since the problem has
appeared rather recently and I have updated auctex but not reftex I am
not sure.

Anyway, if I press C-c [ in the small document below and choose a
rerefence in references.bib, it inserts something like
\cite[]{Murota:2000}, i.e. there is an extra pair of brackets that I do
not want.

Anyone got a clue what is happening here? Who is at fault, me, auctex,
or reftex?

Regards,
Erik

\documentclass[a4paper]{article}
\bibliographystyle{plain}

\begin{document}
In \cite[]{Murota:2000}.
\bibliography{references}
\end{document}



Emacs : GNU Emacs 21.3.50.1 (sparc-sun-solaris2.9, X toolkit, Xaw3d
scroll bars)
of 2005-02-08 on alfa.isy.liu.se
Package: AUCTeX CVS-5.482 (2005-02-01)

current state:
==============
(setq
window-system 'x
LaTeX-version "2e"
TeX-style-path '("style/" "auto/" "/home/fs/frisk/Emacs/mystylesauctex/"
"/home/fs/frisk/Emacs/auctex/style/"
"/home/fs/frisk/Emacs/auctex/auto/")
TeX-auto-save t
TeX-parse-self t
TeX-master t
)
--
---------------------------------------------------------------------
Erik Frisk email: ***@isy.liu.se
Dept. of Electrical Engineering tel: +46 13 285714
Linköping University fax: +46 13 282035
S-581 83 Linköping
SWEDEN http://www.fs.isy.liu.se/~frisk/
---------------------------------------------------------------------
Ralf Angeli
2005-02-28 20:27:45 UTC
Permalink
Post by Erik Frisk
I am not sure if this is a reftex (reftex-version says 4.26)
Here as well.
Post by Erik Frisk
or an
auctex problem. My first guess was reftex, but since the problem has
appeared rather recently and I have updated auctex but not reftex I am
not sure.
Anyway, if I press C-c [ in the small document below and choose a
rerefence in references.bib, it inserts something like
\cite[]{Murota:2000}, i.e. there is an extra pair of brackets that I do
not want.
I cannot reproduce this here.
Post by Erik Frisk
Anyone got a clue what is happening here? Who is at fault, me, auctex,
or reftex?
`C-c [' calls `reftex-citation' which is a RefTeX function. Regarding
the example file you provided I cannot see a connection of AUCTeX or
one of its style files interacting here. So I'd guess this is related
to RefTeX.

Did you customize `reftex-cite-format'?

What happens if you start Emacs with `emacs -q -no-site-file', put the
lines

(require 'tex-site)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)

into the *scratch* buffer, type `M-x eval-buffer RET', load your LaTeX
file and try `C-c ['?
--
Ralf
Erik Frisk
2005-03-01 17:09:33 UTC
Permalink
Post by Ralf Angeli
Did you customize `reftex-cite-format'?
No, the item 'default: Default macro \cite{%l}' is checked in the
customize buffer.
Post by Ralf Angeli
What happens if you start Emacs with `emacs -q -no-site-file', put the
lines
(require 'tex-site)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
into the *scratch* buffer, type `M-x eval-buffer RET', load your LaTeX
file and try `C-c ['?
Same result. I also tried with the latest CVS but no change in behavior.
Now I also tried with emacs 21.4 instead of the current CVS-emacs (as of
a few weeks back) and that did the trick. Now everything works ok.
First time ever a cvs-emacs bit me. Sorry for the noise.

/Erik

---------------------------------------------------------------------
Erik Frisk email: ***@isy.liu.se
Dept. of Electrical Engineering tel: +46 13 285714
Linköping University fax: +46 13 282035
S-581 83 Linköping
SWEDEN http://www.fs.isy.liu.se/~frisk/
---------------------------------------------------------------------
Ralf Angeli
2005-03-01 17:40:09 UTC
Permalink
Post by Erik Frisk
Same result. I also tried with the latest CVS but no change in behavior.
Now I also tried with emacs 21.4 instead of the current CVS-emacs (as of
a few weeks back) and that did the trick. Now everything works ok.
A fresh CVS Emacs, i.e. checked out and compiled five minutes ago,
does not show your problem. Carsten changed something two weeks ago,
maybe this was a fix for the problem you are seeing:

$ cvs log -r1.25 lisp/textmodes/reftex-cite.el
[...]
revision 1.25
date: 2005/02/14 12:12:04; author: cdominik; state: Exp; lines: +4 -1
(reftex-do-citation): Cleanup single
optional argument to \cite.
--
Ralf
David Kastrup
2005-03-01 18:42:55 UTC
Permalink
Post by Erik Frisk
Post by Ralf Angeli
Did you customize `reftex-cite-format'?
No, the item 'default: Default macro \cite{%l}' is checked in the
customize buffer.
Post by Ralf Angeli
What happens if you start Emacs with `emacs -q -no-site-file', put the
lines
(require 'tex-site)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
into the *scratch* buffer, type `M-x eval-buffer RET', load your LaTeX
file and try `C-c ['?
Same result. I also tried with the latest CVS but no change in
behavior. Now I also tried with emacs 21.4 instead of the current
CVS-emacs (as of a few weeks back) and that did the trick. Now
everything works ok.
First time ever a cvs-emacs bit me. Sorry for the noise.
With the current enabled "xassert", it is biting me quite heavily. I
have to convince people to disable this by default.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Loading...