summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2011-01-04 17:03:14 +0100
committerBastien Guerry <bzg@altern.org>2011-01-04 17:03:14 +0100
commita39c35fcd96467223142d7b3a1542a2405eaf2cf (patch)
treec2d80b0953d284a50b0b70b8984e2578a109993e
parente246133d75a49ae9f2426c1f2a2c2572a9f77df8 (diff)
downloadorg-mode-a39c35fcd96467223142d7b3a1542a2405eaf2cf.tar.gz
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.
-rw-r--r--lisp/org-exp.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 9dca4f5..4d2e145 100644
--- a/lisp/org-exp.el
+++ b/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)