|
From: | Max Nikulin |
Subject: | Re: Proposal: 'executable' org-capture-templaes |
Date: | Tue, 31 May 2022 23:37:21 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
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))
[Prev in Thread] | Current Thread | [Next in Thread] |