Open cashpw opened 1 year ago
Wow, you're fast.
This is pretty much exactly what I had in mind.
As I understand it, the new property is set each time a cloze card is initialized / updated so I assume the workflow you're thinking of is to manually edit the property for cards you want to change. One downside to this is that if there's a deck of many cards all using the default context and the default context changes, the property of the cards stays the same.
For this reason, I'd prefer a function that optionally adds the property, prompting for a numeric value.
Wow, you're fast.
The trick is to forget to create the issue until you're more than half-way through implementing the feature.
For this reason, I'd prefer a function that optionally adds the property, prompting for a numeric value.
Done: org-fc-cloze-set-context
. Do you think it's worthwhile to validate the user's input here as a non-negative integer?
Checking in -- is there anything you'd like to see changed in this pull request?
It just occurred to me that there is already a mechanism for this in the form of the org-fc-property
macro
and I've added an implementation based on that to the develop branch.
Two missing parts are a setter function (probably to hard to generate using the macro, due to the interactive-read) and a way to customize the property (not implemented yet, but should be possible in the macro).
Despite this, I think the macro-based approach will avoid some code duplication once more variables of this kind are added.
Reference: #96