From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kosyrev Serge <_deepfire@feelingofgreen.ru> Subject: Re: [PATCH 7/8] ox-taskjuggler.el: allow 'priority' to be a directly-specified integer Date: Tue, 10 Nov 2015 11:26:05 +0300 Message-ID: <878u66jm5e.fsf_-_@feelingofgreen.ru> References: <87611alrmu.fsf@feelingofgreen.ru> <87bnb2soei.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <_deepfire@feelingofgreen.ru>) id 1Zw4Fp-0008PJ-CN for emacs-orgmode@gnu.org; Tue, 10 Nov 2015 03:26:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <_deepfire@feelingofgreen.ru>) id 1Zw4Fk-0003op-Dj for emacs-orgmode@gnu.org; Tue, 10 Nov 2015 03:26:13 -0500 Received: from [80.92.100.69] (port=45662 helo=mail.feelingofgreen.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <_deepfire@feelingofgreen.ru>) id 1Zw4Fk-0003od-6F for emacs-orgmode@gnu.org; Tue, 10 Nov 2015 03:26:08 -0500 Received: from andromedae (andromedae.feelingofgreen.ru [10.128.0.213]) by mail.feelingofgreen.ru (Postfix) with ESMTPA id A27CB32933A01 for ; Tue, 10 Nov 2015 11:49:13 +0300 (MSK) In-Reply-To: <87bnb2soei.fsf@gmail.com> (sfid-20151110_033548_881549_A7E97F8F) (Aaron Ecay's message of "Tue, 10 Nov 2015 00:12:37 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Aaron Ecay writes: > 2015ko azaroak 8an, Kosyrev Serge-ek idatzi zuen: >>=20 >> * ox-taskjuggler.el (org-taskjuggler--build-task): fix priority specifi= cation >> by allowing it to be directly passed down, in case it parses as an integ= er. >> --- >> contrib/lisp/ox-taskjuggler.el | 12 +++++++++--- >> 1 file changed, 9 insertions(+), 3 deletions(-) >>=20 >> diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggle= r.el >> index 44ffeb6..d49db62 100644 >> --- a/contrib/lisp/ox-taskjuggler.el >> +++ b/contrib/lisp/ox-taskjuggler.el >> @@ -875,10 +875,16 @@ a unique id will be associated to it." >> (org-taskjuggler-get-end task)) >> (org-element-property :PERIOD task))))) >> (priority >> - (let ((pri (org-element-property :priority task))) >> + (let ((pri (org-element-property :PRIORITY task))) >> (and pri >> - (max 1 (/ (* 1000 (- org-lowest-priority pri)) >> - (- org-lowest-priority org-highest-priority)= )))))) >> + ;; The exported task priority can be either specified >> + ;; via the Org priority mechahism (which is currently b= roken), > > Can you say more about what breakage you mean? Is it something that can > be easily fixed? Perhaps I was unclear in this message -- it's not the Org's priority mechanism that is broken, it's the way ox-taskjuggler uses it that is. Org specifies priorities via a list of enums, whereas TJ expects an integer in the range 0-1000. The quoted little piece of math in ox-taskjuggler tried to provide a mapping, but failed and I couldn't figure out how to make it work -- mainly because I couldn't understand how it was /supposed/ to work. Hence I made a shortcut. --=20 =D1=81 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8e=D0=BC / respectfully, =D0=9A=D0=BE=D1=81=D1=8B=D1=80=D0=B5=D0=B2 =D0=A1=D0=B5=D1=80=D0=B3=D0=B5= =D0=B9