all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kosyrev Serge <_deepfire@feelingofgreen.ru>
To: emacs-orgmode@gnu.org
Subject: [PATCH 4/8] ox-taskjuggler.el:  :PROJECT-{END, DURATION} project attribute
Date: Sun, 8 Nov 2015 13:18:16 +0300	[thread overview]
Message-ID: <87lha6lrp3.fsf@feelingofgreen.ru> (raw)


* ox-taskjuggler.el (org-taskjuggler--build-project): Allow the project
end and duration to be specified via properties of the root node.
---
 contrib/lisp/ox-taskjuggler.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 427fb6e..82aaa7e 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -765,10 +765,13 @@ days from now."
               org-taskjuggler-default-project-version)
           (or (org-taskjuggler-get-start project)
               (format-time-string "%Y-%m-%d"))
-          (let ((end (org-taskjuggler-get-end project)))
+          ;; The 'project-end' and 'project-duration' root node properties allow
+          ;; the project end date / duration to be specified directly in the Org file.
+          (let ((end      (org-element-property :PROJECT-END project))
+                (duration (org-element-property :PROJECT-DURATION project)))
             (or (and end (format "- %s" end))
-                (format "+%sd"
-                        org-taskjuggler-default-project-duration))))
+                (and duration (format "+%s" duration))
+                (format "+%sd" org-taskjuggler-default-project-duration))))
    ;; Add attributes.
    (org-taskjuggler--indent-string
     (org-taskjuggler--build-attributes
-- 
2.5.0

                 reply	other threads:[~2015-11-09 22:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=87lha6lrp3.fsf@feelingofgreen.ru \
    --to=_deepfire@feelingofgreen.ru \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.