emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Egli <christian.egli@sbs.ch>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH 1/5] Add some minimal infrastructure to handle export to both tj2 and tj3
Date: Thu, 17 Mar 2011 11:39:30 +0100	[thread overview]
Message-ID: <87mxkum3od.fsf@sbs.ch> (raw)
In-Reply-To: <871v26qg0t.fsf@gnu.org>

Bastien <bzg@altern.org> writes:

> Christian Egli <christian.egli@alumni.ethz.ch> writes:
>
>> +(defun org-taskjuggler-targeting-tj3-p ()
>> +  "Return true if we are targeting TaskJuggler III."
>> +  (< org-export-taskjuggler-target-version 3.0))
>
> I'm dubious on this one.
>
> Shouldn't it be 
>
> #+begin_src emacs-lisp
> (defun org-taskjuggler-targeting-tj3-p ()
>   "Return true if we are targeting TaskJuggler III."
>   (> org-export-taskjuggler-target-version 3.0))
> #+end
>
> ?

Basically org-export-taskjuggler-target-version can be 2.4 or 3.0. So
org-taskjuggler-targeting-tj3-p should return true if
org-export-taskjuggler-target-version is 3.0 or higher and false
otherwise.

So, let's see what the *scratch* buffer has to say about this

#+begin_src emacs-lisp
(setq org-export-taskjuggler-target-version 2.4)
2.4
(defun org-taskjuggler-targeting-tj3-p ()
  "Return true if we are targeting TaskJuggler III."
  (> org-export-taskjuggler-target-version 3.0))
org-taskjuggler-targeting-tj3-p
(org-taskjuggler-targeting-tj3-p)
nil
(setq org-export-taskjuggler-target-version 3.0)
3.0
(org-taskjuggler-targeting-tj3-p)
nil
(setq org-export-taskjuggler-target-version 3.1)
3.1
(org-taskjuggler-targeting-tj3-p)
t
#+end

Ah, you're right. There is a problem :-\.

The correct version should be 

#+begin_src emacs-lisp
(defun org-taskjuggler-targeting-tj3-p ()
  "Return true if we are targeting TaskJuggler III."
  (>= org-export-taskjuggler-target-version 3.0))
#+end

Let's test this in *scratch*
#+begin_src emacs-lisp
(setq org-export-taskjuggler-target-version 2.4)
2.4

(defun org-taskjuggler-targeting-tj3-p ()
  "Return true if we are targeting TaskJuggler III."
  (>= org-export-taskjuggler-target-version 3.0))
org-taskjuggler-targeting-tj3-p

(org-taskjuggler-targeting-tj3-p)
nil

(setq org-export-taskjuggler-target-version 3.0)
3.0

(org-taskjuggler-targeting-tj3-p)
t

(setq org-export-taskjuggler-target-version 3.1)
3.1

(org-taskjuggler-targeting-tj3-p)
t
#+end

How do we proceed? Do I resubmit the patch?

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

  reply	other threads:[~2011-03-17 10:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 11:04 [PATCH 0/5] Improvements to Taskjuggler export Christian Egli
2011-03-16 11:04 ` [PATCH 1/5] Add some minimal infrastructure to handle export to both tj2 and tj3 Christian Egli
2011-03-17  8:44   ` [Accepted] [O, " Bastien Guerry
2011-03-17  8:59   ` [PATCH " Bastien
2011-03-17 10:39     ` Christian Egli [this message]
2011-03-17 10:56       ` Bastien
2011-03-16 11:04 ` [PATCH 2/5] Mark a task as a milestone if it is a leaf node and cannot be scheduled Christian Egli
2011-03-17  8:45   ` [Accepted] [O, " Bastien Guerry
2011-03-16 11:05 ` [PATCH 3/5] Replace recursive functions with iterative ones Christian Egli
2011-03-16 11:05 ` [PATCH 4/5] Remove a spurious debug statement Christian Egli
2011-03-16 11:05 ` [PATCH 5/5] Escape double quotes in headlines Christian Egli
2011-03-17  8:49   ` [Accepted] [O,5/5] " Bastien Guerry
2011-03-16 20:33 ` [PATCH 0/5] Improvements to Taskjuggler export Marc-Oliver Ihm
2011-03-17  8:57   ` Bastien
2011-03-17 20:47     ` Christian Egli
2011-03-17 20:46   ` Christian Egli
2011-03-17  8:56 ` Bastien
2011-03-17 10:42   ` Christian Egli
2011-03-17 10:58     ` Bastien
2011-03-18  7:54   ` Christian Egli

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=87mxkum3od.fsf@sbs.ch \
    --to=christian.egli@sbs.ch \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [PATCH 1/5] Add some minimal infrastructure to handle export to both tj2 and tj3' \
    /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

Code repositories for project(s) associated with this 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).