emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] org-capture autoload bug? [9.5.2 (9.5.2-gfbff08 @ /home/ignaci


From: Ignacio Casso
Subject: Re: [BUG] org-capture autoload bug? [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)]
Date: Thu, 10 Mar 2022 19:00:15 +0100
User-agent: mu4e 1.6.10; emacs 27.2

Max Nikulin <manikulin@gmail.com> writes:

> On 10/03/2022 19:53, Ignacio Casso wrote:
>> For example, if we call this:
>>    (let ((org-capture-templates
>>           '(("d" "default" entry
>>              (file+headline org-default-notes-file "Tasks")
>>              "* %?"))))
>>      (org-capture nil "d")))
>> It produces the error:
>>    (error "No capture template referred to by \"d\" keys")
>
> Ignacio, could you, please, try the following?
>
>     (custom-set-variables
>      '(org-capture-templates
>        '(("d" "default" entry
>           (file "/tmp/capture-test.org")
>           "* %?"))))
>     (org-capture nil "d")
>

That works, of course, but it's not suitable to my use case. The example
I have provided has been reduced from a larger function I wrote that
relies on org-capture functionality to create new entries in an org
file, using a template specific for that function which is not relevant
for any other Elisp code calling org-capture. Thus the function binds
locally and temporarily org-capture-templates, as I've seen other Elisp
code snippets do. If org-capture is already loaded it works just fine,
and I would expect it to work too when it is not and the function
triggers the autoload, but it doesn't.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]