emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: SAKURAI Masashi <m.sakurai@kiwanami.net>
To: bzg@altern.org
Cc: emacs-orgmode@gnu.org
Subject: New backend for org-agenda: (Was Calendar-like view of the org-agenda)
Date: Mon, 11 Jul 2011 00:41:17 +0900	[thread overview]
Message-ID: <20110710154117.881A213C51B@vps1.kiwanami.net> (raw)

Hi Bastien,

At Fri, 08 Jul 2011 10:53:08 +0200,
Bastien wrote:
> :
> > the re-design of the whole org-agenda-list algorithm
> > seems to be needed, because the key function
> > org-agenda-get-day-entries requires only one date and the subsequent
> > dependent functions also are designed by the API.
> 
> FWIW, I'm all ears -- if you have ideas on how to make org-agenda-list
> more effective please let us know, I could try to implement them.

How about caching of schedule items?
My idea is as follows.

When one query schedule items for the first time, the backend parses
the org buffer and stores all schedule items with a buffer local
variable.  From the next time of the query, the backend can use the
cache data without parsing the buffer text.

Then, because The backend has a model of schedule items, in addition
to org-agenda-get-day-entries, we can define some useful API for
schedule items, such as org-agenda-get-entries-by-range(begin end).

I illustrated this idea:
[Diagram for caching schedule items]
https://cacoo.com/diagrams/RcNaxILLHDGZlr1L#4B823

Org schedule seems to consist of two types, simple items and repeat
items. So, I think that the backend should execute two type queries.

[Query and Data Structure]
https://cacoo.com/diagrams/RcNaxILLHDGZlr1L#C071E

Of course, because I have used orgmode not so long time, this idea is
not useful or too simple to handle the org schedules. 


Here are other implementations:

The Howm schedule API (howm-reminder-search) enumerates all schedule
items. The API user can filter them easily. However, the enumeration
employs full-text searching using grep command, so it takes a long
time to be done the query.  calfw-howm.el has a cache data and the
user can refresh it explicitly.

Another schedule API is CalDAV. This is a specification for the
schedule server, such as Apple iCal server and Google Calendar.

[Calendaring Extensions to WebDAV (CalDAV) RFC 4791]
http://www.webdav.org/specs/rfc4791.html
http://en.wikipedia.org/wiki/CalDAV

This specification has many API for query. It is very heavy spec, but
I think it may be a hint for designing query API for orgmode schedule
items.


Regards
--
SAKURAI, Masashi (family, given)
m.sakurai@kiwanami.net

             reply	other threads:[~2011-07-10 15:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-10 15:41 SAKURAI Masashi [this message]
2011-07-12  7:37 ` New backend for org-agenda: (Was Calendar-like view of the org-agenda) Bastien
2011-07-16 16:22   ` SAKURAI Masashi
2011-07-18 23:06     ` Bastien
2011-07-18 23:20       ` Matthew Sauer
2011-07-18 23:54         ` Bastien
2011-07-20  7:50       ` SAKURAI Masashi
2011-07-20 12:43         ` Rasmus
2011-07-20 13:31         ` New backend for org-agenda: Giovanni Ridolfi
2011-07-21  4:38           ` New backend for org-agenda: (Was Calendar-like view of the org-agenda) SAKURAI Masashi
2011-07-21  9:52         ` Bastien
2011-07-23  2:35           ` SAKURAI Masashi

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=20110710154117.881A213C51B@vps1.kiwanami.net \
    --to=m.sakurai@kiwanami.net \
    --cc=bzg@altern.org \
    --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).