Hello Ralf & alii,
I have found a problem in the implementation of the Texinfo reftex
plugin which I had formerly provided --- quite some time ago.
When you open a Texinfo file first and launch the TOC, and then open a
LaTeX file --- and these two files are the two first ones that invoke
AUCTeX --- then the TOC does not work for the second --- ie LaTeX ---
file.
The reason is that reftex-compile-variables is not called again for the
LaTeX file by reftex-ensure-compiled-variables because in the plugin I
had played a brute force trick by setting reftex-tables-dirty to t when
entering a Texinfo file, rather than making some effect on the style
stored in cache so that the reftex-compile-variables would be
retriggered when entering the second file.
Attached is a correction.
diff --git a/tex-info.el b/tex-info.el
index 6649b40..682ba09 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -390,12 +390,18 @@ for @node."
(defun Texinfo-reftex-hook ()
"Hook function to plug Texinfo into RefTeX."
+ ;; dirty temporary hook to remove when reftex has a Texinfo builtin
+ ;; TODO remove the dirty trick once reftex has been corrected for long enough a time
+ (unless (assq 'Texinfo reftex-label-alist-builtin)
+ (setq reftex-label-alist-builtin (append reftex-label-alist-builtin
+ '((Texinfo "Texinfo default environments" nil)))))
;; force recompilation of variables
(when (string= TeX-base-mode-name "Texinfo")
(dolist (v `((reftex-section-pre-regexp . "@")
; section post-regexp must contain exactly one group
(reftex-section-post-regexp . "\\([ \t]+\\)")
(reftex-section-info-function . Texinfo-reftex-section-info)
+ (reftex-default-label-alist-entries . (Texinfo))
(reftex-section-levels
. ,(mapcar
(lambda (x)
@@ -405,7 +411,6 @@ for @node."
(cons (car x) (cadr x))))
texinfo-section-list))))
(set (make-local-variable (car v) ) (cdr v)))
- (setq reftex-tables-dirty t)
(reftex-ensure-compiled-variables)))
;;; Keymap:
I must say that ideally there should be a change to RefTeX also, so that
constant reftex-label-alist-builtin is affected. I provide some `dirty'
trick for handling the interim period when ReTeX and AUCTeX correction
are out of sync.
Vincent.
_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex