It is possible to get Org to limit the values you can enter for a property by using the special _ALL property. For example, if I want to limit the CONDITION property I could use:

#+PROPERTY: CONDITION_ALL Pristine Worn Repaired Damaged

after which when I use the menu to insert the CONDITION property, I will be presented with these for options and only allowed to enter them.

I really like this feature, but I wish it was a bit more flexible, allowing a concept of a type or a regular expression to limit my entry. As a conceptual example, it would be nice if I could set a property something like

#+YEAR_REGEX: \d{4}

which would then only allow me to enter four-digit integers through for the YEAR property when using the insertion menu. To be clear, I am not trying to be overly picky about how this works. Another example that could also be useful:


would only allow me to enter values for YEAR that satisfied the ELisp predicate numberp.

How can I get Org to limit my property entry more flexibly than by an enumeration only?

  • 1
    AFAIK, you cannot. You'd have to change a bunch of code to allow this kind of flexibility (starting with org-property-get-allowed-values). Also, this "value menu" feature is implemented through completion mechanisms: I'm not sure that there are any ATM that do the kind of checking you are looking for (but I may well be wrong in that). – NickD Jul 5 '20 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.