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 22:48:13 +0100 Message-ID: References: <87r4z0bveo.wl%max@openchat.com> <4E8292DA-B295-4DE6-999F-205D7DF9CA79@gmail.com> <87pqejbodt.wl%max@openchat.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmuX1-0000Wf-HJ for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 16:56:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmuX0-0000NV-5R for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 16:55:59 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:43962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmuWz-0000NP-W1 for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 16:55:58 -0500 Received: by eekc13 with SMTP id c13so582108eek.0 for ; Mon, 16 Jan 2012 13:55:57 -0800 (PST) In-Reply-To: <87pqejbodt.wl%max@openchat.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: Max Mikhanosha Cc: emacs-orgmode@gnu.org On 16.1.2012, at 17:31, Max Mikhanosha wrote: > Hi Carsten, > > At Mon, 16 Jan 2012 16:40:01 +0100, > Carsten Dominik wrote: >> On 16.1.2012, at 13:18, Carsten Dominik wrote: >> >> 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. > > Cool, I'll redo it and submit a patch in the next few days. The plan > is: > > - Multi-buffer support (ie buffer-local vars) goes in > unconditionally, since I think there is no way to undo making > variable buffer local, and if there is, it would make toggling on/off > function really complicated. Not really, there is `kill-local-variable'. But I agree, not big reason to make it possible to turn it off. > > About the markers, what about if I call to clean them up > kill-buffer-hook? This will work even if user kills the buffer > manually, not just on q key. Sounds good, make sure to add to the kill-buffer-hook *locally*, using org-add-hook (for XEmacs compatibility). > > - The "use existing buffer, and bury on quit" toggle needs a new > name org-agenda-reuse-buffers? Wanderlust has a similar mechanism > and its called "sticky summary buffers", so maybe > org-agenda-buffer-sticky? Sounds good to me. > > - The C-u r that you suggested to kill all buffers is already taken > by "reload with a > search string", so I think for cleanup bindings could be: > > q -> kill buffer or bury if enabled > Q -> always kill > C-u Q -> kill all agenda buffers (ie cleanup) Jup. > > Now that I'm thinking it also needs to keep track of all agenda > buffers, so need a global list. The kill-buffer hook should work > there too. You can also loop over all buffers and find the ones which are in org-agenda-mode. This is a bit easier than keeping track of them. Regards - Carsten