From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Filters lost after reviving buried, sticky agenda Date: Mon, 22 Jun 2015 09:27:24 -0400 Message-ID: <87twtzho03.fsf@pierrot.dokosmarshall.org> References: <877fssro5z.fsf@tu-dresden.de> <87bng9rrm1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z71lG-0002CZ-Db for emacs-orgmode@gnu.org; Mon, 22 Jun 2015 09:27:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z71lC-0000mB-22 for emacs-orgmode@gnu.org; Mon, 22 Jun 2015 09:27:42 -0400 Received: from plane.gmane.org ([80.91.229.3]:34865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z71lB-0000lj-Rz for emacs-orgmode@gnu.org; Mon, 22 Jun 2015 09:27:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z71l9-0005Jz-1c for emacs-orgmode@gnu.org; Mon, 22 Jun 2015 15:27:35 +0200 Received: from pool-108-20-41-47.bstnma.fios.verizon.net ([108.20.41.47]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Jun 2015 15:27:35 +0200 Received: from ndokos by pool-108-20-41-47.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Jun 2015 15:27:35 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Daimrod writes: > It doesn't work at startup when agenda hasn't been built yet. The > following patch does seem to fix that. If it's ok, I can push it. > > From d2e8fef81585c249f33fa37260f6228709a67017 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= > Date: Fri, 12 Jun 2015 17:35:30 +0200 > Subject: [PATCH] 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 | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > index f5d1022..3a1f5bc 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -3642,10 +3642,11 @@ 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) > + `(car . ,org-agenda-category-filter)))))) > (if (org-agenda-use-sticky-p) > (progn > (put 'org-agenda-tag-filter :preset-filter nil) What happened to the effort filter? -- Nick