ox-taskjuggler.el: Handle the case of an empty document title
* ox-taskjuggler.el (org-taskjuggler-project-plan): Use the project name as the title of the (default) report if the document title is empty. Thanks to Eric S Fraga for reporting this bug.
This commit is contained in:
parent
c36435b440
commit
40635b2b4c
|
@ -695,13 +695,16 @@ Return complete project plan as a string in TaskJuggler syntax."
|
||||||
(lambda (report) (org-taskjuggler--build-report report info))
|
(lambda (report) (org-taskjuggler--build-report report info))
|
||||||
main-reports "")
|
main-reports "")
|
||||||
;; insert title in default reports
|
;; insert title in default reports
|
||||||
(let ((title (org-export-data (plist-get info :title) info)))
|
(let* ((title (org-export-data (plist-get info :title) info))
|
||||||
|
(report-title (if (string= title "")
|
||||||
|
(org-taskjuggler-get-name project)
|
||||||
|
title)))
|
||||||
(mapconcat
|
(mapconcat
|
||||||
'org-element-normalize-string
|
'org-element-normalize-string
|
||||||
(mapcar
|
(mapcar
|
||||||
(function
|
(function
|
||||||
(lambda (report)
|
(lambda (report)
|
||||||
(replace-regexp-in-string "%title" title report t t)))
|
(replace-regexp-in-string "%title" report-title report t t)))
|
||||||
org-taskjuggler-default-reports) "")))))))))
|
org-taskjuggler-default-reports) "")))))))))
|
||||||
|
|
||||||
(defun org-taskjuggler--build-project (project info)
|
(defun org-taskjuggler--build-project (project info)
|
||||||
|
|
Loading…
Reference in New Issue