Browse Source

ox-html.el: Fix read-only error when export src block

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.
Pierre Téchoueyres 4 years ago
parent
commit
c631afd358
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/ox-html.el

+ 2 - 1
lisp/ox-html.el

@@ -2156,7 +2156,8 @@ is the language used for CODE, as a string, or nil."
 	  ;; 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)