From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Persistent filters in Org mode Date: Fri, 7 May 2010 09:26:55 +0200 Message-ID: <78236561-007D-4F32-AAA0-578773001D21@gmail.com> References: <87mxwd7j90.fsf@ziiuu.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OANvU-00045l-Te for emacs-orgmode@gnu.org; Fri, 07 May 2010 09:49:13 -0400 Received: from [140.186.70.92] (port=60211 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OANvI-0005Jq-Mr for emacs-orgmode@gnu.org; Fri, 07 May 2010 09:49:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAIkp-00041r-1x for emacs-orgmode@gnu.org; Fri, 07 May 2010 04:17:54 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:43290) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAHxz-0003z6-O7 for emacs-orgmode@gnu.org; Fri, 07 May 2010 03:27:23 -0400 Received: by wwi14 with SMTP id 14so55814wwi.0 for ; Fri, 07 May 2010 00:27:22 -0700 (PDT) In-Reply-To: <87mxwd7j90.fsf@ziiuu.com> 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: Thomas Morgan Cc: emacs-orgmode@gnu.org Hi Thomas, this sounds like a useful idea to me. What happens if a user sets a preset filter with agenda custom command options? Maybe there should be a command to set and clear this persistent filter? Would you like to implement this in order to complete this feature? - Carsten On May 6, 2010, at 6:21 AM, Thomas Morgan wrote: > Hello, Org mode hackers, > > This patch defines a variable `org-agenda-persistent-filters'. > When it is set, filters persist from one agenda view to the next. > > I've found this convenient when using tags for contexts like @home, > @net, etc., some of which commonly remain applicable for a while. > > Thanks, > Thomas > > From 052ef9205845c78cb24d6fea8f89484bbe12a528 Mon Sep 17 00:00:00 2001 > From: Thomas Morgan > Date: Fri, 23 Apr 2010 11:48:03 +0200 > Subject: [PATCH] New option `org-agenda-persistent-filters'. > When set, keep filters from one agenda view to the next. > > --- > lisp/org-agenda.el | 10 ++++++++-- > 1 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > index 93ef921..c8fd731 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -197,6 +197,11 @@ you can \"misuse\" it to also add other text to > the header. However, > :group 'org-export-html > :type 'string) > > +(defcustom org-agenda-persistent-filters nil > + "When set, keep filters from one agenda view to the next." > + :group 'org-agenda > + :type 'boolean) > + > (defgroup org-agenda-custom-commands nil > "Options concerning agenda views in Org-mode." > :tag "Org Agenda Custom Commands" > @@ -2713,7 +2718,8 @@ bind it in the options section.") > (setq org-todo-keywords-for-agenda nil) > (setq org-done-keywords-for-agenda nil) > (setq org-drawers-for-agenda nil) > - (setq org-agenda-filter nil) > + (unless org-agenda-persistent-filters > + (setq org-agenda-filter nil)) > (put 'org-agenda-filter :preset-filter org-agenda-filter-preset) > (if org-agenda-multi > (progn > @@ -2788,7 +2794,7 @@ bind it in the options section.") > (org-habit-insert-consistency-graphs)) > (run-hooks 'org-finalize-agenda-hook) > (setq org-agenda-type (org-get-at-bol 'org-agenda-type)) > - (when (get 'org-agenda-filter :preset-filter) > + (when (or org-agenda-filter (get 'org-agenda-filter :preset- > filter)) > (org-agenda-filter-apply org-agenda-filter)) > ))) > > -- > 1.6.3.3 > > > > _______________________________________________ > 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 - Carsten