# HG changeset patch # User HIROSE Yuuji # Date 1421625607 -32400 # Node ID 2857cac50a6798286e06d9fa41646e773f833bbf # Parent b423cf9b35ee92157e8a2170955217d21ce18eba When PDF output seems to occur in typesetter, use pdf-viewer in [prefix] t p. diff -r b423cf9b35ee -r 2857cac50a67 yatex.new --- a/yatex.new Sun Jan 18 23:42:31 2015 +0900 +++ b/yatex.new Mon Jan 19 09:00:07 2015 +0900 @@ -9,6 +9,7 @@ 持続中の On-the-fly preview の無効化は何もない場所で [prefix] k。 YaTeX-help-file のデフォルト位置を site-lisp/yatex/help/ に変更。 領域活性時に呼び出す補完は領域括りになるようにした。 + タイプセットでPDF出力がありそうなときは次回previewをPDFヴューアに。 === yahtml === 領域活性時に呼び出す補完は領域括りになるようにした。 ... diff -r b423cf9b35ee -r 2857cac50a67 yatexprc.el --- a/yatexprc.el Sun Jan 18 23:42:31 2015 +0900 +++ b/yatexprc.el Mon Jan 19 09:00:07 2015 +0900 @@ -1,7 +1,7 @@ ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- ;;; ;;; (c)1993-2015 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Jan 18 23:17:57 2015 on firestorm +;;; Last modified Mon Jan 19 08:35:39 2015 on firestorm ;;; $Id$ ;;; Code: @@ -299,7 +299,16 @@ 'YaTeX-typeset-sentinel)) (t (if (equal 0 (process-exit-status proc)) - nil ;do nothing at successful exit + ;; Successful typesetting done + (if (save-excursion + (re-search-backward + (concat + "^Output written on .*\\.pdf (.*page," + "\\|\\.dvi -> .*\\.pdf$") + nil t)) + ;; If PDF output log found in buffer, + ;; set next default previewer to 'pdf viewer + (put 'dvi2-command 'format 'pdf)) ;;Confirm process buffer to be shown when error (YaTeX-showup-buffer pbuf 'YaTeX-showup-buffer-bottom-most)