emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: Kosyrev Serge <_deepfire@feelingofgreen.ru>, emacs-orgmode@gnu.org
Subject: Re: [PATCH 7/8] ox-taskjuggler.el: allow 'priority' to be	a directly-specified integer
Date: Wed, 11 Nov 2015 02:31:28 +0000	[thread overview]
Message-ID: <87wptpqnb3.fsf@gmail.com> (raw)
In-Reply-To: <878u66jm5e.fsf_-_@feelingofgreen.ru>

Hi Kosyrev,

2015ko azaroak 10an, Kosyrev Serge-ek idatzi zuen:
> 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.

Org priorities are expressed as single characters (conventionally
uppercase Latin letters).  These map to ASCII/Unicode code points
(i.e. integers).  The code interpolates these values linearly between
0 and 1000.  By default org has three priorities A, B, and C; these
map to 1000, 500, and 0 respectively.  Five priorities A through E
would map to 1000, 750, 500, 250, and 0.  Etc.

The letter/integer substitution is a bit opaque.  So is the fact that
org-lowest-priority (by default the ASCII codepoint for ‘C’ = 67) is a
larger integer than org-highest-priority (ASCII ‘A’ = 65), despite what
the names suggest.

Does that help any?

-- 
Aaron Ecay

  reply	other threads:[~2015-11-11  2:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-08 10:20 [PATCH 7/8] ox-taskjuggler.el: allow 'priority' to be a directly-specified integer Kosyrev Serge
2015-11-10  0:12 ` Aaron Ecay
2015-11-10  8:26   ` Kosyrev Serge
2015-11-11  2:31     ` Aaron Ecay [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-11-08 10:20 Kosyrev Serge

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=87wptpqnb3.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=_deepfire@feelingofgreen.ru \
    --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).