org-registry-assoc-all removed matching links from the registry. This meant
subsequent calls with the same parameters would return nothing.
Add another function for finding entries in the register, which used find-if to
get entries satisfying a predicate.
org-habit.el (org-habit-get-priority): A new function that determines
the relative priority of a habit, based on how long past its scheduled
date it is, and how near the deadline is.
org-agenda.el (org-agenda-get-scheduled): Set habit priority using
`org-habit-get-priority'.
One half of this patch is a revert of c167a4ac32.
These changes are necessary so that :results output works correctly
with #+lob calls. For example the following example did not work:
--------------------------------------------------
3. :results output org -> doesn't work with #+lob:
--------------------------------------------------
\#+srcname: randthree(n,max)
\#+begin_src ruby
number = n
maximum = max
puts "* Random numbers\n" +
"Here are some random numbers: " +
(1..number).collect {|x| (rand * maximum).ceil }.join(", ") +
"."
\#+end_src
\#+lob: randthree(n=3,max=10) :results output org
org-habit.el: New file, which implements code to build a "habit
consistency graph".
org-agenda.el (org-agenda-get-deadlines)
(org-agenda-get-scheduled): Display consistency graphs when outputting
habits into the agenda. The graphs are always relative to the current
time.
(org-format-agenda-item): Added new parameter `habitp', which indicates
whether we are formatting a habit or not. Do not display "extra"
leading information if habitp is true.
When evaluating R code in a persistent session, lines of output
typically start with a single prompt character. However, under certain
circumstances, lines start with a concatenation of (primary and
secondary) prompt characters separated by spaces. This seems to be
related to having blank lines in the input. This fix ensures that all
such prompt characters are removed from the output.
And when merging header args, those from enclosing scopes take
precedence. For example, output to file from a source block is
implemented by (a) sending the output to file, and (b) having the
source block return the file name as its result. Before this change,
the file name returned could be set by a referenced source block (a
nested call), regardless of the value of the :file header arg of the
top-level source block.
Prior to this, reference resolution could fail with quoted
strings. E.g. this didn't work:
\#+srcname: py-id(a=1)
\#+begin_src python
a
\#+end_src
\#+lob: py-id(a="1")
This change allows org-file-properties to supply header args, and also
allows property inheritance if it has been enabled. Header-args
aquired from the item (or by inheritance) have precedence over those
aquired from org-file-properties.