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. c8a8d475d5a5c826c0231


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. c8a8d475d5a5c826c02313937e2bf09cca3fe057
Date: Fri, 9 Nov 2018 02:22:17 -0500 (EST)

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  c8a8d475d5a5c826c02313937e2bf09cca3fe057 (commit)
      from  10047fb2bcff4934acddc7e08bcc42698fbe681c (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 c8a8d475d5a5c826c02313937e2bf09cca3fe057
Author: Ikumi Keita <address@hidden>
Date:   Sun Nov 4 03:21:33 2018 +0900

    Don't block emacs during viewing document
    
    * tex.el (TeX-documentation-texdoc): Use asynchronous proces not to
    block emacs during viewing document.
    Supply "%s" to `message' argument in case the shell output contains
    accidental %-sequence.

diff --git a/tex.el b/tex.el
index 9995af3..8f35924 100644
--- a/tex.el
+++ b/tex.el
@@ -6350,7 +6350,30 @@ the number of the file to view, anything else to skip: 
") list)))
        ;; Called without prefix argument: just run "texdoc --view <pkg>" and
        ;; show the output, so that the user is warned in case it doesn't find
        ;; the documentation or "texdoc" is not available.
-       (message (shell-command-to-string (concat "texdoc --view " pkg)))))))
+       (message "%s"
+                ;; The folowing code to the end of `defun' used to be
+                ;; just
+                ;; (shell-command-to-string (concat "texdoc --view " pkg))
+                ;; , but in some cases it blocks emacs until the user
+                ;; quits the viewer (bug#28905).
+                (with-output-to-string
+                  (let* (;; Use pipe rather than pty because the
+                         ;; latter causes atril (evince variant
+                         ;; viewer) to exit before showing anything.
+                         (process-connection-type nil)
+                         (process (start-process-shell-command
+                                   "Doc view" standard-output
+                                   (concat "texdoc --view " pkg))))
+                    ;; Suppress the message "Process Doc view
+                    ;; finished".
+                    (set-process-sentinel process #'ignore)
+                    ;; Kill temp buffer without query.  This is
+                    ;; necessary, at least for some environment, if
+                    ;; the underlying shell can't find the texdoc
+                    ;; executable.
+                    (set-process-query-on-exit-flag process nil)
+                    ;; Don't discard shell output.
+                    (accept-process-output process))))))))
 
 (defun TeX-goto-info-page ()
   "Read documentation for AUCTeX in the info system."

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

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


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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