Re: [O] adding file to agenda removes directories
Tyler Smith writes: > I set up org-agenda-files to contain ~/org/, such that all files in that > directory are in my agenda. I then add an individual file from > elsewhere, via org-agenda-file-to-front. In the process, the entry for > the ~/org/ directory is removed, and replaced with explicit entries for > every org file in that directory. This leads to surprising behaviour, > where new org files in ~/org/ aren't detected by the agenda. > > The help suggests that org-agenda-files can be a list of 'files and > directories', but this behaviour seems to suggest that it can be a list > of files, *or* a directory. Am I doing something wrong, or can I not > combine files and directories in org-agenda-files? Right, glancing at org-agenda-file-to-front's code, I don't think it's currently possible to use it and keep directory entries from being replaced with the Org files they contain at that time. Like you, I'd expect the directory entries to stay intact, but I'm guessing the behavior is the way it is because * Doing otherwise would make the code more complicated. * org-agenda-file-to-front moves a file to the front or end of the agenda list, but, if directories are left as is, calling org-agenda-file-to-front on a file within an agenda directory would duplicate that file in the return value of (org-agenda-files). Just expanding the files avoids having to decide how to deal with this. -- Kyle
[O] adding file to agenda removes directories
Hi again, Continuing to play around with getting org files into my agenda, I run into this: I set up org-agenda-files to contain ~/org/, such that all files in that directory are in my agenda. I then add an individual file from elsewhere, via org-agenda-file-to-front. In the process, the entry for the ~/org/ directory is removed, and replaced with explicit entries for every org file in that directory. This leads to surprising behaviour, where new org files in ~/org/ aren't detected by the agenda. The help suggests that org-agenda-files can be a list of 'files and directories', but this behaviour seems to suggest that it can be a list of files, *or* a directory. Am I doing something wrong, or can I not combine files and directories in org-agenda-files? Thanks, Tyler -- http://plantarum.ca
Re: [O] org files and projects nested git repositories
Brenda Butler writes: > I have tried links, but in all my attempts the links break whenever the > source or the target is committed to version control. My understanding > that each new commit to a file effectively changes the inode, breaking > the link > > Sounds like you might be using hard links instead of symbolic links ... > but first, are you using a unix-like system or another system? The symbolic > link is a unix-like thing. > I'm on Debian, so links are available. I recall having to fix an issue with Emacs' backup-files taking over the inodes. That was easily fixed once I knew it was an issue. I don't recall the details, but it seemed that the links still got garbled on commit. I'll take another look, now that I know it should work. Tyler -- http://plantarum.ca
Re: [O] org files and projects nested git repositories
Tyler Smith writes: [...] > I have tried links, but in all my attempts the links break whenever the > source or the target is committed to version control. My understanding > that each new commit to a file effectively changes the inode, breaking > the link. Are you thinking of hard links rather than symbolic links? Symbolic links should play well with Git (ignoring Windows). The popular tool git-annex is even built around symbolic links. > In your use, are the targets and their links both under > version control? If so, obviously they aren't breaking, so I must be > doing something wrong when I try the same thing. Yes, the target is under version control in the project repo, and the agenda repo tracks a symbolic link to the target, so the content of that file is just a path to the target. -- Kyle
Re: [O] org files and projects nested git repositories
On Thu, Dec 31, 2015 at 1:38 PM, Tyler Smith wrote: > I have tried links, but in all my attempts the links break whenever the > source or the target is committed to version control. My understanding > that each new commit to a file effectively changes the inode, breaking > the link Sounds like you might be using hard links instead of symbolic links ... but first, are you using a unix-like system or another system? The symbolic link is a unix-like thing. bjb
Re: [O] org files and projects nested git repositories
On Thu, Dec 31, 2015 at 1:33 PM, Tyler Smith wrote: > Ken Mankoff writes: > > > > In my version of this, I have each project as its own git repository, > > where git contains the Org file, other code, the manuscript, etc. I > > add any Org files to my global agenda with =M-x > > org-agenda-file-to-front= and remove with = M-x org-remove-file=. > > > >> most tutorials assume that all your planning files are found in one > >> directory (e.g., ~/org). > > > > That is only because it is easier to show that setup in the tutorial. You > > can have Org files all over the place, and each can be added to the > Agenda > > or not, as you wish. > > Thanks Ken. Perhaps I've been trying to hard to force everything into > one directory. I did find a post on Reddit that describes a convenient > way to create org files for projects anywhere in the directory tree in a > shared global location: > > > https://www.reddit.com/r/emacs/comments/2qwh8q/org_mode_one_massive_file_or_tons_of_small_ones/cnacdpl > > This has the benefit of keeping all my planning (.org) files in one > repo, but the disadvantage of separating the planning files from the > project they relate to. Something your approach deals with nicely. I'll > try that out. > Another option: I have a function that recursively searches a parent directory (using the "find-lisp" library) for files that are named *.org. I then add that function to org-agenda-mode-hook so that every time I open and agenda view, it recalculates the org-agenda-files variable. On a local filesystem (laptop, SSD) i don't notice a thing, slow-down wise. YMMV if your Org files are on a network share. > > Best, > > Tyler > > -- > http://plantarum.ca > >
Re: [O] org files and projects nested git repositories
Kyle Meyer writes: > > 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. > Thanks Kyle. I have tried links, but in all my attempts the links break whenever the source or the target is committed to version control. My understanding that each new commit to a file effectively changes the inode, breaking the link. In your use, are the targets and their links both under version control? If so, obviously they aren't breaking, so I must be doing something wrong when I try the same thing. Best, Tyler -- http://plantarum.ca
Re: [O] org files and projects nested git repositories
Ken Mankoff writes: > > In my version of this, I have each project as its own git repository, > where git contains the Org file, other code, the manuscript, etc. I > add any Org files to my global agenda with =M-x > org-agenda-file-to-front= and remove with = M-x org-remove-file=. > >> most tutorials assume that all your planning files are found in one >> directory (e.g., ~/org). > > That is only because it is easier to show that setup in the tutorial. You > can have Org files all over the place, and each can be added to the Agenda > or not, as you wish. Thanks Ken. Perhaps I've been trying to hard to force everything into one directory. I did find a post on Reddit that describes a convenient way to create org files for projects anywhere in the directory tree in a shared global location: https://www.reddit.com/r/emacs/comments/2qwh8q/org_mode_one_massive_file_or_tons_of_small_ones/cnacdpl This has the benefit of keeping all my planning (.org) files in one repo, but the disadvantage of separating the planning files from the project they relate to. Something your approach deals with nicely. I'll try that out. Best, Tyler -- http://plantarum.ca
Re: [O] org files and projects nested git repositories
Hi Tyler, Tyler Smith 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
Re: [O] org files and projects nested git repositories
Hi Tyler, I have a similar setup. On 2015-12-31 at 12:38, Tyler Smith wrote: > ├── org > │ ├── todo.org > │ ├── reading.org > │ └── personal.org On my system this is a git repository and a cron (or actually LaunchAgent since I'm on OS X) does a =git commit -a = every night. I also have these variables set: (setq org-directory "~/Documents/Org") (setq org-agenda-files (quote ("~/Documents/Org/" "~/Dropbox/Org/"))) > └── research > ├── project1 > │ ├── project1.org > │ └── project1_reference.pdf > └── project2 > ├── project2.org > ├── data2 > │ ├── data2A.csv > │ └── data2B.csv > └── project2_reference.pdf In my version of this, I have each project as its own git repository, where git contains the Org file, other code, the manuscript, etc. I add any Org files to my global agenda with =M-x org-agenda-file-to-front= and remove with = M-x org-remove-file=. > When I open a new project, it gets its own folder, containing supporting > documents, code, data, as well as an org file to manage todos and > timelines. This doesn't seem to work well with org: most tutorials > assume that all your planning files are found in one directory (e.g., > ~/org). That is only because it is easier to show that setup in the tutorial. You can have Org files all over the place, and each can be added to the Agenda or not, as you wish. -k.
[O] org files and projects nested git repositories
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 When I open a new project, it gets its own folder, containing supporting documents, code, data, as well as an org file to manage todos and timelines. This doesn't seem to work well with org: most tutorials assume that all your planning files are found in one directory (e.g., ~/org). 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? Thanks for your patience, Tyler -- http://plantarum.ca
[O] org-index: New Version and Screencast
Hi, org-index ("A personal index for org") has reached Version 5.0; it can be downloaded at: http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/lisp/org-index.el;hb=HEAD A short introduction and demo is available as a screencast: http://2484.de/org-index.html Comments are welcome ! Best regards, Marc