[Top][All Lists]

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

Re: `org-capture' loads all the files in `org-directory'

From: Ihor Radchenko
Subject: Re: `org-capture' loads all the files in `org-directory'
Date: Mon, 18 Jul 2022 11:25:12 +0800

Noel Errenil <errelinaaron@gmail.com> writes:

> ...
> Then, I fire `org-capture', captur a note and `C-c C-c' to save the captured
> content.
> Suddenly all the files under ~/projects/org will be loaded into the buffer
> list, which confuses me so much. Those that have nothing to do with
> capturing or capture-templates are loaded into Emacs, which makes
> little sense to me.
> ...
> Currently I have `org-directory' set to `~/projects/org'. My
> `org-capture' config is as follows:
> ...
>    org-default-notes-file (concat org-directory "/notes.org")))
> ...
>         ("td" "With Dealines" entry     ; todos->deadline
>                (file+headline "tasks.org" "Deadlines")
>                "* TODO %? %^G\nDEADLINE: %T" :kill-buffer t :prepend t)

Note that you are using %^G, while implies (see org-capture-templates 

  %^G         Prompt for tags, with completion on all tags in all agenda files.

> I just expect that only the capture template will be loaded during capturing
> and the template buffer should be killed (as config-ed) after capturing.

Only the capture template is actually loaded. However, providing tag
completion for %^G requires Org to scan all the agenda files for
possible tags. Hence, agenda files must be opened and examined.

The reason why the capture target buffer and the agenda file buffers are
not closed is efficiency. Opening all the agenda files may take
considerable amount of time and hence it is generally better to keep
them open for future use. We might change it in future or provide an
option to close the opened files if there is enough interest. Feel free
to write a feature request - we will judge the number of user responses
to the request.

> What am I doing wrong? Any advice? Thank you so much in advance.

You may either not use global tag completion (use %^g instead %^G in
your templates) or advice org-capture to close the opened files.


reply via email to

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