From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuri Niyazov Subject: Agenda with an archived indicator Date: Sun, 28 Dec 2014 02:30:05 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5B7P-0006Us-13 for emacs-orgmode@gnu.org; Sun, 28 Dec 2014 05:30:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y5B7O-0003Ol-2S for emacs-orgmode@gnu.org; Sun, 28 Dec 2014 05:30:38 -0500 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:45287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5B7N-0003ON-Nc for emacs-orgmode@gnu.org; Sun, 28 Dec 2014 05:30:37 -0500 Received: by mail-lb0-f182.google.com with SMTP id f15so10748429lbj.41 for ; Sun, 28 Dec 2014 02:30:36 -0800 (PST) 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 I am trying to build an agenda view that includes both Archived and non-Archived items, and includes an indicator whether an item is archived or not. Here's how I've gotten it to work so far: In custom agenda: (... (org-agenda-prefix-format "%(yn/org-archived-display) %-11c%-11T%-11s") ... ) (defun yn/org-archived-display () (if (get-text-property (point-at-bol) :org-archived) "A" " ")) I figured if I learned how org-agenda skips over archived org entries while building the display, that will give some insight into what the code inside that expression should look like, so that code is derived from org-agenda-skip. This has an appreciable slow-down while building the agenda, I assume it's because it is re-parsing the item. Is there something in the environment of the expressions in %() that can be efficiently interrogated for archived/not archived status?