[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Filters lost after reviving buried, sticky agenda
From: |
Daimrod |
Subject: |
Re: [O] Filters lost after reviving buried, sticky agenda |
Date: |
Tue, 23 Jun 2015 10:47:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux) |
Nick Dokos <address@hidden> writes:
> What happened to the effort filter?
Good catch! Thanks.
Here is an updated patch plus another one to fix the regexp and category
filters.
From 59cd3eb256d9473db42f9a1629755140c0d648cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <address@hidden>
Date: Fri, 12 Jun 2015 17:35:30 +0200
Subject: [PATCH 1/2] lisp/org-agenda.el : Fix non-persistent filters when
refreshing sticky agenda
* lisp/org-agenda.el (org-agenda-prepare): Fix non-persistent filters when
refreshing sticky agenda
When a sticky agenda is buried, then reviving and refreshing, existing
filters are ignored even when org-agenda-persistent-filter is `t'.
Reported and fixed by Daniel Borchmann
---
lisp/org-agenda.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index f5d1022..a07eead 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3642,10 +3642,12 @@ FILTER-ALIST is an alist of filters we need to apply
when
(defun org-agenda-prepare (&optional name)
(let ((filter-alist (if org-agenda-persistent-filter
- (list `(tag . ,org-agenda-tag-filter)
- `(re . ,org-agenda-regexp-filter)
- `(effort . ,org-agenda-effort-filter)
- `(car . ,org-agenda-category-filter)))))
+ (with-current-buffer
+ (get-buffer-create org-agenda-buffer-name)
+ (list `(tag . ,org-agenda-tag-filter)
+ `(re . ,org-agenda-regexp-filter)
+ `(effort . ,org-agenda-effort-filter)
+ `(car . ,org-agenda-category-filter))))))
(if (org-agenda-use-sticky-p)
(progn
(put 'org-agenda-tag-filter :preset-filter nil)
--
1.9.1
From 3dc0e17b0887b182309696b2f790dac9ad3ca018 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <address@hidden>
Date: Tue, 23 Jun 2015 10:42:25 +0200
Subject: [PATCH 2/2] lisp/org-agenda.el: Fix non-persistent regexp and
category filters in sticky agenda
* lisp/org-agenda.el (org-agenda-prepare): Use the correct key for
category and regexp filters.
`org-agenda-finalize' uses 'regexp and 'category whereas
`org-agenda-prepare' used 're and 'car.
---
lisp/org-agenda.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index a07eead..8efc037 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3645,9 +3645,9 @@ FILTER-ALIST is an alist of filters we need to apply when
(with-current-buffer
(get-buffer-create org-agenda-buffer-name)
(list `(tag . ,org-agenda-tag-filter)
- `(re . ,org-agenda-regexp-filter)
+ `(regexp . ,org-agenda-regexp-filter)
`(effort . ,org-agenda-effort-filter)
- `(car . ,org-agenda-category-filter))))))
+ `(category . ,org-agenda-category-filter))))))
(if (org-agenda-use-sticky-p)
(progn
(put 'org-agenda-tag-filter :preset-filter nil)
--
1.9.1
--
Daimrod/Greg
signature.asc
Description: PGP signature
Re: [O] Filters lost after reviving buried, sticky agenda, Daniel Borchmann, 2015/06/25