Mercurial > hgrepos > hgweb.cgi > yatex
comparison yatexprc.el @ 408:2857cac50a67 dev
When PDF output seems to occur in typesetter, use pdf-viewer in [prefix] t p.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 19 Jan 2015 09:00:07 +0900 |
parents | acfa7d11b5c3 |
children | 9ab38ecfd3d1 |
comparison
equal
deleted
inserted
replaced
407:b423cf9b35ee | 408:2857cac50a67 |
---|---|
1 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- | 1 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- |
2 ;;; | 2 ;;; |
3 ;;; (c)1993-2015 by HIROSE Yuuji.[yuuji@yatex.org] | 3 ;;; (c)1993-2015 by HIROSE Yuuji.[yuuji@yatex.org] |
4 ;;; Last modified Sun Jan 18 23:17:57 2015 on firestorm | 4 ;;; Last modified Mon Jan 19 08:35:39 2015 on firestorm |
5 ;;; $Id$ | 5 ;;; $Id$ |
6 | 6 |
7 ;;; Code: | 7 ;;; Code: |
8 ;(require 'yatex) | 8 ;(require 'yatex) |
9 (require 'yatexlib) | 9 (require 'yatexlib) |
297 shell-file-name YaTeX-shell-command-option | 297 shell-file-name YaTeX-shell-command-option |
298 ppcmd) | 298 ppcmd) |
299 'YaTeX-typeset-sentinel)) | 299 'YaTeX-typeset-sentinel)) |
300 (t | 300 (t |
301 (if (equal 0 (process-exit-status proc)) | 301 (if (equal 0 (process-exit-status proc)) |
302 nil ;do nothing at successful exit | 302 ;; Successful typesetting done |
303 (if (save-excursion | |
304 (re-search-backward | |
305 (concat | |
306 "^Output written on .*\\.pdf (.*page," | |
307 "\\|\\.dvi -> .*\\.pdf$") | |
308 nil t)) | |
309 ;; If PDF output log found in buffer, | |
310 ;; set next default previewer to 'pdf viewer | |
311 (put 'dvi2-command 'format 'pdf)) | |
303 ;;Confirm process buffer to be shown when error | 312 ;;Confirm process buffer to be shown when error |
304 (YaTeX-showup-buffer | 313 (YaTeX-showup-buffer |
305 pbuf 'YaTeX-showup-buffer-bottom-most) | 314 pbuf 'YaTeX-showup-buffer-bottom-most) |
306 (message "Command FAILED!")) | 315 (message "Command FAILED!")) |
307 ;;pull back original mode-name | 316 ;;pull back original mode-name |