From c292c6bc638b6ae94bfe1fa8636b819b1d655d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= Date: Mon, 1 Jun 2020 12:30:04 +0200 Subject: [PATCH] ox-html.el: Fix read-only error when export src bloc When the type of src block involve an read-only buffer (ex: compilation mode) avoid to setup the temp buffer as read-only and error when processing it * lisp/ox-html.el (org-html-fontify-code): set `inhibit-read-only' to avoid read-only temp buffer. --- lisp/ox-html.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index fe0a315c9..32996c2c2 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2156,7 +2156,8 @@ org-html-fontify-code ;; htmlize (setq code (let ((output-type org-html-htmlize-output-type) - (font-prefix org-html-htmlize-font-prefix)) + (font-prefix org-html-htmlize-font-prefix) + (inhibit-read-only t)) (with-temp-buffer ;; Switch to language-specific mode. (funcall lang-mode) -- 2.26.2