emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: agenda item formatting
Date: Sat, 08 Aug 2015 16:57:34 +0800	[thread overview]
Message-ID: <87mvy2kvi9.fsf@ericabrahamsen.net> (raw)

In the past I've been pretty happy with the default Agenda formats for
display todo items and such. It used to bug me that you couldn't see the
lineage of the items in the todo list, but then I discovered
org-agenda-prefix-format, and the %b escape for breadcrumbs, and that
was good enough.

Now I've got a couple of custom blocks where I *really* want to control
the formatting exactly, and I'm having difficulty doing that. The
docstring says you can use this in org-agenda-prefix-format:

%(expression) Eval EXPRESSION and replace the control string
                by the result

I don't know how I'm supposed to use this. I can put a custom function
in there, but the function is passed no arguments, and is `eval'ed in a
nil environment, so I can't access any dynamic variables. Apparently all
it can do is return a string that is unrelated to the item being
formatted, which isn't very useful! Probably I'm wrong about that, but
I've tried for a while, and can't get it to do anything else.

Is there any other way to access the final formatted string for an
Agenda item, and doctor it?

Thanks!
Eric

                 reply	other threads:[~2015-08-08  8:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87mvy2kvi9.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).