From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: agenda item formatting Date: Sat, 08 Aug 2015 16:57:34 +0800 Message-ID: <87mvy2kvi9.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNzwz-0003fT-Ug for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 04:57:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNzwu-0005w5-Vg for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 04:57:57 -0400 Received: from plane.gmane.org ([80.91.229.3]:56895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNzwu-0005vq-OK for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 04:57:52 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZNzwr-0004e5-IO for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 10:57:50 +0200 Received: from 114.250.115.74 ([114.250.115.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Aug 2015 10:57:49 +0200 Received: from eric by 114.250.115.74 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Aug 2015 10:57:49 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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