Michael Brand <michael.ch.br...@gmail.com> writes:

> Hi all
>
> The items 2 and 4 in the following example are not shown in the agenda
> with today's release_7.5-135-g7021f70.
>
> Question about item 2: Is this a bug since the items 1 and 3 are
> shown?

At the moment, time of day strings are not allowed within brackets. So
one has a choice between the following:

* 12pm Monthly appointment
  <%%(diary-float t 2 1)>

* Text here will not appear in agenda
%%(diary-float t 2 1) 12:00 Monthly appointment

In other words, if brackets are present, the sexp string will be taken
from the headline. If brackets are not present, the sexp string will
must follow the sexp (and the headline will be disregarded).

Allowing time-of-day strings within timestamp brackets would require
hacking the regexp in org-agenda-get-timestamps.

> Question about item 4: The user manual tells that %% must start at the
> first column. What would be required to allow indentation?

The regexp (line 4783 in org-agenda.el) looks for the sexp at the
beginning of the line: "^&?%%(". See also the font-lock sexp on line
5570 on org.el. My guess is that this is to prevent potential conflicts
with other markup, though I can't think what that might be off the top
of my head. Perhaps Carsten would know the reason...

Best,
Matt

> * item 1: shown
>   SCHEDULED: <%%(diary-float t 2 1) 12:00>
> * item 2: not shown
>   <%%(diary-float t 2 1) 12:00>
> * item 3: shown
>   <%%(diary-float t 2 1)>
> * item 4: not shown
>   %%(diary-anniversary 04 05 2000) item 4 is %d years old
> * item 5: shown
> %%(diary-anniversary 04 05 2000) item 5 is %d years old


Reply via email to