text #elisp sentinel的例子

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text #elisp sentinel的例子相关的知识,希望对你有一定的参考价值。

(defun run-latexmk ()
  "Asynchronously run `latexmk' and attach a sentinel to it"
  (let ((process (start-process "latexmk" "*output*"
                                "/bin/sh" "-c" "echo KO; false")))
    (set-process-sentinel process 'latexmk-sentinel)))

(defun latexmk-sentinel (p e)
  "Display the pdf if `latexmk' was successful"
  (when (= 0 (process-exit-status p))
    (start-process "displaypdf" "*output*"
                   "/bin/echo" "DISPLAY PDF")))

;; Example use
(with-current-buffer (get-buffer-create "*output*") (erase-buffer))
(run-latexmk)

以上是关于text #elisp sentinel的例子的主要内容,如果未能解决你的问题,请参考以下文章

text elisp utc约会

elisp宏写一个函数?

text redis sentinel docker撰写yml

Elisp 11:动态模块

Elisp 12:兔子洞

如何调试 elisp?