From fbb2933f9b58bc8761632e245f68b95015f4d808 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sun, 29 Oct 2023 16:44:18 +0100 Subject: Stir HTML-yanking function a bit --- .emacs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to '.emacs') diff --git a/.emacs b/.emacs index a53b1b2..23a3fa7 100644 --- a/.emacs +++ b/.emacs @@ -617,14 +617,23 @@ (let ((default "plain")) (read-string (format-prompt "Convert to:" default) nil nil default))))) - ;; TODO: make this a transient to easily (un)set pandoc extensions. - (let* ((disabled-html-extensions '("native_divs" "native_spans")) + ;; TODO: make this a transient to easily (un)set + ;; * extensions + ;; * switches (--wrap) + ;; * filters (remove all attributes) + (let* ((disabled-html-extensions (list + "native_divs" + "native_spans" + )) + (disabled-markup-extensions (list + ;; "smart" + )) (html-spec (funcall 'string-join `("html" ,@disabled-html-extensions) "-")) - (disabled-markup-extensions '("smart")) (markup-spec (funcall 'string-join `(,markup ,@disabled-markup-extensions) "-"))) (call-process-region html nil "pandoc" nil t t + "--wrap=none" "--from" html-spec "--to" markup-spec))) ;;;; Miscellany. -- cgit v1.2.3