auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6dcf0e1083791902563af


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6dcf0e1083791902563afaac9add4211bd91514a
Date: Sat, 16 Sep 2017 10:00:51 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  6dcf0e1083791902563afaac9add4211bd91514a (commit)
      from  cfad977c8747bc72c38533470d00dfa99a0238e0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6dcf0e1083791902563afaac9add4211bd91514a
Author: Ikumi Keita <address@hidden>
Date:   Sat Sep 16 23:00:08 2017 +0900

    Add a new option for evince compatible viewer.
    
    * tex.el: (TeX-view-evince-keep-focus): New option.
    (TeX-evince-sync-view-1): Pull the focus back to Emacs if the above
    new option is non-nil.

diff --git a/tex.el b/tex.el
index e4012b0..d1b7791 100644
--- a/tex.el
+++ b/tex.el
@@ -1305,6 +1305,15 @@ entry in `TeX-view-program-list-builtin'."
       (pop-to-buffer (or (find-buffer-visiting pdf)
                         (find-file-noselect pdf))))))
 
+(defcustom TeX-view-evince-keep-focus nil
+  "Whether Emacs retains the focus when viewing PDF files with Evince.
+
+When calling `TeX-evince-sync-view', Evince normally captures the
+focus. If this option is set to non-nil, Emacs will retain the
+focus."
+  :group 'TeX-view
+  :type 'boolean)
+
 (defvar url-unreserved-chars)
 
 (defun TeX-evince-sync-view-1 (de app)
@@ -1344,7 +1353,14 @@ viewer."
                 ;; line.  What is the right number to specify here?
                 ;; number of letters? bytes in UTF8? or other?
                 :int32 (1+ (current-column)))
-          :uint32 0))
+          :uint32 0)
+          (when TeX-view-evince-keep-focus
+           (cond ((fboundp #'select-frame-set-input-focus)
+                  (select-frame-set-input-focus (selected-frame)))
+                 ((fboundp #'x-focus-frame)
+                  (x-focus-frame (selected-frame)))
+                 ((fboundp #'focus-frame)
+                  (focus-frame (selected-frame))))))
       (error "Couldn't find the %s instance for %s" (capitalize app) uri))))
 
 (defun TeX-atril-sync-view ()

-----------------------------------------------------------------------

Summary of changes:
 tex.el | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]