* [BUG] ox-taskjuggler: unable to use depends {gapduration}
@ 2014-11-05 6:39 John Hendy
2014-11-05 8:21 ` Christian Egli
0 siblings, 1 reply; 6+ messages in thread
From: John Hendy @ 2014-11-05 6:39 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] ox-taskjuggler: unable to use depends {gapduration}
2014-11-05 6:39 [BUG] ox-taskjuggler: unable to use depends {gapduration} John Hendy
@ 2014-11-05 8:21 ` Christian Egli
2014-11-05 13:27 ` Nicolas Goaziou
2014-11-06 0:41 ` John Hendy
0 siblings, 2 replies; 6+ messages in thread
From: Christian Egli @ 2014-11-05 8:21 UTC (permalink / raw)
To: emacs-orgmode
John Hendy <jw.hendy@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [BUG] ox-taskjuggler: unable to use depends {gapduration}
2014-11-05 8:21 ` Christian Egli
@ 2014-11-05 13:27 ` Nicolas Goaziou
2014-11-06 8:19 ` Christian Egli
2014-11-06 0:41 ` John Hendy
1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2014-11-05 13:27 UTC (permalink / raw)
To: Christian Egli; +Cc: emacs-orgmode
Hello,
Christian Egli <christian.egli@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] ox-taskjuggler: unable to use depends {gapduration}
2014-11-05 8:21 ` Christian Egli
2014-11-05 13:27 ` Nicolas Goaziou
@ 2014-11-06 0:41 ` John Hendy
1 sibling, 0 replies; 6+ messages in thread
From: John Hendy @ 2014-11-06 0:41 UTC (permalink / raw)
To: Christian Egli; +Cc: emacs-orgmode
On Wed, Nov 5, 2014 at 2:21 AM, Christian Egli <christian.egli@sbs.ch> wrote:
> John Hendy <jw.hendy@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
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] ox-taskjuggler: unable to use depends {gapduration}
2014-11-05 13:27 ` Nicolas Goaziou
@ 2014-11-06 8:19 ` Christian Egli
2014-11-06 17:33 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: Christian Egli @ 2014-11-06 8:19 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] ox-taskjuggler: unable to use depends {gapduration}
2014-11-06 8:19 ` Christian Egli
@ 2014-11-06 17:33 ` Nicolas Goaziou
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2014-11-06 17:33 UTC (permalink / raw)
To: Christian Egli; +Cc: emacs-orgmode
Christian Egli <christian.egli@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,
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-06 17:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 6:39 [BUG] ox-taskjuggler: unable to use depends {gapduration} John Hendy
2014-11-05 8:21 ` Christian Egli
2014-11-05 13:27 ` Nicolas Goaziou
2014-11-06 8:19 ` Christian Egli
2014-11-06 17:33 ` Nicolas Goaziou
2014-11-06 0:41 ` John Hendy
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).