From: Christoph Groth <christoph@grothesque.org>
To: emacs-orgmode@gnu.org
Subject: Temporarily setting agenda files list, cleaning up
Date: Mon, 27 May 2019 14:04:09 +0200 [thread overview]
Message-ID: <87v9xwf6iu.fsf@neron> (raw)
[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]
Hello,
I would like to expand my use of Org for notes, and to this end spread
project-specific org files across my home directory (currently I'm using
a central directory with one agenda file per year). For obvious
reasons, I can't possibly include all these org files in
org-agenda-files permanently and have them open in Emacs all the time.
Instead, I'm thinking of a setup as follows: I'll reserve
org-agenda-files for active projects only. But there will be many other
org files (for projects that are finished or dormant, general notes,
etc.), that I would like to be able to search as well.
I saw that some people have solved this problem with a custom search
solution, even using a database [1], but I think that for my purposes a
simpler solution mostly using Org's built-in functionality will do. I'm
also aware of org-agenda-text-search-extra-files, keeping all my extra
files there is not satisfactory, because the search possibilities are
limited (and otherwise it poses the same questions that I will ask
further below).
Instead, I imagine a custom Emacs command to launch an agenda with
org-agenda-files that is temporarily set to a list of files that depends
on the current context. For starters, this list could contain all the
org files under the current directory:
(split-string (shell-command-to-string "find `pwd`/* -name '*.org' -type f") "\n" t)
This way, I could easily explore the org files that belong to specific
subsets of my activities and interests. I could also search *all* my
notes, when needed (for now the time this takes should not be a
problem).
I wonder if anyone has tried a similar setup and would be willing to
share his experience and ideas. Specifically, I wonder about the
following points:
* Do you see any obvious problems with the above idea?
* In Elisp, what is the best way to temporarily set org-agenda-files and
later reset it back to the standard value?
* How to automatically close unneeded org buffers that were opened for
the temporarily agenda? The command org-agenda-exit is not
satisfactory, because it also kills the buffers that one has just
found due to the search, and also it's not automatic. Perhaps one
could close the buffers immediately once the agenda view has been
created?
Thanks
Christoph
[1] https://kitchingroup.cheme.cmu.edu/blog/2017/01/03/Find-stuff-in-org-mode-anywhere/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next reply other threads:[~2019-05-27 12:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-27 12:04 Christoph Groth [this message]
2019-05-27 12:46 ` Temporarily setting agenda files list, cleaning up John Kitchin
2019-05-27 18:51 ` Thomas Plass
2019-05-28 15:12 ` Christoph Groth
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9xwf6iu.fsf@neron \
--to=christoph@grothesque.org \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.