forked from mirrors/org-mode
org-element: Parse secondary strings in read-only documents
* lisp/org-element.el (org-element-parse-secondary-string): Parse secondary strings in read-only documents. Reported-by: Michael Brand <michael.ch.brand@gmail.com> <http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00271.html>
This commit is contained in:
parent
fadc83d4fe
commit
5a63156b01
|
@ -4095,8 +4095,9 @@ If STRING is the empty string or nil, return nil."
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
(if (symbolp v) (makunbound v)
|
(if (symbolp v) (makunbound v)
|
||||||
(set (make-local-variable (car v)) (cdr v)))))
|
(set (make-local-variable (car v)) (cdr v)))))
|
||||||
(insert string)
|
;; Transferring local variables may put the temporary buffer
|
||||||
(restore-buffer-modified-p nil)
|
;; into a read-only state. Make sure we can insert STRING.
|
||||||
|
(let ((inhibit-read-only t)) (insert string))
|
||||||
(org-element--parse-objects
|
(org-element--parse-objects
|
||||||
(point-min) (point-max) nil restriction parent))))))
|
(point-min) (point-max) nil restriction parent))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue