From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: Re: Filters lost after reviving buried, sticky agenda Date: Tue, 23 Jun 2015 10:47:38 +0200 Message-ID: <871th2yfo5.fsf@gmail.com> References: <877fssro5z.fsf@tu-dresden.de> <87bng9rrm1.fsf@gmail.com> <87twtzho03.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Jru-0003eg-C1 for emacs-orgmode@gnu.org; Tue, 23 Jun 2015 04:47:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7Jrq-0000Vx-7L for emacs-orgmode@gnu.org; Tue, 23 Jun 2015 04:47:46 -0400 Received: from smtptls1-lmb.cpub.univ-nantes.fr ([193.52.103.110]:54507 helo=smtp-tls.univ-nantes.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Jrp-0000Ul-T2 for emacs-orgmode@gnu.org; Tue, 23 Jun 2015 04:47:42 -0400 In-Reply-To: <87twtzho03.fsf@pierrot.dokosmarshall.org> (Nick Dokos's message of "Mon, 22 Jun 2015 09:27:24 -0400") 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: Nick Dokos Cc: emacs-orgmode@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Nick Dokos 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lisp-org-agenda.el-Fix-non-persistent-filters-when-r.patch Content-Transfer-Encoding: quoted-printable From=2059cd3eb256d9473db42f9a1629755140c0d648cb Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Gr=3DC3=3DA9goire=3D20Jadi?=3D 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 =2D-- 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 =2D-- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3642,10 +3642,12 @@ FILTER-ALIST is an alist of filters we need to appl= y when =20 (defun org-agenda-prepare (&optional name) (let ((filter-alist (if org-agenda-persistent-filter =2D (list `(tag . ,org-agenda-tag-filter) =2D `(re . ,org-agenda-regexp-filter) =2D `(effort . ,org-agenda-effort-filter) =2D `(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) =2D-=20 1.9.1 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-lisp-org-agenda.el-Fix-non-persistent-regexp-and-cat.patch Content-Transfer-Encoding: quoted-printable From=203dc0e17b0887b182309696b2f790dac9ad3ca018 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Gr=3DC3=3DA9goire=3D20Jadi?=3D 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. =2D-- 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 =2D-- 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) =2D `(re . ,org-agenda-regexp-filter) + `(regexp . ,org-agenda-regexp-filter) `(effort . ,org-agenda-effort-filter) =2D `(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) =2D-=20 1.9.1 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Daimrod/Greg --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJViR0qAAoJEBNzVHcrZRiUxJAP/1Djs6zKDqvyMT+r3AsJs/F0 U2oxzzAQ14KD4dKnK9d43LaTA6TKRZL3Wrnovx8R4bXPMjC3HEuf8GxnS7wRfrAP ZpWMun4x/PR1XCnhPQAmV6V95VRyBgq/ceywjGGB71uuiLbCEi3meZRTTxq7taCp OaPuzxVEJqth4VJNQeBmmENrES0GsKnmMKAhxgbkvhq7b3YSK6BYC1btbp7b1CA7 xT2NMxdWrxeFtkoCTUHpdXY7sY45jfOzweJsVE4Ahe9xKmHaMuvEdtvA36GkLEns KPxeXU/YHR/UDo7wZ6NxcP5c49ED7jjX4cPIjglMpRHZIzexBIj6eQ3WNE5xdQM7 LCLt28wEo2aJ1kabAYDFk5jV4YPKdY3gGxxH0gzWVWUyrQZ+b5X+RvuHavK8THOO f1No0kv8ak2G6nlpkOSvAuehu8ADm/WWoAMlIsEiP/2sGZqQOWO1wTY5Cq69D5bN rBXbox1Lf8uoI9BHhvqKgyPr/dd3HQC70araQPeRerLSwv/CPfDCKlaLrqURhqxV fRo5tsTzZ7MOxRtl/TZsYKYfihC1xXgKzdbliVrq6g2tEJE4T+yUp6V+9euiACrc W6UGyc2LUpdtpsfWrvlRjaPz4PnmY6srQs7FqNduQ5xXwYw/OSa7fP00qQLttjnS vqkfZrSmU4zclALm0fch =+mpj -----END PGP SIGNATURE----- --==-=-=--