branch: elpa/typst-ts-mode commit 0b0d4bf2114421936dfffda353365207358d71dc Author: Huan Thieu Nguyen <nguyenthieuh...@gmail.com> Commit: Huan Thieu Nguyen <nguyenthieuh...@gmail.com>
fix: use start-process for watch mode #42 --- typst-ts-watch-mode.el | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/typst-ts-watch-mode.el b/typst-ts-watch-mode.el index f7d93309d4..a27e90107b 100644 --- a/typst-ts-watch-mode.el +++ b/typst-ts-watch-mode.el @@ -36,11 +36,12 @@ (typst-ts-watch-start) (typst-ts-watch-stop))) -(defcustom typst-ts-watch-options "" +(defcustom typst-ts-watch-options '() "User defined compile options for `typst-ts-watch'. The compile options will be passed to the `<typst-executable> watch <current-file>' sub-command." - :type 'string) + :type '(choice (repeat string) + (const :tag "Empty list" nil))) (defcustom typst-ts-watch-process-name "*Typst-Watch*" "Process name for `typst watch' sub-command." @@ -122,16 +123,14 @@ PROC: process; OUTPUT: new output from PROC." (typst-ts-compilation-mode) (read-only-mode -1))) (set-process-filter - ;; FIXME: Do we really need a shell, with the associated need to - ;; `shell-quote-argument'? - (start-process-shell-command + (apply + start-process typst-ts-watch-process-name typst-ts-watch-process-buffer-name - (format "%s watch %s %s" - (shell-quote-argument typst-ts-compile-executable-location) - (shell-quote-argument (file-name-nondirectory buffer-file-name)) - typst-ts-watch-options)) + typst-ts-compile-executable-location "watch" + (file-name-nondirectory buffer-file-name) + typst-ts-watch-options) #'typst-ts--watch-process-filter) - (message "Start Watch")) ;; FIXME: ":3"? + (message "Start Watch")) ;;;###autoload (defun typst-ts-watch-stop ()