emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Baptiste <bateast@bat.fr.eu.org>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Taskjuggler export deals badly with first parent match
Date: Fri, 19 Apr 2013 11:32:50 +0200	[thread overview]
Message-ID: <87ehe6q30d.fsf@gmail.com> (raw)
In-Reply-To: <87k3nyaoj4.fsf@bat.fr.eu.org> (Baptiste's message of "Fri, 19 Apr 2013 10:54:41 +0200")

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hello,

Baptiste <bateast@bat.fr.eu.org> writes:

> I found ox-taskjuggler broken in /task_id/ identification when it is
> non trivial.

Oops. It looks like I made a typo. Thank you for reporting it.

Would the following patch solve the problem?


Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-taskjuggler.el-Fix-dependecies-string.patch --]
[-- Type: text/x-patch, Size: 1491 bytes --]

From 0b0b9ab98657145cddb20fc6ffd45414a7f23d83 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Fri, 19 Apr 2013 11:30:49 +0200
Subject: [PATCH] ox-taskjuggler.el: Fix dependecies string

* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-format-dependencies):
  Fix dependecies string.
---
 contrib/lisp/ox-taskjuggler.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 16f0e8d..76e0182 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -544,7 +544,7 @@ doesn't include leading \"depends\"."
         (get-path
          (lambda (dep)
            ;; Return path to DEP relatively to TASK.
-           (let ((parent (org-export-get-parent dep))
+           (let ((parent (org-export-get-parent task))
                  (exclamations 1)
                  (option
                   (let ((id (org-element-property :TASK_ID dep)))
@@ -555,7 +555,7 @@ doesn't include leading \"depends\"."
              ;; Compute number of exclamation marks by looking for the
 	     ;; common ancestor between TASK and DEP.
              (while (not (org-element-map parent 'headline
-                           (lambda (hl) (eq hl task))))
+                           (lambda (hl) (eq hl dep))))
                (incf exclamations)
                (setq parent (org-export-get-parent parent)))
              ;; Build path from DEP to PARENT.
-- 
1.8.2.1


  reply	other threads:[~2013-04-19  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  8:54 Taskjuggler export deals badly with first parent match Baptiste
2013-04-19  9:32 ` Nicolas Goaziou [this message]
2013-04-19 11:20   ` Baptiste
2013-04-19 11:21   ` Baptiste

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=87ehe6q30d.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=bateast@bat.fr.eu.org \
    --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).