From 6b5b21df6c32d6256e0743b109d8946fb4916887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Tue, 13 Dec 2022 22:21:26 +0000 Subject: [PATCH] Org export filters only work in emacs27 and above apparently. Or maybe whichever version of org I have installed. At this point I just need to assume nothing works in emacs26 I guess. --- config.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config.org b/config.org index 8c1460f..2fd5fff 100644 --- a/config.org +++ b/config.org @@ -486,11 +486,12 @@ Settings for export, fairly basic because the only thing I regularly export is H Export non-breaking spaces properly; from, believe it or not, [[https://orgmode.org/manual/Advanced-Export-Configuration.html][the Org Manual]]. #+BEGIN_SRC emacs-lisp - (defun my-html-filter-nobreaks (text backend info) - (when (org-export-derived-backend-p backend 'html) - (replace-regexp-in-string " " " " text))) - (add-to-list 'org-export-filter-plain-text-functions - 'my-html-filter-nobreaks) + (unless (version< emacs-version "27") + (defun my-html-filter-nobreaks (text backend info) + (when (org-export-derived-backend-p backend 'html) + (replace-regexp-in-string " " " " text))) + (add-to-list 'org-export-filter-plain-text-functions + 'my-html-filter-nobreaks)) #+END_SRC *** Packages