Re: [O] [bug] ox-taskjuggler

2015-01-26 Thread Christian Egli
Søren Mikkelsen so...@aamikkelsen.dk writes:

 On 2015-01-23 09:59, Christian Egli wrote:
 Søren Mikkelsen so...@aamikkelsen.dk writes:
 
 It works, but only for tasks that aren't having a start
 attribute. It is possible to give a warning if the start
 attribute already exists and make the default one, the one
 specified in the attributes (drawer)?
 
 What exactly doesn't work? Are there two start entries in the task?
 One because of the SCHEDULED property and one because of the the
 start property?
 
 Then you might have to remove the start property from 
 org-taskjuggler-valid-task-attributes before adding the other
 valid attributes i.e.
 
 ;; Add other valid attributes. (org-taskjuggler--indent-string 
 (org-taskjuggler--build-attributes task
 org-taskjuggler-valid-task-attributes))
 
 Might have to become (untested)
 
 ;; Add other valid attributes. (org-taskjuggler--indent-string 
 (org-taskjuggler--build-attributes task (remq 'start
 org-taskjuggler-valid-task-attributes)))
 
 HTH Christian
 
 The problem by removing the start attribute is that it destroys the
 backward compatibility. I want ox-taskjuggler to accept both methods,
 where the start property attribute overrules the scheduled attribute,
 if this is present.

I don't understand. You get the start of a task using
org-taskjuggler-get-start. This can be either the start attribute or the
SCHEDULED attribute. Then you insert this in the task if it is non-nil.
Since you have dealt with this attribute already you don't need to
handle it in org-taskjuggler--build-attributes. Hence you remove it
(just for this call) from the list of task attributes that need to be
handled.

HTH
Christian
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




Re: [O] [bug] ox-taskjuggler

2015-01-23 Thread Christian Egli
Søren Mikkelsen so...@aamikkelsen.dk writes:

 It works, but only for tasks that aren't having a start attribute. It
 is possible to give a warning if the start attribute already exists
 and make the default one, the one specified in the attributes (drawer)?

What exactly doesn't work? Are there two start entries in the task? One
because of the SCHEDULED property and one because of the the start
property?

Then you might have to remove the start property from
org-taskjuggler-valid-task-attributes before adding the other valid
attributes i.e. 

;; Add other valid attributes.
(org-taskjuggler--indent-string
 (org-taskjuggler--build-attributes
  task org-taskjuggler-valid-task-attributes))

Might have to become (untested)

