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.
This commit is contained in:
Nicolas Goaziou 2012-10-16 22:00:39 +02:00
parent 94232ab5c6
commit 9497098dd4

View file

@ -2880,17 +2880,18 @@ file should have."
;; that headlines with minimal level have a level of MINLEVEL. ;; that headlines with minimal level have a level of MINLEVEL.
(when minlevel (when minlevel
(unless (eq major-mode 'org-mode) (org-mode)) (unless (eq major-mode 'org-mode) (org-mode))
(let ((levels (org-map-entries (org-with-limited-levels
(lambda () (org-reduced-level (org-current-level)))))) (let ((levels (org-map-entries
(when levels (lambda () (org-reduced-level (org-current-level))))))
(let ((offset (- minlevel (apply 'min levels)))) (when levels
(unless (zerop offset) (let ((offset (- minlevel (apply 'min levels))))
(when org-odd-levels-only (setq offset (* offset 2))) (unless (zerop offset)
;; Only change stars, don't bother moving whole (when org-odd-levels-only (setq offset (* offset 2)))
;; sections. ;; Only change stars, don't bother moving whole
(org-map-entries ;; sections.
(lambda () (if (< offset 0) (delete-char (abs offset)) (org-map-entries
(insert (make-string offset ?*)))))))))) (lambda () (if (< offset 0) (delete-char (abs offset))
(insert (make-string offset ?*)))))))))))
(buffer-string))) (buffer-string)))