comparison yatexprc.el @ 593:0a96c5fef8f1 draft

Error protection for dbus-register
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 29 Sep 2022 09:46:30 +0900
parents 86ceef677ca2
children 638284a7a9d0
comparison
equal deleted inserted replaced
592:86ceef677ca2 593:0a96c5fef8f1
1 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- 1 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*-
2 ;;; 2 ;;;
3 ;;; (c)1993-2022 by HIROSE Yuuji.[yuuji@yatex.org] 3 ;;; (c)1993-2022 by HIROSE Yuuji.[yuuji@yatex.org]
4 ;;; Last modified Sat Sep 24 12:17:14 2022 on firestorm 4 ;;; Last modified Thu Sep 29 09:45:03 2022 on firestorm
5 ;;; $Id$ 5 ;;; $Id$
6 6
7 ;;; Code: 7 ;;; Code:
8 ;(require 'yatex) 8 ;(require 'yatex)
9 (require 'yatexlib) 9 (require 'yatexlib)
1170 (col (car (cdr linecol)))) 1170 (col (car (cdr linecol))))
1171 (if (null buf) 1171 (if (null buf)
1172 (error "[Synctex]: Not found [%s]" file) 1172 (error "[Synctex]: Not found [%s]" file)
1173 (goto-line ln) 1173 (goto-line ln)
1174 (move-to-column (max 0 col)))))))) 1174 (move-to-column (max 0 col))))))))
1175 (dbus-register-signal 1175 (condition-case ()
1176 :session nil "/org/gnome/evince/Window/0" 1176 (dbus-register-signal
1177 "org.gnome.evince.Window" "SyncSource" 1177 :session nil "/org/gnome/evince/Window/0"
1178 'YaTeX-evince-inverse-search))) 1178 "org.gnome.evince.Window" "SyncSource"
1179 'YaTeX-evince-inverse-search)
1180 (error
1181 (message "Reverse search not available on this system.")))))
1179 1182
1180 (defun YaTeX-set-virtual-error-position (file-sym line-sym) 1183 (defun YaTeX-set-virtual-error-position (file-sym line-sym)
1181 "Replace the value of FILE-SYM, LINE-SYM by virtual error position." 1184 "Replace the value of FILE-SYM, LINE-SYM by virtual error position."
1182 (cond 1185 (cond
1183 ((and (get 'dvi2-command 'region) 1186 ((and (get 'dvi2-command 'region)

yatex.org