emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [agenda] %% questions
Date: Tue, 03 May 2011 10:58:56 -0400	[thread overview]
Message-ID: <87sjsvsudr.fsf@fastmail.fm> (raw)
In-Reply-To: <BANLkTi=553e=YFgcs++MzYg5Vmf27SPo=g@mail.gmail.com> (Michael Brand's message of "Tue, 5 Apr 2011 21:51:40 +0200")

Michael Brand <michael.ch.brand@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	other threads:[~2011-05-03 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 19:51 [agenda] %% questions Michael Brand
2011-05-03 14:58 ` Matt Lundin [this message]
2011-05-11  6:20   ` Michael Brand

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=87sjsvsudr.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=michael.ch.brand@gmail.com \
    /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).