emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH 2/8] ox-taskjuggler.el: factor 'org-export-map-special-nodes'
Date: Thu, 12 Nov 2015 17:42:51 +0100	[thread overview]
Message-ID: <87ziyjjhis.fsf@gmx.us> (raw)
In-Reply-To: 87twoulrqy.fsf_-_@feelingofgreen.ru

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

-- 
ツ

      reply	other threads:[~2015-11-12 16:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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=87ziyjjhis.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).