emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Accepted] [O] Re: multiple agenda buffers


From: Bastien Guerry
Subject: [Accepted] [O] Re: multiple agenda buffers
Date: Thu, 3 Mar 2011 17:41:13 +0100 (CET)

Patch 648 (http://patchwork.newartisans.com/patch/648/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87k4ghe1cw.fsf%40fastmail.fm%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Re: multiple agenda buffers
> Date: Thu, 03 Mar 2011 01:03:43 -0000
> From: Matt Lundin <address@hidden>
> X-Patchwork-Id: 648
> Message-Id: <address@hidden>
> To: Bastien <address@hidden>
> Cc: org-mode mailing list <address@hidden>
> 
> Hi Bastien,
> 
> Bastien <address@hidden> writes:
> 
> > Hi all,
> >
> > Suvayu Ali <address@hidden> 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---
> --8<---------------cut here---------------end--------------->8---
>  
> Best,
> Matt
> 
> 
> 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)))
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]