emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Max Mikhanosha <max@openchat.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Hack: org-agenda-cache.el
Date: Mon, 16 Jan 2012 13:18:57 +0100	[thread overview]
Message-ID: <4E8292DA-B295-4DE6-999F-205D7DF9CA79@gmail.com> (raw)
In-Reply-To: <87r4z0bveo.wl%max@openchat.com>

Hi Max,

this is a pretty good solution if the main issue with slow agenda
is that it feels slow because you are often switching back and forth
between different agenda buffers.  I like it, and I would vote for
integration into Org-mode, not as a separate package, but directly,
as an option.  If Bastien agrees, maybe you could make a patch which
introduces this into the main code.

Three comments:

1. I think there needs to be a command to remove all agenda buffers, to make sure that everything is updated.  Maybe this could be "C-u r" or so, which would rebuilt the current and remove all others.  This commands needs to make sure that all markers are safely discarded - otherwise you will die the marker death eventually.

2. I don't think that "-cache" is the best name choice for this, because this
is not a caching mechanism.  It is a "multiple-agenda-buffers" thing.

3. One caveat for this is that maybe in some places, org-agenda-marker-table
is modified while the agenda buffer is not current (I am not sure, I just think this needs to be checked).  If so, one would need to pop to the relevant agenda buffer to make the change.

Just my 2c, of course.

- Carsten
On 15.1.2012, at 20:47, Max Mikhanosha wrote:

> As my agenda files slowly grew over the years, the speed of generating
> agenda had slowly deteriorated, finally hitting the point of me jdoing
> something about it. (it got to around 5-7 seconds, which kind of
> interrupts work-flow)
> 
> Attached file org-agenda-cache.el is a "quick fix" solution that I
> developed for myself, its more of a request for discussion and not
> intended as contribution yet.
> 
> Basic idea is:
> 
> 1. Multiple-agenda buffers can exist at the same time, having separate
> tag filters and other such settings. This is accomplished by bunch of
> org-agenda-* variables being made buffer-local.
> 
> 2. Custom agenda commands should bind `org-agenda-buffer-name' variable,
> so that for example C-c a generates "*Agenda*" buffer and C-c t
> generates "*Todo List*" buffer. 
> 
> 3. org-agenda checks if buffer with `org-agenda-buffer-name' exists
> and if it does, it will show that buffer, rather then re-generating
> it. To generate a fresh agenda, becomes C-c a r instead of C-c a
> 
> 4. org-agenda-quit buries the agenda buffer instead of killing it.
> 
> 5. All of the above shenanigans can be switched on and off by doing
> M-x toggle-org-agenda-caching command, its off by default so you have
> to turn it on after loading the file.
> 
> I had been using this setup for last few days, and it had really been
> a blast, returning me to the times when I just started with org-mode,
> and information had appeared in milliseconds rather then seconds.
> 
> <org-agenda-cache.el>

  reply	other threads:[~2012-01-16 12:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15 19:47 Hack: org-agenda-cache.el Max Mikhanosha
2012-01-16 12:18 ` Carsten Dominik [this message]
2012-01-16 15:40   ` Carsten Dominik
2012-01-16 16:31     ` Max Mikhanosha
2012-01-16 21:48       ` Carsten Dominik

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=4E8292DA-B295-4DE6-999F-205D7DF9CA79@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=max@openchat.com \
    /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).