all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* RefTeX inserting citations in wrong place
@ 2010-10-11  7:31 N. Raghavendra
  2010-10-11 19:47 ` Ralf Angeli
  0 siblings, 1 reply; 3+ messages in thread
From: N. Raghavendra @ 2010-10-11  7:31 UTC (permalink / raw)
  To: help-gnu-emacs

I am using the RefTeX package that comes with Emacs 24.0.50.1.  In a
LaTeX buffer if I do `C-c [' for inserting a citation it is placing the
citation in a wrong place.  For example, if I have the following text

----------------------------------------------------------------------
Foo bar

\begin{thebibliography}{0123}
\bibitem[BT1]{BT1} N.~Bourbaki, \emph{General topology.  Chapters
    1--4}, Springer Verlag, Berlin, 1989.
\end{thebibliography}
----------------------------------------------------------------------

in a buffer, and with point just after "bar", press `C-c [', the
citation is inserted at "\end{thebibliography}", like this:

----------------------------------------------------------------------
\cite{BT1}\end{thebibliography}
----------------------------------------------------------------------

and not next to "bar".  I would appreciate if someone can tell me a
solution to the problem.

Thanks and regards,
Raghavendra.

-- 
N. Raghavendra <raghu@mri.ernet.in> | http://www.retrotexts.net/
Harish-Chandra Research Institute   | http://www.mri.ernet.in/
See message headers for contact and OpenPGP information.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RefTeX inserting citations in wrong place
  2010-10-11  7:31 RefTeX inserting citations in wrong place N. Raghavendra
@ 2010-10-11 19:47 ` Ralf Angeli
  2010-10-12  1:26   ` N. Raghavendra
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Angeli @ 2010-10-11 19:47 UTC (permalink / raw)
  To: help-gnu-emacs

* N. Raghavendra (2010-10-11) writes:

> I am using the RefTeX package that comes with Emacs 24.0.50.1.  In a
> LaTeX buffer if I do `C-c [' for inserting a citation it is placing the
> citation in a wrong place.

It's usually better to send such bug reports to the Emacs bug tracker
with `M-x report-emacs-bug <RET>'.

Anyway, about a year ago there was a mass change where a lot of
`set-buffer' calls where replaced with `with-current-buffer'.  When this
happened a `save-excursion' call in the function
`reftex-extract-bib-entries-from-thebibliography' was lost.  Adding it
again fixes the bug.

I haven't set up an local branch for committing yet, so I don't mind if
somebody beats me to checking in such a fix.

-- 
Ralf


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RefTeX inserting citations in wrong place
  2010-10-11 19:47 ` Ralf Angeli
@ 2010-10-12  1:26   ` N. Raghavendra
  0 siblings, 0 replies; 3+ messages in thread
From: N. Raghavendra @ 2010-10-12  1:26 UTC (permalink / raw)
  To: help-gnu-emacs

At 2010-10-11T21:47:43+02:00, Ralf Angeli wrote:

> It's usually better to send such bug reports to the Emacs bug tracker
> with `M-x report-emacs-bug <RET>'.

Many thanks for your reply.  Yes, but I wasn't sure whether this was a
bug or some mistake in the way I was using RefTeX.  I will report it
now.

> Anyway, about a year ago there was a mass change where a lot of
> `set-buffer' calls where replaced with `with-current-buffer'.  When this
> happened a `save-excursion' call in the function
> `reftex-extract-bib-entries-from-thebibliography' was lost.  Adding it
> again fixes the bug.

I will try it.

Regards,
Raghavendra.

-- 
N. Raghavendra <raghu@mri.ernet.in> | http://www.retrotexts.net/
Harish-Chandra Research Institute   | http://www.mri.ernet.in/
See message headers for contact and OpenPGP information.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-12  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-11  7:31 RefTeX inserting citations in wrong place N. Raghavendra
2010-10-11 19:47 ` Ralf Angeli
2010-10-12  1:26   ` N. Raghavendra

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.