emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Tyler Smith <tyler@plantarum.ca>
Cc: orgmode list <emacs-orgmode@gnu.org>
Subject: Re: org files and projects nested git repositories
Date: Thu, 31 Dec 2015 13:20:02 -0500	[thread overview]
Message-ID: <8737ui8oq5.fsf@kyleam.com> (raw)
In-Reply-To: <87oad6ldqv.fsf@plantarum.ca> (Tyler Smith's message of "Thu, 31 Dec 2015 12:38:48 -0500")

Hi Tyler,

Tyler Smith <tyler@plantarum.ca> writes:

> Hello list,
>
> I'm struggling to incorporate project-specific org files into my global
> org system. My file system looks something like this:
>
> ~
> ├── org
> │   ├── todo.org
> │   ├── reading.org
> │   └── personal.org
> └── research
>     ├── project1
>     │   ├── project1.org
>     │   └── project1_reference.pdf
>     └── project2
>         ├── project2.org
>         ├── data2
>         │   ├── data2A.csv
>         │   └── data2B.csv
>         └── project2_reference.pdf

[...]

> I wonder if it would be possible to maintain a global git repository
> containing my entire directory tree, but only the org files; and have
> all of these org files incorporated into (and new ones automatically
> detected by) the agenda. At the same time, I need to maintain individual
> git repositories for each project directory.
>
> Does anyone here have experience with such a system? Or other advice on
> how to keep many scattered org files in a single git repo and also
> captured in the org agenda?

In addition to what Ken suggested, another option is to use links to
populate the agenda directory.  Have a git repo for your Org notes and
agenda file (your "org" directory above), and add this directory (or one
of its subdirectories) to org-agenda-files so that all the Org files in
that directory are considered agenda files.

Keep project-related Org files in the given project directory (as you do
above), and create a symbolic link for the Org file in the agenda
directory.  The project directory will then track the content of the Org
file, and the agenda repo will just track the presence of the link.

Your example from above would look like this:

     ~
     ├── org
     │   ├── todo.org
     │   ├── reading.org
     │   ├── personal.org
     │   ├── link to ~/research/project1/project1.org
     │   └── link to ~/research/project2/project2.org
     └── research
         ├── project1
         │   ├── project1.org
         │   └── project1_reference.pdf
         └── project2
             ├── project2.org
             ├── data2
             │   ├── data2A.csv
             │   └── data2B.csv
             └── project2_reference.pdf

I use the command at the link below to add Org files to my agenda
directory.

  https://github.com/kyleam/emacs.d/blob/3eda2253d80322640be4ec0381194d4f387e6cc9/lisp/init-org.el#L437

Also, if the project Org file isn't something you want to always show up
in your global TODO list, you can just restrict the agenda to that file
(i.e., press "<") instead of adding it to the agenda directory.

--
Kyle

  parent reply	other threads:[~2015-12-31 18:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-31 17:38 org files and projects nested git repositories Tyler Smith
2015-12-31 18:01 ` Ken Mankoff
2015-12-31 18:33   ` Tyler Smith
2015-12-31 18:42     ` Mike McLean
2016-01-01 10:02   ` Alan Schmitt
2016-01-01 12:33     ` Ken Mankoff
2016-01-04 13:04       ` Alan Schmitt
2015-12-31 18:20 ` Kyle Meyer [this message]
2015-12-31 18:38   ` Tyler Smith
2015-12-31 18:53     ` Brenda Butler
2015-12-31 19:00       ` Tyler Smith
2015-12-31 18:55     ` Kyle Meyer

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=8737ui8oq5.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tyler@plantarum.ca \
    /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).