Browse Source

org-exp.el: Inhibit read-only when grabbing the title from a subtree.

Eric S. Fraga found this problem while trying to export a subtree from
a read-only file.
Bastien Guerry 10 years ago
parent
commit
a39c35fcd9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org-exp.el

+ 2 - 1
lisp/org-exp.el

@@ -1949,7 +1949,8 @@ can work correctly."
 
 (defun org-export-get-title-from-subtree ()
   "Return subtree title and exclude it from export."
-  (let (title (rbeg (region-beginning)) (rend (region-end)))
+  (let ((rbeg (region-beginning)) (rend (region-end))
+	(inhibit-read-only t) title)
     (save-excursion
       (goto-char rbeg)
       (when (and (org-at-heading-p)