monnier pushed a commit to branch externals/auctex
in repository elpa.

commit 11969380bd3728000a05e7c3a56a3341d75d73da
Author: Mosè Giordano <giordano.m...@libero.it>
Date:   Thu May 30 15:57:33 2013 +0200

    Make forward PDF search with Okular work.
    
    * tex.el (TeX-expand-list): Add new expander "%a", it returns the
    quoted absolute path of the file visiting current buffer.
    (TeX-view-program-list-builtin): Use "%a" expander for forward PDF
    search.
---
 ChangeLog |    7 +++++++
 tex.el    |    4 +++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 93621c2..2a12e48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-05-30  Mos� Giordano  <giordano.m...@libero.it>
+
+       * tex.el (TeX-expand-list): Add new expander "%a", it returns the
+       quoted absolute path of the file visiting current buffer.
+       (TeX-view-program-list-builtin): Use "%a" expander for forward PDF
+       search.
+
 2013-05-28  Tassilo Horn  <t...@gnu.org>
 
        * tex.el (TeX-source-correlate-sync-source): Fix docstring.
diff --git a/tex.el b/tex.el
index fee2643..af57c9b 100644
--- a/tex.el
+++ b/tex.el
@@ -510,6 +510,8 @@ string."
     ;; command needs to be relative to the master file, just in
     ;; case the file is in a different subdirectory
     ("%b" TeX-current-file-name-master-relative)
+    ;; Okular forward PDF search requires absolute path.
+    ("%a" (lambda nil (prin1-to-string (expand-file-name (buffer-file-name)))))
     ;; the following is for preview-latex.
     ("%m" preview-create-subdirectory))
   "List of expansion strings for TeX command names.
@@ -1112,7 +1114,7 @@ the requirements are met."
                                                  (shell-command-to-string 
"evince --help"))
                                    " -i %(outpage)"
                                  " -p %(outpage)")) " %o")))
-      ("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%b")))
+      ("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%a")))
       ("xdg-open" "xdg-open %o"))))
   "Alist of built-in viewer specifications.
 This variable should not be changed by the user who can use

Reply via email to