* org-agenda-tag-filter-preset: maybe a recent bug?
@ 2022-10-17 17:08 Garjola Dindi
2022-10-18 3:39 ` Liu Hui
0 siblings, 1 reply; 3+ messages in thread
From: Garjola Dindi @ 2022-10-17 17:08 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I use ~org-agenda-tag-filter-preset~ in custom commands to generate
views like this:
,----
| ("W" "Work Daily Action List"
| ((agenda ""
| ((org-agenda-span 1)
| (org-agenda-sorting-strategy
| (quote
| ((agenda category-up tag-up time-up))))
| (org-agenda-tag-filter-preset
| (quote
| ("+work")))
| (org-deadline-warning-days 7))))
| nil nil)
`----
I am usually following the ~main~ branch that I update once a week and
this kind of custom command stopped working about one week ago (October
8).
The agenda view is generated, but the filter is not applied.
I did not change anything in my configuration. I have checked and it
works if I use the ~bugfix~ branch.
I was wondering if some of the changes recently made to solve a bug with
sticky agendas caused the issue. But if nobody else noticed anything, I
may have a misunderstanding in my way of defining the custom command
that was revealed by recent bugfixes?
Thanks for your help.
Garjola
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-agenda-tag-filter-preset: maybe a recent bug?
2022-10-17 17:08 org-agenda-tag-filter-preset: maybe a recent bug? Garjola Dindi
@ 2022-10-18 3:39 ` Liu Hui
2022-10-18 16:33 ` Garjola Dindi
0 siblings, 1 reply; 3+ messages in thread
From: Liu Hui @ 2022-10-18 3:39 UTC (permalink / raw)
To: garjola; +Cc: emacs-orgmode
Hi Garjola,
The preset of filter is not supposed to be used with individual
command. The docstring of 'org-agenda-tag-filter-preset' says:
> 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 just need to preset the filter in the global options, e.g.
;; multi-block view
("W" "Work Daily Action List"
((agenda ""))
((org-agenda-tag-filter-preset
(quote
("+work")))))
or
("W" "Work Daily Action List"
agenda ""
((org-agenda-tag-filter-preset
(quote
("+work")))))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-agenda-tag-filter-preset: maybe a recent bug?
2022-10-18 3:39 ` Liu Hui
@ 2022-10-18 16:33 ` Garjola Dindi
0 siblings, 0 replies; 3+ messages in thread
From: Garjola Dindi @ 2022-10-18 16:33 UTC (permalink / raw)
To: Liu Hui; +Cc: emacs-orgmode
On Tue 18-Oct-2022 at 05:39:27 +02, Liu Hui <liuhui1610@gmail.com>
wrote:
> Hi Garjola,
>
> The preset of filter is not supposed to be used with individual
> command. The docstring of 'org-agenda-tag-filter-preset' says:
>
>> 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 just need to preset the filter in the global options, e.g.
>
> ;; multi-block view
> ("W" "Work Daily Action List"
> ((agenda ""))
> ((org-agenda-tag-filter-preset
> (quote
> ("+work")))))
>
> or
>
> ("W" "Work Daily Action List"
> agenda ""
> ((org-agenda-tag-filter-preset
> (quote
> ("+work")))))
Hi Liu,
Thank you very much for your answer. It seems that I have been using
wrong agenda custom commands for several years!
In any case, your suggestion solved my problem and I am back on the main
branch.
Thank you.
Garjola
--
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-18 16:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-17 17:08 org-agenda-tag-filter-preset: maybe a recent bug? Garjola Dindi
2022-10-18 3:39 ` Liu Hui
2022-10-18 16:33 ` Garjola Dindi
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).