summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2011-11-22 07:56:00 -0700
committerEric Schulte <schulte.eric@gmail.com>2011-11-22 07:56:00 -0700
commit0bd9981e0d9ed64ff1426698692d15b9c8a1d439 (patch)
tree0e01e6e1b9d267eacf51cc02718a2e5219564dd3
parenta998cae72214ae5feb04c654d48f1acba66d11f4 (diff)
downloadorg-mode-0bd9981e0d9ed64ff1426698692d15b9c8a1d439.tar.gz
Don't license to kill text inside blocks when getting a title
* lisp/org-exp.el (org-export-grab-title-from-buffer): Don't license to kill text inside blocks when getting a title.
-rw-r--r--lisp/org-exp.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 9111887..69f0280 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2151,9 +2151,10 @@ can work correctly."
(save-excursion (outline-next-heading) (point)))))
(when (re-search-forward "^[ \t]*[^|# \t\r\n].*\n" end t)
;; Mark the line so that it will not be exported as normal text.
- (org-unmodified
- (add-text-properties (match-beginning 0) (match-end 0)
- (list :org-license-to-kill t)))
+ (unless (org-in-block-p org-list-forbidden-blocks)
+ (org-unmodified
+ (add-text-properties (match-beginning 0) (match-end 0)
+ (list :org-license-to-kill t))))
;; Return the title string
(org-trim (match-string 0)))))))