Hi, I've just found out that my previous patch doesn't work if the tex source is split into different tex files residing in different directories. Here's an updated version that fixes that issue.
--8<---------------cut here---------------start------------->8--- Index: ChangeLog =================================================================== RCS file: /sources/auctex/auctex/ChangeLog,v retrieving revision 5.1727 diff -r5.1727 ChangeLog 0a1,5 > 2011-02-06 Tassilo Horn <tass...@member.fsf.org> > > * tex.el (TeX-source-correlate-mode): Add support for I/O > correlation mode inverse search for the Evince document viewer. > Index: tex.el =================================================================== RCS file: /sources/auctex/auctex/tex.el,v retrieving revision 5.674 diff -r5.674 tex.el 1415a1416,1431 > (defun TeX-source-correlate-sync-source (file linecol) > "Show TeX FILE with point at LINECOL. > This function is called when emacs receives a SyncSource signal > emitted from the Evince document viewer." > ;; FILE is actually given as relative path to the TeX-master root document, > ;; so we need to strip the directory part to match the buffer name. > (let ((buf (get-buffer (file-name-nondirectory file))) > (line (car linecol)) > (col (cadr linecol))) > (if (null buf) > (message "No buffer for %s." file) > (switch-to-buffer buf) > (goto-line (car linecol)) > (unless (= col -1) > (move-to-column col))))) > 1436a1453,1461 > ;; Register Emacs for the SyncSource DBUS signal emitted by Evince. > (when (and (fboundp 'dbus-register-signal) > (fboundp 'dbus-call-method) > (executable-find "evince")) > (require 'dbus) > (dbus-register-signal > :session nil "/org/gnome/evince/Window/0" > "org.gnome.evince.Window" "SyncSource" > 'TeX-source-correlate-sync-source)) --8<---------------cut here---------------end--------------->8--- Bye, Tassilo _______________________________________________ auctex-devel mailing list auctex-devel@gnu.org http://lists.gnu.org/mailman/listinfo/auctex-devel