Commits

Anonymous committed f6ed372

* tex.el (TeX-synctex-output-page): TeXLive 2011's synctex wants
absolute file names with dot indicating the master, like
/foo/bar/./baz/chap1.tex. So add this as another variant.

Comments (0)

Files changed (2)

+2011-08-24  Tassilo Horn  <tassilo@member.fsf.org>
+
+	* tex.el (TeX-synctex-output-page): TeXLive 2011's synctex wants
+	absolute file names with dot indicating the master, like
+	/foo/bar/./baz/chap1.tex.  So add this as another variant.
+
 2011-08-07  Ralf Angeli  <angeli@caeruleus.net>
 
 	* latex.el (LaTeX-fill-move-to-break-point): Take characters after
   "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")))