all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Tory S. Anderson" <webdev@toryanderson.com>
Cc: orgmode list <emacs-orgmode@gnu.org>
Subject: Re: After years without issues,  Orgmode now fails to apply agenda filters to preset templates
Date: Sat, 25 May 2024 19:26:04 +0000	[thread overview]
Message-ID: <87ed9p7kxf.fsf@localhost> (raw)
In-Reply-To: <87zfsdyaj8.fsf@byu.edu>

webdev@toryanderson.com (Tory S. Anderson) writes:

> After years without issue where I could choose, for example, to see my
> daily work agenda, the filters are now failing to be applied. This is
> in org 9.6.15, as shipped with my emacs 29.3. I have verified that
> this problem is the same in =emacs -Q= without any other packages:
> when I choose my agenda view, such as "C-a w d" for my daily work
> agenda, I still get an agenda buffer named "Org_Agenda(wd)", but none
> of my preset filters have applied. I skimmed the documentation and I
> haven't seen any changed syntax. Here is my definition from my
> =use-package org= =:custom= section:
>
> #+begin_src lisp
>       (org-agenda-custom-commands
> 	    '(("w" . "Work")
> 	      ("wd" "Work Day"
> 	       ((agenda ""
> 			((org-agenda-span 1)
> 			 (org-agenda-start-on-weekday nil)
> 			 (org-agenda-regexp-filter-preset
> 			  '("+ODH\\|AGENDA\\|CONFERENCE" "-TSA\\|PRIESTHOOD")))))
> 	       nil)))
> #+end_src

According to the docstring of `org-agenda-regexp-filter-preset',

    ...The preset filter is a global property of
    the entire agenda view.  In a block agenda, it will not work reliably to
    define a filter for one of the individual blocks.  You need to set it in
    the global options and expect it to be applied to the entire view.

So, you should set this variable as a part of global agenda command
settings, not inside individual block.

Not a bug.
Canceled.

> Why has this stopped applying my filter when it worked for so long? Is
> it a bug, or do I need to change something to make it up-to-date?

I have no idea because you did not tell which Org mode version had your
settings working. I suspect that it could have happened around the time
Org mode switched from dynamic binding to lexical binding, but it is
just a blind guess.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2024-05-25 19:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-25 19:08 After years without issues, Orgmode now fails to apply agenda filters to preset templates Tory S. Anderson
2024-05-25 19:26 ` Ihor Radchenko [this message]
2024-05-30 11:17   ` Pedro
2024-05-30 16:15     ` Tory S. Anderson
2024-05-30 16:29       ` Ihor Radchenko

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed9p7kxf.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=webdev@toryanderson.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.