emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Thomas Morgan <tlm@ziiuu.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Persistent filters in Org mode
Date: Thu, 20 May 2010 09:40:19 +0200	[thread overview]
Message-ID: <138C8639-A535-4733-89BF-4C173ABC0CA0@gmail.com> (raw)
In-Reply-To: <87mxwd7j90.fsf@ziiuu.com>

Applied, thanks!

the variable is renamed to `org-agenda-persistent-filter'.

- 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 <tlm@ziiuu.com>
> 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

      parent reply	other threads:[~2010-05-20 10:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-06  4:21 Persistent filters in Org mode Thomas Morgan
2010-05-07  7:26 ` Carsten Dominik
     [not found]   ` <CBB93A41-08A8-45A3-BC8D-DD2BCE3171BA@uva.nl>
2010-05-15 21:32     ` Thomas Morgan
2010-05-19  9:46       ` Carsten Dominik
2010-05-19 23:23         ` Thomas Morgan
2010-05-20  7:40           ` Carsten Dominik
2010-05-24  1:55             ` Samuel Wales
2010-05-20  7:40 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=138C8639-A535-4733-89BF-4C173ABC0CA0@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tlm@ziiuu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).