org-ql
org-ql copied to clipboard
Add: (property) :multi argument
This adds the :multi
argument to the property
predicate.
E.g. for the following case:
* Test 1
:PROPERTIES:
:PROP: value-1
:PROP+: value-2
:PROP+: value-3
:END:
* Test 2
:PROPERTIES:
:PROP: value-2
:END:
-
(property "PROP" "value-2")
returns justTest 2
-
(property "PROP" "value-2" :multi t)
returns bothTest 1
andTest 2
Hello,
Thanks for submitting this. This would be a good feature to support.
It should be noted that this PR is intended to address https://github.com/alphapapa/org-ql/issues/254.
A few questions:
- Have you signed the FSF copyright assignment for Emacs/Org, or would you be willing to? I'm trying to keep Org QL suitable for inclusion in GNU ELPA or Org itself.
- The Org manual at
(info "(org) Property Syntax")
says: "Note that a property can only have one entry per drawer." So it's unclear to me whether a property value can be added to multiple times in a single entry. Do you know anything about that? - Before support for this feature could be merged, any patch would need to include tests.
Thanks.
Hello.
- Ah, unfortunately not. I wonder if I can even pull this off... if this requires convincing my university that I have something to do with a US-based nonprofit, much less an explicitly political nonprofit. Maybe I'll ask around, but I guess this puts the PR on hold if there's no other way.
- Hmm, that's strange. The same manual page says: "If you want to add to the value of an existing property, append a ‘+’ to the property name".
And then "It is also possible to add to the values of inherited properties.". So if adding values to inherited properties isn't the only use case, where would the additional entry be if not in the same drawer?
Anyway,
org-contacts
supports adding emails like this. - I see. I'll add tests if there's any chance this can be merged.