;; Add other valid attributes.
(org-taskjuggler--indent-string
 (org-taskjuggler--build-attributes
  task 
  (remq 'start org-taskjuggler-valid-task-attributes)))

HTH
Christian

-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




Re: [O] [bug] ox-taskjuggler

2015-01-23 Thread Søren Mikkelsen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2015-01-23 09:59, Christian Egli wrote:
 Søren Mikkelsen so...@aamikkelsen.dk writes:
 
 It works, but only for tasks that aren't having a start
 attribute. It is possible to give a warning if the start
 attribute already exists and make the default one, the one
 specified in the attributes (drawer)?
 
 What exactly doesn't work? Are there two start entries in the task?
 One because of the SCHEDULED property and one because of the the
 start property?
 
 Then you might have to remove the start property from 
 org-taskjuggler-valid-task-attributes before adding the other
 valid attributes i.e.
 
 ;; Add other valid attributes. (org-taskjuggler--indent-string 
 (org-taskjuggler--build-attributes task
 org-taskjuggler-valid-task-attributes))
 
 Might have to become (untested)
 
 ;; Add other valid attributes. (org-taskjuggler--indent-string 
 (org-taskjuggler--build-attributes task (remq 'start
 org-taskjuggler-valid-task-attributes)))
 
 HTH Christian
 
The problem by removing the start attribute is that it destroys the
backward compatibility. I want ox-taskjuggler to accept both methods,
where the start property attribute overrules the scheduled attribute,
if this is present.


- -- 
Best regards,
Søren Mikkelsen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUwjEEAAoJECUE7rt2jWDw5WQH/AhkKBjfWZLryYG+Zqj1D5Re
+JXahe52HYf5oBXeSJHF250wKxF4KSme6JXHBfO5lfT5IZY+YwZTeUxm0a2KXod3
y9bxrWKqNglkqLLHxpwsZMpTGfcy4LOGJwxqL+brcRSJzftf17bpKnD1pcj62/uT
UxLQlWbmmj0WqP4f0xLMtyvkRc5OWDz6T/mylxM0/26cK2xIhdigV42dTXvwFu13
NZdfhL5lUgORHOYseSfV23e/89pnw3V9PIO/4QA/6HEBP7icsSlMb4qiAOMf6wdE
JbPVf4hkYfDmBKcFuWeWKAdz94I/Xcov2/0XoCc/qOFEhhlAvxrFm+KzI/Xjr30=
=EpK7
-END PGP SIGNATURE-




Re: [O] [bug] ox-taskjuggler

2015-01-22 Thread Søren Mikkelsen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2015-01-22 11:21, Christian Egli wrote:
 Søren Mikkelsen so...@aamikkelsen.dk writes:
 
 It would, however, make sense to be able to scheduled tasks
 where interpreted as the start time, if the org-file is used for
 more than just generating the report.
 
 I agree that it would make sense to use the scheduled date as the
 start time. The same is probably true for DEADLINES as well. IIRC
 there was a patch once for deadlines which I never managed to
 integrate.
 
 Anyway what you would like doesn't seem very hard to implement:
 Just add another statement to the (let*) of
 org-taskjuggler--build-task where you get the start time using the
 org-taskjuggler-get-start function. Then just insert the start time
 in the (concat) statement maybe right after (and priority (format 
 priority %s\n priority))
 
 Let me know if you need any help
 
 Thanks Christian
 

Thanks for suggestions. Well, even though I used emacs for quite some
time my elisp programmering skills are on a very basic level, so I'll
need some help.

I've added

(starttime (org-taskjuggler-get-start task)) in the let*

and

(and starttime (format   start %s\n starttime)) after priority.

It works, but only for tasks that aren't having a start attribute. It
is possible to give a warning if the start attribute already exists
and make the default one, the one specified in the attributes (drawer)?

- -- 
Best regards,
Søren Mikkelsen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUwOVBAAoJECUE7rt2jWDwmKIH/RxqtwTf3WyMelI6BonAIraf
BMF+Y7l+BBXbHDrYiKSW2SDCLuGFrbTaZn95tmom3YXfXAruJQlfe6orOeqPqiBM
0bt1ryvKq5ZdOzeHHFxyJilgHcuCeEtN6LTs1+URvTS4+8N5mnplnzCIGDbTKjiX
M43spWsVWg39vrqQAqQUADQBHiNR/wq5WjRUiFW9cDpAOiDRkz1kwWb/QFkpjjjl
KCa7EP5nQOySBpLjuPwPFUXuKWs7jP3NIxD4Wmsc3huQnCqJcCuTZKTcuLwPa+Co
PGsYwIyoNQM5k/pctCw5XVTkQrK8eFEW/YtEPAqqRp8jmkIaZYXLevLceIWMOqo=
=xdd0
-END PGP SIGNATURE-




Re: [O] [bug] ox-taskjuggler

2015-01-22 Thread Christian Egli
Søren Mikkelsen so...@aamikkelsen.dk writes:

 It would, however, make sense to be able to scheduled tasks where
 interpreted as the start time, if the org-file is used for more than
 just generating the report.

I agree that it would make sense to use the scheduled date as the start
time. The same is probably true for DEADLINES as well. IIRC there was a
patch once for deadlines which I never managed to integrate.

Anyway what you would like doesn't seem very hard to implement: Just add
another statement to the (let*) of org-taskjuggler--build-task where you
get the start time using the org-taskjuggler-get-start function. Then
just insert the start time in the (concat) statement maybe right after
(and priority (format   priority %s\n priority))

Let me know if you need any help

Thanks
Christian

-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




Re: [O] [bug] ox-taskjuggler

2015-01-21 Thread Søren Mikkelsen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2015-01-21 14:31, John Hendy wrote:
 
 On Jan 21, 2015 7:09 AM, Søren Mikkelsen so...@aamikkelsen.dk 
 mailto:so...@aamikkelsen.dk wrote:
 
 On 2015-01-20 22:00, Nicolas Goaziou wrote:
 Hello,
 
 Søren Mikkelsen s...@iha.dk mailto:s...@iha.dk writes:
 
 I'm trying to use the taskjuggler exporter for getting an
 overview
 of my
 project, and it seems to be straight forward if you know a
 bit about Taskjuggler.
 
 However, tasks that are scheduled org-mode like, i.e.,
 
 *** TODO My task SCHEDULED: 2015-01-27 Tue
 
 don't appear in the report. But, if I add a START property it
 will
 appear.
 
 *** TODO My task 2 :PROPERTIES: :start:2015-03-01 :END:
 
 I suspect it has something to do with l462-470:
 
 (defun org-taskjuggler-get-start (item) Return start date
 for task or resource ITEM. ITEM is a headline.  Return value
 is a string or nil if ITEM doesn't have any start date
 defined. (let ((scheduled (org-element-property :scheduled
 item))) (or (and scheduled (org-timestamp-format scheduled
 %Y-%02m-%02d)) (and (memq 'start
 org-taskjuggler-valid-task-attributes) (org-element-property
 :START item)
 
 
 I'm not that experienced in elisp, so I hope someone can help
 me.
 
 There is no bug in the snippet shown.
 
 ox-taskjuggler just doesn't use SCHEDULED to set start
 property for tasks. However, it will use SCHEDULED to set the
 start date for the project.
 
 Note that I don't use Taskjuggler, so I don't know if this is
 the right behaviour or not.
 
 
 Regards,
 
 According to the org mode docs, assigning the start of a task
 should be possible both ways:
 
 http://orgmode.org/worg/exporters/taskjuggler/ox-taskjuggler.html#sec-5


 
Or am I misinterpreting the docs?
 
 
 Well, I wrote that , so you may be correctly interpreting docs
 written by someone who misunderstood!
 
 Perhaps the SCHUDULED property is just for the main project
 container. I don't see it actually used in any examples?
No, not other than the task example I was referring to.
 
 Sorry if the confusion was my fault! John
 -- Best regards, Søren Mikkelsen
 
 
 
It would, however, make sense to be able to scheduled tasks where
interpreted as the start time, if the org-file is used for more than
just generating the report.

- -- 
Best regards,
Søren Mikkelsen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUwKYOAAoJECUE7rt2jWDwZisH/RgMvuzGu8gef7Yw3474yjkV
CIVf1D+DNXQKPv0R596hYhf8GrvSWw87+OvYtsDdcXJ+ueDxycPgrNy+rQbnGBvO
UUjla1QMNtIXMHvRB232cZ91hL50CCI5Mgx5k67PRU9shvfJIA/b0KouZmrmyMna
uUm16IaH3vWVNm/BrQJJi86jhz6uBqF9NBmaefoZxIYd8HAJLg1iQGMaDCxvhwLq
xzQtfQAlUxkVi+rzOwOuYk9U11ixMPzm8h8XFTNo+Uvj8GyVMIs4+ZFRqwQJG7nk
PC/9K4SXcOuBprZZTXX4Y4YKJiSJ6qRH+omjB7TXKtDYK6Atlh4egkw33hyxoak=
=qAfS
-END PGP SIGNATURE-




Re: [O] [bug] ox-taskjuggler

2015-01-21 Thread Søren Mikkelsen
On 2015-01-20 22:00, Nicolas Goaziou wrote:
 Hello,
 
 Søren Mikkelsen s...@iha.dk writes:
 
 I'm trying to use the taskjuggler exporter for getting an overview of my
 project, and it seems to be straight forward if you know a bit about
 Taskjuggler.

 However, tasks that are scheduled org-mode like, i.e.,

 *** TODO My task
   SCHEDULED: 2015-01-27 Tue

 don't appear in the report. But, if I add a START property it will appear.

 *** TODO My task 2
 :PROPERTIES:
 :start:2015-03-01
 :END:

 I suspect it has something to do with l462-470:

 (defun org-taskjuggler-get-start (item)
   Return start date for task or resource ITEM.
 ITEM is a headline.  Return value is a string or nil if ITEM
 doesn't have any start date defined.
   (let ((scheduled (org-element-property :scheduled item)))
 (or
  (and scheduled (org-timestamp-format scheduled %Y-%02m-%02d))
  (and (memq 'start org-taskjuggler-valid-task-attributes)
(org-element-property :START item)


 I'm not that experienced in elisp, so I hope someone can help me.
 
 There is no bug in the snippet shown.
 
  ox-taskjuggler just doesn't use SCHEDULED to set start property for
 tasks. However, it will use SCHEDULED to set the start date for the
 project.
 
 Note that I don't use Taskjuggler, so I don't know if this is the right
 behaviour or not.
 
 
 Regards,
 
According to the org mode docs, assigning the start of a task should be
possible both ways:

http://orgmode.org/worg/exporters/taskjuggler/ox-taskjuggler.html#sec-5

Or am I misinterpreting the docs?

-- 
Best regards,
Søren Mikkelsen




Re: [O] [bug] ox-taskjuggler

2015-01-21 Thread John Hendy
On Jan 21, 2015 7:09 AM, Søren Mikkelsen so...@aamikkelsen.dk wrote:

 On 2015-01-20 22:00, Nicolas Goaziou wrote:
  Hello,
 
  Søren Mikkelsen s...@iha.dk writes:
 
  I'm trying to use the taskjuggler exporter for getting an overview of
my
  project, and it seems to be straight forward if you know a bit about
  Taskjuggler.
 
  However, tasks that are scheduled org-mode like, i.e.,
 
  *** TODO My task
SCHEDULED: 2015-01-27 Tue
 
  don't appear in the report. But, if I add a START property it will
appear.
 
  *** TODO My task 2
  :PROPERTIES:
  :start:2015-03-01
  :END:
 
  I suspect it has something to do with l462-470:
 
  (defun org-taskjuggler-get-start (item)
Return start date for task or resource ITEM.
  ITEM is a headline.  Return value is a string or nil if ITEM
  doesn't have any start date defined.
(let ((scheduled (org-element-property :scheduled item)))
  (or
   (and scheduled (org-timestamp-format scheduled %Y-%02m-%02d))
   (and (memq 'start org-taskjuggler-valid-task-attributes)
 (org-element-property :START item)
 
 
  I'm not that experienced in elisp, so I hope someone can help me.
 
  There is no bug in the snippet shown.
 
   ox-taskjuggler just doesn't use SCHEDULED to set start property for
  tasks. However, it will use SCHEDULED to set the start date for the
  project.
 
  Note that I don't use Taskjuggler, so I don't know if this is the right
  behaviour or not.
 
 
  Regards,
 
 According to the org mode docs, assigning the start of a task should be
 possible both ways:

 http://orgmode.org/worg/exporters/taskjuggler/ox-taskjuggler.html#sec-5

 Or am I misinterpreting the docs?


Well, I wrote that , so you may be correctly interpreting docs written by
someone who misunderstood!

Perhaps the SCHUDULED property is just for the main project container. I
don't see it actually used in any examples?

Sorry if the confusion was my fault!
John
 --
 Best regards,
 Søren Mikkelsen




[O] [bug] ox-taskjuggler

2015-01-20 Thread Søren Mikkelsen
I'm trying to use the taskjuggler exporter for getting an overview of my
project, and it seems to be straight forward if you know a bit about
Taskjuggler.

However, tasks that are scheduled org-mode like, i.e.,

*** TODO My task
  SCHEDULED: 2015-01-27 Tue

don't appear in the report. But, if I add a START property it will appear.

*** TODO My task 2
:PROPERTIES:
:start:2015-03-01
:END:

I suspect it has something to do with l462-470:

(defun org-taskjuggler-get-start (item)
  Return start date for task or resource ITEM.
ITEM is a headline.  Return value is a string or nil if ITEM
doesn't have any start date defined.
  (let ((scheduled (org-element-property :scheduled item)))
(or
 (and scheduled (org-timestamp-format scheduled %Y-%02m-%02d))
 (and (memq 'start org-taskjuggler-valid-task-attributes)
  (org-element-property :START item)


I'm not that experienced in elisp, so I hope someone can help me.

Best regards,
Søren




Re: [O] [bug] ox-taskjuggler

2015-01-20 Thread Nicolas Goaziou
Hello,

Søren Mikkelsen s...@iha.dk writes:

 I'm trying to use the taskjuggler exporter for getting an overview of my
 project, and it seems to be straight forward if you know a bit about
 Taskjuggler.

 However, tasks that are scheduled org-mode like, i.e.,

 *** TODO My task
   SCHEDULED: 2015-01-27 Tue

 don't appear in the report. But, if I add a START property it will appear.

 *** TODO My task 2
 :PROPERTIES:
 :start:2015-03-01
 :END:

 I suspect it has something to do with l462-470:

 (defun org-taskjuggler-get-start (item)
   Return start date for task or resource ITEM.
 ITEM is a headline.  Return value is a string or nil if ITEM
 doesn't have any start date defined.
   (let ((scheduled (org-element-property :scheduled item)))
 (or
  (and scheduled (org-timestamp-format scheduled %Y-%02m-%02d))
  (and (memq 'start org-taskjuggler-valid-task-attributes)
 (org-element-property :START item)


 I'm not that experienced in elisp, so I hope someone can help me.

There is no bug in the snippet shown.

 ox-taskjuggler just doesn't use SCHEDULED to set start property for
tasks. However, it will use SCHEDULED to set the start date for the
project.

Note that I don't use Taskjuggler, so I don't know if this is the right
behaviour or not.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] ox-taskjuggler: unable to use depends {gapduration}

2014-11-06 Thread Christian Egli
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Nicolas, I can push this myself but I haven't pushed to the repo in
 years. What is the current way? Do I just push to master?

 I think you should push to maint, so that users of org+contrib package
 can benefit from your fix soon enough.  You then need to merge maint
 into master.

OK, the fix is pushed to maint and merged to master.

Thanks
Christian

-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




Re: [O] [BUG] ox-taskjuggler: unable to use depends {gapduration}

2014-11-06 Thread Nicolas Goaziou
Christian Egli christian.e...@sbs.ch writes:

 OK, the fix is pushed to maint and merged to master.

Thank you.

As a side note, two spaces after sentences are required in commit
messages.


Regards,



Re: [O] [BUG] ox-taskjuggler: unable to use depends {gapduration}

2014-11-05 Thread Christian Egli
John Hendy jw.he...@gmail.com writes:

 I ran into an odd issue with a taskjuggler task tree I'm working on
 when trying to apply a gapduration attribute to a task dependency.
 Typically, I can just pass any valid taskjuggler attribute through
 using properties, but my export was producing an error when trying to
 use:

 :depends: task {gapduration 1h}

 Oddly, the output is as follows (task section):

 #+begin_src test.tjp

 task test test {
   task task1 task1 {
 milestone
 start 2014-11-05-08:00
   }
   task task2 task2 {
 depends !task1 t :taskjuggl
 duration 1h
   }
 #+end_src

 For some reason it's grabbing the taskjuggler tag! I tried with the
 example in ox-taskjuggler.el with the same result.

 Is this a bug or am I mis-interpreting how this would work?

No it is indeed a bug. At first I thought this was simply no longer
working in the new exporter but I was wrong. Nicolas of course
implemented it and way more. But there is a subtle bug. I actually found
it because I wondered about the funny t :taskjuggl in the output.
Here's the fix.

diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 807d702..9e977f6 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -600,7 +600,7 @@ doesn't include leading \depends\.
   (let ((id (org-element-property :TASK_ID dep)))
 (and id
  (string-match (concat id  +\\({.*?}\\)) dep-str)
- (org-match-string-no-properties 1
+ (org-match-string-no-properties 1 dep-str
  path)
  ;; Compute number of exclamation marks by looking for the
  ;; common ancestor between TASK and DEP.

Nicolas, I can push this myself but I haven't pushed to the repo in
years. What is the current way? Do I just push to master?

Thanks
Christian
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




Re: [O] [BUG] ox-taskjuggler: unable to use depends {gapduration}

2014-11-05 Thread Nicolas Goaziou
Hello,

Christian Egli christian.e...@sbs.ch writes:

 No it is indeed a bug. At first I thought this was simply no longer
 working in the new exporter but I was wrong. Nicolas of course
 implemented it and way more. But there is a subtle bug. I actually found
 it because I wondered about the funny t :taskjuggl in the output.
 Here's the fix.

 diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
 index 807d702..9e977f6 100644
 --- a/contrib/lisp/ox-taskjuggler.el
 +++ b/contrib/lisp/ox-taskjuggler.el
 @@ -600,7 +600,7 @@ doesn't include leading \depends\.
  (let ((id (org-element-property :TASK_ID dep)))
(and id
 (string-match (concat id  +\\({.*?}\\)) dep-str)
 -   (org-match-string-no-properties 1
 +   (org-match-string-no-properties 1 dep-str
 path)
 ;; Compute number of exclamation marks by looking for the
 ;; common ancestor between TASK and DEP.

 Nicolas, I can push this myself but I haven't pushed to the repo in
 years. What is the current way? Do I just push to master?

I think you should push to maint, so that users of org+contrib package
can benefit from your fix soon enough.  You then need to merge maint
into master.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] ox-taskjuggler: unable to use depends {gapduration}

2014-11-05 Thread John Hendy
On Wed, Nov 5, 2014 at 2:21 AM, Christian Egli christian.e...@sbs.ch wrote:
 John Hendy jw.he...@gmail.com writes:

 I ran into an odd issue with a taskjuggler task tree I'm working on
 when trying to apply a gapduration attribute to a task dependency.
 Typically, I can just pass any valid taskjuggler attribute through
 using properties, but my export was producing an error when trying to
 use:

 :depends: task {gapduration 1h}

 Oddly, the output is as follows (task section):

 #+begin_src test.tjp

 task test test {
   task task1 task1 {
 milestone
 start 2014-11-05-08:00
   }
   task task2 task2 {
 depends !task1 t :taskjuggl
 duration 1h
   }
 #+end_src

 For some reason it's grabbing the taskjuggler tag! I tried with the
 example in ox-taskjuggler.el with the same result.

 Is this a bug or am I mis-interpreting how this would work?

 No it is indeed a bug. At first I thought this was simply no longer
 working in the new exporter but I was wrong. Nicolas of course
 implemented it and way more. But there is a subtle bug. I actually found
 it because I wondered about the funny t :taskjuggl in the output.
 Here's the fix.

 diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
 index 807d702..9e977f6 100644
 --- a/contrib/lisp/ox-taskjuggler.el
 +++ b/contrib/lisp/ox-taskjuggler.el
 @@ -600,7 +600,7 @@ doesn't include leading \depends\.
(let ((id (org-element-property :TASK_ID dep)))
  (and id
   (string-match (concat id  +\\({.*?}\\)) dep-str)
 - (org-match-string-no-properties 1
 + (org-match-string-no-properties 1 dep-str
   path)
   ;; Compute number of exclamation marks by looking for the
   ;; common ancestor between TASK and DEP.


For some reason, I couldn't apply the patch... since it was just one
line, I manually changed it myself and can report that this appears to
work now. I re-added the {gapduration x} lines to my :depends:
properties and they're being properly applied now.

Thanks a ton for the quick turnaround!

If/when you apply this, could you post back and I'll checkout a fresh
version of ox-taskjuggler to take the official commit?


Best regards,
John

 Nicolas, I can push this myself but I haven't pushed to the repo in
 years. What is the current way? Do I just push to master?

 Thanks
 Christian
 --
 Christian Egli
 Swiss Library for the Blind, Visually Impaired and Print Disabled
 Grubenstrasse 12, CH-8045 Zürich, Switzerland





[O] [BUG] ox-taskjuggler: unable to use depends {gapduration}

2014-11-04 Thread John Hendy
I ran into an odd issue with a taskjuggler task tree I'm working on
when trying to apply a gapduration attribute to a task dependency.
Typically, I can just pass any valid taskjuggler attribute through
using properties, but my export was producing an error when trying to
use:

:depends: task {gapduration 1h}

I checked ox-taskjuggler to see if gapduration was not an acceptable
attribute, but it actually references it specifically:

#+begin_quote ox-taskjuggler.el
;; * Dependencies
;;
;; The exporter will handle dependencies that are defined in the tasks...

;; [snip]

;; ;; * Presentation
;;   :PROPERTIES:
;;   :Effort:   2d
;;   :BLOCKER:  training_material { gapduration 1d } some_other_task
;;   :END:
#+end_quote

Here's my example:

#+begin_src min-config
(add-to-list 'load-path ~/.elisp/org.git/lisp/)
(add-to-list 'load-path ~/.elisp/org.git/contrib/lisp)

(require 'ox-taskjuggler)
#+end_src


#+begin_src test.org

* test :taskjuggler_project:
** task1
   :PROPERTIES:
   :task_id:  task1
   :start:2014-11-05-08:00
   :END:
** task2
   :PROPERTIES:
   :task_id:  task2
   :BLOCKER:  task1 { gapduration 1d }
   :duration: 1h
   :END:

#+end_src

Oddly, the output is as follows (task section):

#+begin_src test.tjp

task test test {
  task task1 task1 {
milestone
start 2014-11-05-08:00
  }
  task task2 task2 {
depends !task1 t :taskjuggl
duration 1h
  }
#+end_src

For some reason it's grabbing the taskjuggler tag! I tried with the
example in ox-taskjuggler.el with the same result.

M-x org-version
Org-mode version 8.3beta (release_8.3beta-483-g58bb3a.dirty @
/home/jwhendy/.elisp/org.git/lisp/)

Is this a bug or am I mis-interpreting how this would work?


Thanks,
John



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-03 Thread John Hendy
On Sun, Nov 2, 2014 at 5:25 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 John Hendy jw.he...@gmail.com writes:

 Thanks for the explanation. I pretty much only use duration, which has
 never had an issue. As a fluke I used effort and noticed the big
 difference. Thanks for illuminating the situation!

 Actually, I was slightly wrong. According to
 `org-duration-string-to-minutes' and `org-effort-durations' docstrings,
 Org accepts modifiers for numbers. IOW

   :Effort: 3d

 is a valid value in Org.

 The real problem is that min is not recognized as a valid modifier,
 since 30min is basically the same as 30 or 0:30.

 I changed `org-effort-durations' default value to include min as
 a modifier, which will make your original example work.

Awesome -- thanks a ton!


John



 Regards,



[O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread John Hendy
I ran into an error with a 30min task which used the :effort: property
to set this duration. Upon compilation, I noted the warning:
```
file.tjp:10: Warning: 400.0d of effort of task one does not fit into
the project time frame.
Warning: 1 tasks could not be scheduled
```

I looked at the .tjp file, and 30min had been converted to 4800.0
hours. I was able to reproduce with the following setup:

#+begin_src min-config
  (add-to-list 'load-path ~/.elisp/org.git/contrib/lisp/)
  (require 'ox-taskjuggler)
#+end_src

emacs -Q
M-x load-file ~/path/to/min-config

#+begin_src tj-time-test.org

* Project :taskjuggler_project:
** task1-effort-min
   :PROPERTIES:
   :start:2014-11-01
   :effort:   30min
   :allocate: jwhendy
   :END:
** task2-duration-min
   :PROPERTIES:
   :duration: 30min
   :allocate: jwhendy
   :blocker:  previous-sibling
   :END:

#+end_src

Exported this via =C-e J j=; report section omitted below.

#+begin_src tj-time-test.tjp

project nil Project 1.0 2014-11-02 +280d {
}
shift s40 Part time shift {
  workinghours wed, thu, fri off
}
resource jwhendy  {
}
task project Project {
  task task1_effort_min task1-effort-min {
purge allocate
allocate jwhendy
effort 4800.0h
start 2014-11-01
  }
  task task2_duration_min task2-duration-min {
depends !task1_effort_min
purge allocate
allocate jwhendy
duration 30min
  }
}

#+end_src

Note the effort vs. duration time processing.

I tried the property :Effort: instead, as that's used in Worg and I
wondered if it was built-in (even though any tj attribute should be
able to be passed through a property) and got the same result.

From what I can tell, effort/duration/length all have the same
definition structure:
- http://www.taskjuggler.org/tj3/manual/effort.html
- http://www.taskjuggler.org/tj3/manual/duration.html


Thanks for any feedback or requests for more info.


John



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread Nicolas Goaziou
Hello,

John Hendy jw.he...@gmail.com writes:

 I ran into an error with a 30min task which used the :effort: property
 to set this duration. Upon compilation, I noted the warning:
 ```
 file.tjp:10: Warning: 400.0d of effort of task one does not fit into
 the project time frame.
 Warning: 1 tasks could not be scheduled
 ```

 I looked at the .tjp file, and 30min had been converted to 4800.0
 hours. I was able to reproduce with the following setup:

 #+begin_src min-config
   (add-to-list 'load-path ~/.elisp/org.git/contrib/lisp/)
   (require 'ox-taskjuggler)
 #+end_src

 emacs -Q M-x load-file ~/path/to/min-config

 #+begin_src tj-time-test.org

 * Project :taskjuggler_project:
 ** task1-effort-min
:PROPERTIES:
:start:2014-11-01
:effort:   30min
:allocate: jwhendy
:END:
 ** task2-duration-min
:PROPERTIES:
:duration: 30min
:allocate: jwhendy
:blocker:  previous-sibling
:END:

 #+end_src


EFFORT is a special property in Org (i.e., it is not specific to
taskjuggler). It expects HH:MM format. So, you should set it to

  :Effort: 00:30

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread John Hendy
On Sun, Nov 2, 2014 at 4:47 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Hello,

 John Hendy jw.he...@gmail.com writes:

 I ran into an error with a 30min task which used the :effort: property
 to set this duration. Upon compilation, I noted the warning:
 ```
 file.tjp:10: Warning: 400.0d of effort of task one does not fit into
 the project time frame.
 Warning: 1 tasks could not be scheduled
 ```

 I looked at the .tjp file, and 30min had been converted to 4800.0
 hours. I was able to reproduce with the following setup:

 #+begin_src min-config
   (add-to-list 'load-path ~/.elisp/org.git/contrib/lisp/)
   (require 'ox-taskjuggler)
 #+end_src

 emacs -Q M-x load-file ~/path/to/min-config

 #+begin_src tj-time-test.org

 * Project :taskjuggler_project:
 ** task1-effort-min
:PROPERTIES:
:start:2014-11-01
:effort:   30min
:allocate: jwhendy
:END:
 ** task2-duration-min
:PROPERTIES:
:duration: 30min
:allocate: jwhendy
:blocker:  previous-sibling
:END:

 #+end_src


 EFFORT is a special property in Org (i.e., it is not specific to
 taskjuggler). It expects HH:MM format. So, you should set it to

   :Effort: 00:30


That mostly makes sense. Org's not case-sensitive, correct? I was
looking at the [granted, outdated] taskjuggler documentation and it
features estimates in days (i.e. 10d):
- http://orgmode.org/worg/org-tutorials/org-taskjuggler.html

Is this recent (as in post-writing of that worg page)? Or are there
other formats that could be accepted? It's unfortunate that org and
taskjuggler overlap on this, as ideally one could pass any tj
attribute as a property and it'd do the right thing. I see why the
issue exists now.

So if I want to estimate a task taking 10 days, I need to input 80:00?


Best regards,
John

 Regards,

 --
 Nicolas Goaziou



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread Nicolas Goaziou
John Hendy jw.he...@gmail.com writes:

 That mostly makes sense. Org's not case-sensitive, correct?

Correct.

 I was looking at the [granted, outdated] taskjuggler documentation and
 it features estimates in days (i.e. 10d): -
 http://orgmode.org/worg/org-tutorials/org-taskjuggler.html

 Is this recent (as in post-writing of that worg page)?

I cannot remember.

 Or are there other formats that could be accepted?

Not at the moment, since ox-taskjuggler.el hardcodes

  (org-duration-string-to-minutes effort)

 It's unfortunate that org and taskjuggler overlap on this, as ideally
 one could pass any tj attribute as a property and it'd do the right
 thing. I see why the issue exists now.

 So if I want to estimate a task taking 10 days, I need to input 80:00?

For now yes.

The code could be improved, however. I.e, if effort matches 

  \\`[0-9]+:[0-5][0-9]\\'

use `org-duration-string-to-minutes', otherwise insert it as-is.


Regards,



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread John Hendy
On Sun, Nov 2, 2014 at 5:01 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 John Hendy jw.he...@gmail.com writes:

 That mostly makes sense. Org's not case-sensitive, correct?

 Correct.

 I was looking at the [granted, outdated] taskjuggler documentation and
 it features estimates in days (i.e. 10d): -
 http://orgmode.org/worg/org-tutorials/org-taskjuggler.html

 Is this recent (as in post-writing of that worg page)?

 I cannot remember.

 Or are there other formats that could be accepted?

 Not at the moment, since ox-taskjuggler.el hardcodes

   (org-duration-string-to-minutes effort)

 It's unfortunate that org and taskjuggler overlap on this, as ideally
 one could pass any tj attribute as a property and it'd do the right
 thing. I see why the issue exists now.

 So if I want to estimate a task taking 10 days, I need to input 80:00?

 For now yes.

 The code could be improved, however. I.e, if effort matches

   \\`[0-9]+:[0-5][0-9]\\'

 use `org-duration-string-to-minutes', otherwise insert it as-is.

Thanks for the explanation. I pretty much only use duration, which has
never had an issue. As a fluke I used effort and noticed the big
difference. Thanks for illuminating the situation!


John



 Regards,



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread Nicolas Goaziou
John Hendy jw.he...@gmail.com writes:

 Thanks for the explanation. I pretty much only use duration, which has
 never had an issue. As a fluke I used effort and noticed the big
 difference. Thanks for illuminating the situation!

Actually, I was slightly wrong. According to
`org-duration-string-to-minutes' and `org-effort-durations' docstrings,
Org accepts modifiers for numbers. IOW

  :Effort: 3d

is a valid value in Org.

The real problem is that min is not recognized as a valid modifier,
since 30min is basically the same as 30 or 0:30.

I changed `org-effort-durations' default value to include min as
a modifier, which will make your original example work.


Regards,



[O] Bug: ox-taskjuggler ignores SCHEDULED attribute [8.2.6 (8.2.6-47-ge3d2c1-elpa @ /home/anakreontas/.emacs.d/elpa/org-20140526/)]

2014-05-28 Thread Anakreontas Mentis
When exporting the attached file to task juggler, the SCHEDULED
attribute is not included in the generated file as a start attribute.

The export process is invoked with the key sequence C-c C-e J j 

* Project A :taskjuggler_project:  
:PROPERTIES:
:leaves_holiday: Ascension Day 2014-05-29
:leaves_holiday: Whit Monday 2014-06-9
:leaves_holiday: Bastille Day 2014-07-14
:leaves_holiday: Assumption of Mary 2014-08-15
:leaves_holiday: Armistice Day 2014-11-11
:leaves_holiday: Christmas Eve 2014-12-24
:leaves_holiday: Christmas Day 2014-12-25
:leaves_holiday: St Stephen's Day 2014-12-26
:leaves_holiday: New Year's Eve 2014-12-31
:start: 2014-05-05
:END:
*** DONE Cluster communication
CLOSED: [2014-05-27 Tue 17:28]
- CLOSING NOTE [2014-05-27 Tue 17:28] \\
  Specified communication protocol.
*** TODO Model task allocation
SCHEDULED: 2014-06-18 Wed
:PROPERTIES:
:Effort:   1w
:allocate: dev
:task_id: modelalloc
:BLOCKER:  previous-sibling
# :start: 2014-05-30
:END:
* Resources:taskjuggler_resource:
** Developer
  :PROPERTIES:
  :resource_id: dev
  :resource_email: d...@mail.org
  :END:




Emacs  : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu)
 of 2014-05-15 on trouble, modified by Debian
Package: Org-mode version 8.2.6 (8.2.6-47-ge3d2c1-elpa @ 
/home/anakreontas/.emacs.d/elpa/org-20140526/)

current state:
==
(setq
 org-hide-leading-stars t
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-log-done 'note
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-export-date-timestamp-format nil
 org-pretty-entities t
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file ~/agenda/notes.org
 org-todo-keyword-faces '((TODO :foreground DarkOrange1 :weight bold) 
(DONE :foreground light sea green)
  (DELIGATE :foreground cyan) (CANCELLED 
:foreground forest green)
  (WAIT :foreground Red) (RESPOND :foreground 
sea green)
  (FEEDBACK :foreground blue))
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-from-is-user-regexp \\anakreontas\\
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-export-copy-to-kill-ring 'if-interactive
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all 
append local] 5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
flyspell-mode)
 org-export-with-tags t
 org-use-speed-commands t
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-hide-inline-tasks
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-export-with-drawers '(not LOGBOOK)
 org-modules '(org-bbdb org-bibtex org-info org-jsinfo org-irc org-w3m)
 org-babel-tangle-lang-exts '((latex . tex) (haskell . hs) (C++ . 
cpp) (emacs-lisp . el))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'ignore
 org-babel-load-languages '((emacs-lisp . t) (C . t) (haskell . t) (latex . t))
 org-html-format-inlinetask-function 'ignore
 org-agenda-files '(~/agenda/manycore.org ~/agenda/notes.org)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )