emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Luke Crook <luke@balooga.com>
To: emacs-orgmode@gnu.org
Subject: Including date in TaskJuggler exports
Date: Sun, 2 Mar 2014 21:26:10 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140302T222318-196@post.gmane.org> (raw)


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
+		 ""))))))))))

             reply	other threads:[~2014-03-02 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02 21:26 Luke Crook [this message]
2014-03-03 12:18 ` Including date in TaskJuggler exports Bastien
2014-03-03 12:21   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20140302T222318-196@post.gmane.org \
    --to=luke@balooga.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).