emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Including date in TaskJuggler exports
@ 2014-03-02 21:26 Luke Crook
  2014-03-03 12:18 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Luke Crook @ 2014-03-02 21:26 UTC (permalink / raw)
  To: emacs-orgmode


The following small change to ox-taskjuggler.el will export the date stored 
in #+DATE:  


	Modified   site/org-mode/contrib/lisp/ox-taskjuggler.el
diff --git a/site/org-mode/contrib/lisp/ox-taskjuggler.el b/site/org-
mode/contrib/lisp/ox-taskjuggler.el
index 761e180..5a1895c 100644
--- a/site/org-mode/contrib/lisp/ox-taskjuggler.el
+++ b/site/org-mode/contrib/lisp/ox-taskjuggler.el
@@ -696,18 +696,30 @@ Return complete project plan as a string in 
TaskJuggler syntax."
               (mapconcat
                (lambda (report) (org-taskjuggler--build-report report 
info))
                main-reports "")
-	    ;; insert title in default reports
+	    ;; insert title and date in default reports
 	    (let* ((title (org-export-data (plist-get info :title) info))
 		   (report-title (if (string= title "")
 				     (org-taskjuggler-get-name project)
-				   title)))
-	      (mapconcat
-	       'org-element-normalize-string
-	       (mapcar
-		(function
-		 (lambda (report)
-		   (replace-regexp-in-string "%title" report-title  report t 
t)))
-		org-taskjuggler-default-reports) "")))))))))
+				   title))
+		   (date (org-export-data (plist-get info :date) info))
+		   (report-date (if (string= date "")
+				    (org-taskjuggler-get-name project)
+				  date)))
+	      (let* ((with-title (mapcar
+				  (function
+				   (lambda (report)
+				     (replace-regexp-in-string "%title" 
report-title  report t t)))
+				  org-taskjuggler-default-reports))
+		     (with-date (mapcar
+				 (function
+				  (lambda (report)
+				    (replace-regexp-in-string "%date" 
report-date  report t t)))
+				 with-title)))
+		
+		(mapconcat
+		 'org-element-normalize-string
+		 with-date
+		 ""))))))))))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-03 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02 21:26 Including date in TaskJuggler exports Luke Crook
2014-03-03 12:18 ` Bastien
2014-03-03 12:21   ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).