* [PATCH 0/8] A bunch of fixes for contrib/ox-taskjuggler.el
@ 2015-11-09 22:35 Kosyrev Serge
2015-11-08 10:12 ` [PATCH 1/8] ox-taskjuggler.el: allow direct 'leaves' specification Kosyrev Serge
0 siblings, 1 reply; 4+ messages in thread
From: Kosyrev Serge @ 2015-11-09 22:35 UTC (permalink / raw)
To: emacs-orgmode
Good evening, folks!
This is a bunch of solutions for the most direct obstacles that
I encountered, mostly additions of direct Org-property -> TJ-attribute
export pathways.
Kosyrev Serge (8):
ox-taskjuggler.el: allow direct 'leaves' specification
ox-taskjuggler.el: factor 'org-export-map-special-nodes'
ox-taskjuggler.el: :POST-INCLUDES lists files to include post-section
ox-taskjuggler.el: :PROJECT-{END,DURATION} project attribute
ox-taskjuggler.el: add 'org-taskjuggler-multivalued-property'
ox-taskjuggler.el: interpret 'allocate' as a multivalued-property
ox-taskjuggler.el: allow 'priority' to be a directly-specified
integer
ox-taskjuggler.el: allow trimming the task ID from its title
contrib/lisp/ox-taskjuggler.el | 122 +++++++++++++++++++++++++++++------------
1 file changed, 88 insertions(+), 34 deletions(-)
--
2.5.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/8] ox-taskjuggler.el: allow direct 'leaves' specification
2015-11-09 22:35 [PATCH 0/8] A bunch of fixes for contrib/ox-taskjuggler.el Kosyrev Serge
@ 2015-11-08 10:12 ` Kosyrev Serge
2015-11-08 10:13 ` [PATCH 2/8] ox-taskjuggler.el: factor 'org-export-map-special-nodes' Kosyrev Serge
0 siblings, 1 reply; 4+ messages in thread
From: Kosyrev Serge @ 2015-11-08 10:12 UTC (permalink / raw)
To: emacs-orgmode
* ox-taskjuggler.el (org-taskjuggler-valid-resource-attributes): add leaves
to the list of valid resource attributes
---
contrib/lisp/ox-taskjuggler.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index cfb28f2..ce4a8ab 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -327,7 +327,7 @@ list."
:group 'org-export-taskjuggler)
(defcustom org-taskjuggler-valid-resource-attributes
- '(limits vacation shift booking efficiency journalentry rate
+ '(limits leaves vacation shift booking efficiency journalentry rate
workinghours flags)
"Valid attributes for Taskjuggler resources.
If one of these appears as a property for a headline, it will be
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/8] ox-taskjuggler.el: factor 'org-export-map-special-nodes'
2015-11-08 10:12 ` [PATCH 1/8] ox-taskjuggler.el: allow direct 'leaves' specification Kosyrev Serge
@ 2015-11-08 10:13 ` Kosyrev Serge
2015-11-12 16:42 ` Rasmus
0 siblings, 1 reply; 4+ messages in thread
From: Kosyrev Serge @ 2015-11-08 10:13 UTC (permalink / raw)
To: emacs-orgmode
* ox-taskjuggler.el (org-taskjuggler-map-special-nodes):
new function to capture mapping over tagged special nodes.
(org-taskjuggler-project-plan): factor to use the new function.
---
contrib/lisp/ox-taskjuggler.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index ce4a8ab..2cf2c78 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -625,6 +625,12 @@ doesn't include leading \"depends\"."
;;; Translator Functions
+(defun org-taskjuggler-map-special-nodes (tag tree f)
+ (org-element-map tree 'headline
+ (lambda (hl)
+ (and (member tag (org-export-get-tags hl info))
+ (funcall f hl)))
+ info nil 'headline))
(defun org-taskjuggler-project-plan (contents info)
"Build TaskJuggler project plan.
@@ -647,13 +653,10 @@ Return complete project plan as a string in TaskJuggler syntax."
;; `org-taskjuggler-resource-tag'. Only gather top level
;; resources.
(apply 'append
- (org-element-map tree 'headline
- (lambda (hl)
- (and (member org-taskjuggler-resource-tag
- (org-export-get-tags hl info))
- (org-element-map (org-element-contents hl) 'headline
- 'identity info nil 'headline)))
- info nil 'headline))))
+ (org-taskjuggler-map-special-nodes
+ org-taskjuggler-resource-tag tree
+ (lambda (hl) (org-element-map (org-element-contents hl) 'headline
+ 'identity info nil 'headline))))))
;; Assign a unique ID to each resource. Store it under
;; `:taskjuggler-unique-ids' property in INFO.
(setq info
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/8] ox-taskjuggler.el: factor 'org-export-map-special-nodes'
2015-11-08 10:13 ` [PATCH 2/8] ox-taskjuggler.el: factor 'org-export-map-special-nodes' Kosyrev Serge
@ 2015-11-12 16:42 ` Rasmus
0 siblings, 0 replies; 4+ messages in thread
From: Rasmus @ 2015-11-12 16:42 UTC (permalink / raw)
To: emacs-orgmode
Kosyrev Serge <_deepfire@feelingofgreen.ru> writes:
> * ox-taskjuggler.el (org-taskjuggler-map-special-nodes):
> new function to capture mapping over tagged special nodes.
> (org-taskjuggler-project-plan): factor to use the new function.
> ;;; Translator Functions
> +(defun org-taskjuggler-map-special-nodes (tag tree f)
> + (org-element-map tree 'headline
> + (lambda (hl)
> + (and (member tag (org-export-get-tags hl info))
Should it look care about case? Otherwise member-ignore-case.
> + (funcall f hl)))
> + info nil 'headline))
> (defun org-taskjuggler-project-plan (contents info)
> "Build TaskJuggler project plan.
> @@ -647,13 +653,10 @@ Return complete project plan as a string in TaskJuggler syntax."
> ;; `org-taskjuggler-resource-tag'. Only gather top level
> ;; resources.
> (apply 'append
> - (org-element-map tree 'headline
> - (lambda (hl)
> - (and (member org-taskjuggler-resource-tag
> - (org-export-get-tags hl info))
> - (org-element-map (org-element-contents hl) 'headline
> - 'identity info nil 'headline)))
> - info nil 'headline))))
> + (org-taskjuggler-map-special-nodes
> + org-taskjuggler-resource-tag tree
> + (lambda (hl) (org-element-map (org-element-contents hl) 'headline
> + 'identity info nil 'headline))))))
Do you need org-taskjuggler-map-special-nodes elsewhere (sorry, I can’t
keep all of your patches in mind at the same time)?
Rasmus
--
ツ
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-12 16:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 22:35 [PATCH 0/8] A bunch of fixes for contrib/ox-taskjuggler.el Kosyrev Serge
2015-11-08 10:12 ` [PATCH 1/8] ox-taskjuggler.el: allow direct 'leaves' specification Kosyrev Serge
2015-11-08 10:13 ` [PATCH 2/8] ox-taskjuggler.el: factor 'org-export-map-special-nodes' Kosyrev Serge
2015-11-12 16:42 ` Rasmus
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).