"Jacob S. Gordon" <[email protected]> writes:

> Hello everyone,
>
> To follow the spec, ‘ox-icalendar’ needs to map priorities onto the
> range 1–9, and currently does this by taking ‘floor’ of a ratio to
> ensure the highest priorities map to 1.  This leads to an asymmetric
> distribution, and about double [1] the average absolute error compared
> to rounding, e.g. see the table below.
>
> I propose that we round here instead, and have attached a first draft
> of a patch doing so.

I think in both cases, the mapping from Org priorities to iCal priorities
is a step function on [org-priority-highest, org-priority-lowest], where
the step height is 1 and the step width is
(org-priority-lowest - org-priority-highest)/8.

In the current case of using floor, the first step has the full width,
and the last step has width 0. In your preferred scheme (round) both
the first and last steps would have half width.

Note we only evaluate the step function on a discrete grid but the step
function itself is continuous.

Is this correct? If so, it would suggest a defcustom for the relative
size of the first step, which would take a value between 0 and 1 -- with
the current default being 1, but your preferred value being 0.5.

Reply via email to