Skip to content

Commit 8171bf2

Browse files
author
Danny McClanahan
committed
add markdown-command-needs-filename to async
1 parent f353c8f commit 8171bf2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

markdown-mode.el

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6025,9 +6025,14 @@ alive."
60256025
(proc
60266026
(start-process-shell-command
60276027
markdown-live-preview-proc-name markdown-live-preview-buf-name
6028-
;; using redirection means emacs doesn't have to process output
6028+
;; using redirection means emacs doesn't have to process output,
6029+
;; which interrupts the user less
60296030
(concat
6030-
markdown-command " > " (shell-quote-argument out-file)))))
6031+
markdown-command
6032+
(and markdown-command-needs-filename
6033+
(if (buffer-file-name) (buffer-file-name)
6034+
(user-error "Must be visiting a file")))
6035+
" > " (shell-quote-argument out-file)))))
60316036
(setq markdown-live-preview-currently-exporting-process proc)
60326037
(set-process-sentinel proc sentinel)
60336038
(with-temp-buffer

0 commit comments

Comments
 (0)