diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-10-16 22:00:39 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-10-16 22:00:39 +0200 |
commit | 9497098dd4fec1424bcb45b8b52d21e4d9adda17 (patch) | |
tree | 53145daaf024e23b95674dd9006f18d8f5795fe1 | |
parent | 94232ab5c67feeffc05f3abd1d43262674e9d006 (diff) | |
download | org-mode-9497098dd4fec1424bcb45b8b52d21e4d9adda17.tar.gz |
org-export: Don't modify inlinetasks stars when including a file
* contrib/lisp/org-export.el (org-export--prepare-file-contents):
Don't modify inlinetasks stars when including a file.
-rw-r--r-- | contrib/lisp/org-export.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index 56abbed..488f58d 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -2880,17 +2880,18 @@ file should have." ;; that headlines with minimal level have a level of MINLEVEL. (when minlevel (unless (eq major-mode 'org-mode) (org-mode)) - (let ((levels (org-map-entries - (lambda () (org-reduced-level (org-current-level)))))) - (when levels - (let ((offset (- minlevel (apply 'min levels)))) - (unless (zerop offset) - (when org-odd-levels-only (setq offset (* offset 2))) - ;; Only change stars, don't bother moving whole - ;; sections. - (org-map-entries - (lambda () (if (< offset 0) (delete-char (abs offset)) - (insert (make-string offset ?*)))))))))) + (org-with-limited-levels + (let ((levels (org-map-entries + (lambda () (org-reduced-level (org-current-level)))))) + (when levels + (let ((offset (- minlevel (apply 'min levels)))) + (unless (zerop offset) + (when org-odd-levels-only (setq offset (* offset 2))) + ;; Only change stars, don't bother moving whole + ;; sections. + (org-map-entries + (lambda () (if (< offset 0) (delete-char (abs offset)) + (insert (make-string offset ?*))))))))))) (buffer-string))) |