emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Agenda with an archived indicator
@ 2014-12-28 10:30 Yuri Niyazov
  2014-12-30  9:47 ` Yuri Niyazov
  0 siblings, 1 reply; 3+ messages in thread
From: Yuri Niyazov @ 2014-12-28 10:30 UTC (permalink / raw)
  To: emacs-orgmode

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Agenda with an archived indicator
  2014-12-28 10:30 Agenda with an archived indicator Yuri Niyazov
@ 2014-12-30  9:47 ` Yuri Niyazov
  2014-12-30 18:36   ` Yuri Niyazov
  0 siblings, 1 reply; 3+ messages in thread
From: Yuri Niyazov @ 2014-12-30  9:47 UTC (permalink / raw)
  To: emacs-orgmode

Any ideas on this, anyone?

On Sun, Dec 28, 2014 at 2:30 AM, Yuri Niyazov <yuri.niyazov@gmail.com> wrote:
> 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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Agenda with an archived indicator
  2014-12-30  9:47 ` Yuri Niyazov
@ 2014-12-30 18:36   ` Yuri Niyazov
  0 siblings, 0 replies; 3+ messages in thread
From: Yuri Niyazov @ 2014-12-30 18:36 UTC (permalink / raw)
  To: emacs-orgmode

test

On Tue, Dec 30, 2014 at 1:47 AM, Yuri Niyazov <yuri.niyazov@gmail.com> wrote:
> Any ideas on this, anyone?
>
> On Sun, Dec 28, 2014 at 2:30 AM, Yuri Niyazov <yuri.niyazov@gmail.com> wrote:
>> 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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-30 18:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-28 10:30 Agenda with an archived indicator Yuri Niyazov
2014-12-30  9:47 ` Yuri Niyazov
2014-12-30 18:36   ` Yuri Niyazov

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).