On 30/05/2022 09:04, Arthur Miller wrote:
Ihor Radchenko writes:
Arthur Miller writes:
Simplicity comes from the org-templates. Me, and I guess other people are
familiar with org-catpure templates already, and I mean, can it be simpler to
create a menu of choices then a simple list:
'(("key1" "label1" exec (lambda () ...))
("key2" "label2" exec (labmda () ...))
...
)
I am not really familiar with those other dialogues but org-capture, so I only
had that one in the mind.
There is `org-insert-structure-template' C-c C-,
Doesn't the following code do what you are asking for?
(let ((entry (org-mks `(("a" "A entry" ,#'identity)
("b" "B entry" ,(lambda (x) (* 2 x))))
"A or B")))
(funcall (nth 2 entry) 10))