Closed cashpw closed 1 year ago
I never thought about this feature because I'm using the hydra bindings but it seems like a good idea.
Your code uses an undefined cashweaver/org-fc-init--card-types
,
as I understand it completing-read
should already return the correct function.
I've mucked up the commit chain -- let me get that fixed.
EDIT: Fixed!
Your code uses an undefined cashweaver/org-fc-init--card-types,
Remnant of an earlier version -- fixed.
as I understand it completing-read should already return the correct function.
Looks like completing-read
only returns the selected string.
Cloze cards prompt for their subtype on initialization, if you're fine with a multi-step process (prompt for type, prompt for subtype if necessary) we could avoid duplicating the list of card types so this init function automatically works with new user-defined card types.
Give me some time to make a few small changes, then this should be easy to implement in a way that also works for user-defined card types.
Give me some time to make a few small changes, then this should be easy to implement in a way that also works for user-defined card types.
Sounds good! I had thought it may be best to org-fc-register-type
include the *-init
function
org-fc-init
(1) prompts the user to select one of the available (org-fc-init--card-types
) init functions and (2) invokes the selected function.