From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: multiple agenda buffers Date: Wed, 02 Mar 2011 15:03:43 -0500 Message-ID: <87k4ghe1cw.fsf@fastmail.fm> References: <87ei7epphz.fsf@gnu.org> <20110211090646.3b5f467a@bhishma.homelinux.net> <87zkpsxocj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=50107 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PusGy-0000aN-Le for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 15:03:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PusGw-0003OL-Se for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 15:03:48 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:38733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PusGw-0003Nx-Me for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 15:03:46 -0500 In-Reply-To: <87zkpsxocj.fsf@gnu.org> (Bastien's message of "Sat, 19 Feb 2011 12:20:28 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: org-mode mailing list Hi Bastien, Bastien writes: > Hi all, > > Suvayu Ali writes: > >> However I was wondering, block agenda commands might work at least for >> doing multiple searches. But I don't think there is any interactive >> interface to it. > > inspired by this conversation, I have add a new agenda command: > > M-x org-agenda-append-agenda RET > > It is bound to `A' in the agenda buffer and lets you append any > agenda to the currently displayed one, thus providing some kind > of interactive interface to build block agendas from simple ones. > > I think it's a neat addition -- especially useful when you want > to compare to _small_ list of items. > > Let me know what you think - and thanks Suvayu for the idea! Thanks for the new function. However, at the moment, it has destructive effects if it is called in a buffer other than the agenda buffer, as it appends the new agenda results to the current buffer and then makes the buffer read-only. Perhaps for now we could throw an error if the append function is called from outside the agenda: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index ea822da..f2eac99 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -2266,6 +2266,8 @@ Pressing `<' twice means to restrict to the current subtree or region This function allows interactive building of block agendas. Agenda views are separated by `org-agenda-block-separator'." (interactive) + (unless (string= (buffer-name) org-agenda-buffer-name) + (error "Can only append from within agenda buffer")) (let ((org-agenda-multi t)) (org-agenda) (widen))) --8<---------------cut here---------------end--------------->8--- Best, Matt -- Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode