From 6577549274173f61fb50960159a572464d4cbaad Mon Sep 17 00:00:00 2001 From: York Zhao Date: Tue, 6 Dec 2022 21:58:22 -0500 Subject: [PATCH] Fix pandoc "--no-wrap" option detection The option "--no-wrap" has removed in pandoc v2.19.2, and therefore the output of running "pandoc --no-wrap" is not "--no-wrap is deprecated", but "--no-wrap has been removed". This fix detects both error messages to determine whether the option should be "--no-wrap" or "--wrap=none". --- org-protocol-capture-html.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org-protocol-capture-html.el b/org-protocol-capture-html.el index 6e63b30..84cc155 100644 --- a/org-protocol-capture-html.el +++ b/org-protocol-capture-html.el @@ -79,7 +79,9 @@ Pandoc >= 1.16 deprecates `--no-wrap' in favor of (sleep-for 0.2) (cl-incf checked))) (if (and (zerop (process-exit-status process)) - (not (string-match "--no-wrap is deprecated" (buffer-string)))) + (not (string-match + "--no-wrap \\(is deprecated\\|\\has been removed\\)." + (buffer-string)))) "--no-wrap" "--wrap=none")))))