Skip to content

Commit

Permalink
Suppress minibuffer output
Browse files Browse the repository at this point in the history
With shell-command-on-region, if generated HTML is too small then
it is also displayed at minibuffer.
  • Loading branch information
syohex committed Feb 1, 2016
1 parent 846a2d0 commit d65d157
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -5270,8 +5270,15 @@ Return the name of the output buffer used."
output-buffer-name)))
;; Pass region to `markdown-command' via stdin
(t
(shell-command-on-region begin-region end-region markdown-command
output-buffer-name))))
(let ((buf (get-buffer-create output-buffer-name)))
(with-current-buffer buf
(setq buffer-read-only nil)
(erase-buffer))
(let ((ret (call-process-region begin-region end-region
shell-file-name nil buf nil
shell-command-switch markdown-command)))
(unless (zerop ret)
(error "Failed: '%s'" markdown-command)))))))
output-buffer-name))

(defun markdown-standalone (&optional output-buffer-name)
Expand Down

0 comments on commit d65d157

Please sign in to comment.