From ef9bcc43fe86e2cc90915fb984f02b5c226ee810 Mon Sep 17 00:00:00 2001 From: Cash Prokop-Weaver Date: Wed, 4 Dec 2024 14:03:26 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Overwrite=20with=20pandoc=20outp?= =?UTF-8?q?ut=20on=20insert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Overwrite the imported text on insert with the output from `pandoc` Fixes #100. --- emacs-everywhere.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/emacs-everywhere.el b/emacs-everywhere.el index 92a949a..334e767 100644 --- a/emacs-everywhere.el +++ b/emacs-everywhere.el @@ -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)))) @@ -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."