commit fbb2933f9b58bc8761632e245f68b95015f4d808 parent a337bdf8afd85816dedd3666516354e76641c84a Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com> Date: Sun, 29 Oct 2023 16:44:18 +0100 Stir HTML-yanking function a bit Diffstat:
| M | .emacs | | | 15 | ++++++++++++--- |
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git 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.