emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Yuri Niyazov <yuri.niyazov@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Agenda with an archived indicator
Date: Sun, 28 Dec 2014 02:30:05 -0800	[thread overview]
Message-ID: <CACbjG0vGu29o55YMiEWE_2E3KqMhHrOCYVghGk5WLGShzn6MYg@mail.gmail.com> (raw)

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?

             reply	other threads:[~2014-12-28 10:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-28 10:30 Yuri Niyazov [this message]
2014-12-30  9:47 ` Agenda with an archived indicator Yuri Niyazov
2014-12-30 18:36   ` Yuri Niyazov

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=CACbjG0vGu29o55YMiEWE_2E3KqMhHrOCYVghGk5WLGShzn6MYg@mail.gmail.com \
    --to=yuri.niyazov@gmail.com \
    --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).