From: Bruno Barbier <brubar.cs@gmail.com>
To: errelinaaron@gmail.com, emacs-orgmode@gnu.org
Subject: Re: `org-capture' loads all the files in `org-directory'
Date: Sun, 17 Jul 2022 10:16:22 +0200 [thread overview]
Message-ID: <E1oCzPt-0007wa-KU@lists.gnu.org> (raw)
In-Reply-To: <CAFpY-jBwDgOd1joE6obCH+JEk14s3S3GQthvnpS9PFkZOLcd0g@mail.gmail.com>
Noel Errenil <errelinaaron@gmail.com> writes:
> Hello, org community
>
> I ran into the titled issue and haven't found any solution or explanation:
>
> First, I start Emacs and there are just a few buffers such as *scratch* and
> *Messages*.
>
> 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.
>
FWIW, in my case, org seems to open org files that are necessary to
identify the capture target, like when refiling somewhere else. Using
`C-c C-c', org does not open other files though, just the targetted one.
Cleaning up your org agenda files, if possible, might reduce the number
of files org needs to load.
(customize-option 'org-agenda-files)
Bruno
> I'm running Emacs 28.1 on (Gentoo) Linux. I can reproduce this on my
> macOS too.
>
> Currently I have `org-directory' set to `~/projects/org'. My
> `org-capture' config is as follows:
>
> ;; vars
> (with-eval-after-load 'org
> (setq-default fill-column 80)
> (setq
> org-deadline-warning-days 0
> org-startup-folded 'content
> org-hide-leading-stars t
> org-agenda-include-diary t
> org-src-fontify-natively t
> org-src-preserve-indentation t
> org-edit-source-content-indentation 0
> org-indent-indentation-per-level 1
> org-directory "~/projects/org"
> org-agenda-files (concat org-directory "/agenda.org")
> org-default-notes-file (concat org-directory "/notes.org")))
>
> ;; org-capture templates
> (setq org-capture-templates
> '(("t" "Tasks")
> ("td" "With Dealines" entry ; todos->deadline
> (file+headline "tasks.org" "Deadlines")
> "* TODO %? %^G\nDEADLINE: %T" :kill-buffer t :prepend t)
> ("ts" "Scheduled" entry ; todos->scheduled
> (file+headline "tasks.org" "TODOS")
> "* TODO %? %^G\nSCHEDULED: %T" :kill-buffer t :prepend t)
> ;; memos
> ("m" "Memo" entry
> (file+headline "memo.org" "MEMO")
> "* %? %^G\n%U" :kill-buffer t :prepend t)
> ;; notes
> ("n" "Daily Notes" entry
> (file+headline "notes.org" "NOTES")
> "* %? %^G\n%U" :kill-buffer t :prepend t)
> ;; readings
> ("r" "Readings")
> ("ra" "Article" entry
> (file+headline "readings.org" "ARTICLE")
> "* TODO %^{Short title for heading} %^G \nTTL: %^{Long title}
> \nSRC: %^{Link} \n%u \nSUM: %^{Quick note?}"
> :kill-buffer t)
> ("rb" "Book" entry
> (file+headline "readings.org" "BOOK")
> "* TODO %^{Short title for heading} %^G \nTTL: %^{Long title}
> \nSRC: %^{Link} \n%u \nSUM: %^{Quick note?}"
> :kill-buffer t)))
>
> 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.
>
> What am I doing wrong? Any advice? Thank you so much in advance.
next prev parent reply other threads:[~2022-07-17 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-16 22:53 `org-capture' loads all the files in `org-directory' Noel Errenil
2022-07-17 8:16 ` Bruno Barbier [this message]
2022-07-18 3:25 ` Ihor Radchenko
2022-07-19 4:48 ` Noel Errenil
2022-07-20 7:19 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1oCzPt-0007wa-KU@lists.gnu.org \
--to=brubar.cs@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=errelinaaron@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).