From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Hack: org-agenda-cache.el Date: Mon, 16 Jan 2012 16:40:01 +0100 Message-ID: References: <87r4z0bveo.wl%max@openchat.com> <4E8292DA-B295-4DE6-999F-205D7DF9CA79@gmail.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmofP-0001DS-CC for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 10:40:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmofJ-0006Tl-C6 for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 10:40:15 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:62997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmofI-0006Sa-DG for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 10:40:08 -0500 Received: by eaan1 with SMTP id n1so1084700eaa.0 for ; Mon, 16 Jan 2012 07:40:07 -0800 (PST) In-Reply-To: <4E8292DA-B295-4DE6-999F-205D7DF9CA79@gmail.com> 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: Carsten Dominik Cc: emacs-orgmode@gnu.org On 16.1.2012, at 13:18, Carsten Dominik wrote: > Hi Max, >=20 > 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. >=20 > Three comments: >=20 > 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. >=20 > 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. >=20 > 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. Sorry, I am talking about `org-agenda-markers', and indeed, some care = has to be taken here. Basically, the function org-agenda-new-marker = needs to be modified to take a buffer as an argument, and then to push the new marker on the list of = markers in that buffer. Also, org-agenda-save-markers-in-region needs = to be modified. OK, this is a bit complicated, I am willing to help. If you make a new = patch that implements the multibuffer stuff in org-agenda, I will look = at the marker issues and implement them. - Carsten >=20 > Just my 2c, of course. >=20 > - Carsten > On 15.1.2012, at 20:47, Max Mikhanosha wrote: >=20 >> 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) >>=20 >> 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. >>=20 >> Basic idea is: >>=20 >> 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. >>=20 >> 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.=20 >>=20 >> 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 >>=20 >> 4. org-agenda-quit buries the agenda buffer instead of killing it. >>=20 >> 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. >>=20 >> 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. >>=20 >> >=20