diff options
author | Suvayu Ali <fatkasuvayu+linux@gmail.com> | 2011-11-02 00:26:07 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-11-02 11:15:46 +0100 |
commit | a081581693e9b463d2b9442ba58c9cd719639e87 (patch) | |
tree | d57e2f60a2d52cdda022dc33416e468a1978c856 | |
parent | e31e89430aa9f1b5de545c3bfd1503acc848d527 (diff) | |
download | org-mode-a0815816.tar.gz |
Respect export options for subtree export title
* org-exp.el (org-solidify-link-text): Respect org-export-with-tags
when forming the export title during subtree export.
TINY CHANGE
-rw-r--r-- | lisp/org-exp.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el index fa54242..e8ad0b9 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2160,15 +2160,21 @@ can work correctly." (defun org-export-get-title-from-subtree () "Return subtree title and exclude it from export." (let ((rbeg (region-beginning)) (rend (region-end)) - (inhibit-read-only t) title) + (inhibit-read-only t) + (tags (plist-get (org-infile-export-plist) :tags)) + title) (save-excursion (goto-char rbeg) (when (and (org-at-heading-p) (>= (org-end-of-subtree t t) rend)) + (when (plist-member org-export-opt-plist :tags) + (setq tags (or (plist-get org-export-opt-plist :tags) tags))) ;; This is a subtree, we take the title from the first heading (goto-char rbeg) - (looking-at org-todo-line-regexp) - (setq title (match-string 3)) + (looking-at org-todo-line-tags-regexp) + (setq title (if (eq tags t) + (format "%s\t%s" (match-string 3) (match-string 4)) + (match-string 3))) (org-unmodified (add-text-properties (point) (1+ (point-at-eol)) (list :org-license-to-kill t))) |