Closed dorneanu closed 3 months ago
Hi,
Please see the documentation of the property selector:
Group items with a property, optionally matching a value. Argument may be a property name string, or a list of property name string and either value string or predicate with which to test the value.
You're getting that error because it is indeed invalid.
If you want to insert the current week into the org-super-agenda-groups
list, you'll need to use backquoting and unquoting, keeping in mind that the unquoting will only happen when you set the variable's value, not when the variable's value is accessed.
Backquoting, unquoting, and splicing is covered in a section of the Elisp manual. Simply, note the difference between what these forms evaluate to:
`(foo ,(format-time-string "%U"))
'(foo (format-time-string "%U"))
Thanks for your reply. In ielm
I can see the difference between the both. When I then try to set:
(:name "This Week"
:property `("week" ,(format-time-string "%U"))
)
then I get:
Wront type argument: sequencep, \`
Again: I want to match items with a property called week
where the value is the current week number (aka format-time-string "%U"
)
Thanks for your reply. In
ielm
I can see the difference between the both. When I then try to set:(:name "This Week" :property `("week" ,(format-time-string "%U")) )
then I get:
Wront type argument: sequencep, \`
Again: I want to match items with a property called
week
where the value is the current week number (akaformat-time-string "%U"
)
Just posting this to solve the problem and get the issue closed.
The problem is that you are nesting a backquote inside of an already quoted block. Simply change the block from a quote to a backquote and then use the expression that alphapapa provided.
(org-super-agenda-groups
`(
(:log t)
(:discard (:tag "inactive"))
(:discard (:tag "jira"))
(:name "This Week"
:property ("week" ,(format-time-string "%U"))
)
(:discard (:anything))))
Note the change I made on the second line of my code snippet, the form is now using `
instead of '
which means that reader/splice operators such as ,
and ,@
will correctly work inside of it.
Hi,
I'm struggling with the
:property
selector I'd like to use. For multiple ORG entries like:I'd like to have a group/section in my agenda which shows all items where
week=<week number>
. This is what I have sofar:So for this week
(format-time-string "%U")
returns 16. Then in the "This week" group I'd like to match all entries that haveweek: 16
as a property. However I always get "Invalid org-super-agenda selector:" as an error.Maybe it's my fault I don't know how to construct a cons cell properly. Thanks in advance!