[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] Changes to auctex/tex.el,v
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] Changes to auctex/tex.el,v |
Date: |
Wed, 24 Aug 2011 06:41:08 +0000 |
CVSROOT: /sources/auctex
Module name: auctex
Changes by: Tassilo Horn <tsdh> 11/08/24 06:40:53
Index: tex.el
===================================================================
RCS file: /sources/auctex/auctex/tex.el,v
retrieving revision 5.685
retrieving revision 5.686
diff -u -b -r5.685 -r5.686
--- tex.el 12 Jul 2011 10:58:22 -0000 5.685
+++ tex.el 24 Aug 2011 06:40:52 -0000 5.686
@@ -1601,13 +1601,17 @@
"Return the page corresponding to the position in the current buffer.
This method assumes that the document was compiled with SyncTeX
enabled and the `synctex' binary is available."
- (let ((file (file-relative-name (buffer-file-name)
+ (let* ((file (file-relative-name (buffer-file-name)
(file-name-directory
- (TeX-active-master)))))
- ;; On some systems, synctex wants foo/bar.tex for multifile docs, while on
- ;; others it wants ./foo/bar.tex. So try both variants before falling back
- ;; to page 1.
- (or (TeX-synctex-output-page-1 file)
+ (TeX-active-master))))
+ (abs-file (concat (expand-file-name (file-name-directory
(TeX-active-master)))
+ "./" file)))
+ ;; It's known that depending on synctex version one of
+ ;; /absolute/path/./foo/bar.tex, foo/bar.tex, or ./foo/bar.tex (relative to
+ ;; TeX-master, and the "." in the absolute path is important) are needed.
+ ;; So try all variants before falling back to page 1.
+ (or (TeX-synctex-output-page-1 abs-file)
+ (TeX-synctex-output-page-1 file)
(TeX-synctex-output-page-1 (concat "./" file))
"1")))
- [AUCTeX-diffs] Changes to auctex/tex.el,v,
Tassilo Horn <=