diff options
author | Thomas Morgan <tlm@ziiuu.com> | 2010-05-06 00:21:31 -0400 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-05-20 08:54:17 +0200 |
commit | cc47da0acb7dd9c4b66b38ca021a4f707f305535 (patch) | |
tree | 0010db1bcba0c41e770427921de23a24cedf8b4c | |
parent | 7403cb199219f9b3781ba7be1e18ac61f151adb4 (diff) | |
download | org-mode-cc47da0acb7dd9c4b66b38ca021a4f707f305535.tar.gz |
Persistent filters in Org mode
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.
-rw-r--r-- | 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 76e6019..93334b6 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-filter 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" @@ -2714,7 +2719,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-filter + (setq org-agenda-filter nil)) (put 'org-agenda-filter :preset-filter org-agenda-filter-preset) (if org-agenda-multi (progn @@ -2789,7 +2795,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)) ))) |