emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Filters lost after reviving buried, sticky agenda
Date: Mon, 22 Jun 2015 09:27:24 -0400	[thread overview]
Message-ID: <87twtzho03.fsf@pierrot.dokosmarshall.org> (raw)
In-Reply-To: 87bng9rrm1.fsf@gmail.com

Daimrod <daimrod@gmail.com> 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?= <gregoire.jadi@univ-nantes.fr>
> 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

  parent reply	other threads:[~2015-06-22 13:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01 21:19 Filters lost after reviving buried, sticky agenda Daniel Borchmann
2015-06-21 15:47 ` Daimrod
2015-06-21 18:40   ` Daniel Borchmann
2015-06-22  4:11     ` Daimrod
2015-06-22 15:09       ` Subhan Michael Tindall
2015-06-22 13:27   ` Nick Dokos [this message]
2015-06-23  8:47     ` Daimrod
2015-06-23  9:15       ` Daimrod
2015-06-23 21:35         ` Nicolas Goaziou
2015-06-24  7:54           ` Daimrod

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=87twtzho03.fsf@pierrot.dokosmarshall.org \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).