Skip to content

Commit

Permalink
🐛 Overwrite with pandoc output on insert
Browse files Browse the repository at this point in the history
Overwrite the imported text on insert with the output from `pandoc`

Fixes tecosaur#100.
  • Loading branch information
Cash Prokop-Weaver committed Dec 4, 2024
1 parent 0b731ca commit ef9bcc4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions emacs-everywhere.el
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ return windowTitle"))
(executable-find "pandoc"))
(apply #'call-process-region
(point-min) (point-max) "pandoc"
nil nil nil
t t t
emacs-everywhere-pandoc-md-args)
(deactivate-mark) (goto-char (point-max)))
(cond ((bound-and-true-p evil-local-mode) (evil-insert-state))))
Expand Down Expand Up @@ -760,14 +760,14 @@ Should end in a newline to avoid interfering with the buffer content."
(feat-cmds
(append var-cmds de-cmds))
executable-list)
(dolist (feat-cmd (delq nil feat-cmds))
(when (cdr feat-cmd)
(when (and (equal (cadr feat-cmd) "sh")
(equal (caddr feat-cmd) "-c"))
(setcdr feat-cmd (split-string (cadddr feat-cmd))))
(push (cons (cadr feat-cmd) (car feat-cmd))
executable-list)))
executable-list))
(dolist (feat-cmd (delq nil feat-cmds))
(when (cdr feat-cmd)
(when (and (equal (cadr feat-cmd) "sh")
(equal (caddr feat-cmd) "-c"))
(setcdr feat-cmd (split-string (cadddr feat-cmd))))
(push (cons (cadr feat-cmd) (car feat-cmd))
executable-list)))
executable-list))

(defun emacs-everywhere-check-health ()
"Check whether emacs-everywhere has everything it needs."
Expand Down

0 comments on commit ef9bcc4

Please sign in to comment.