Re: [O] Recursive org-agenda-files
Matthew, Matthew Sauer gmail.com> writes: > > My understanding is that you want a file that gets moved into the > active directory to be automatically included in the agenda? > From worg: > You can simply include the directory (as one of the items) in the > value of the variable org-agenda-files: > > (setq org-agenda-files '("/my/special/path/org/active/")) Thanks for the suggestion. Tried it already and found that it is unfortunately not recursive. I tend to make directories with projects under the active directory, then put the org file and supporting files in the directory. E.g. active/proj1/proj1.org active/prof1/info.pdf etc What's nice about this is that my project notes, todos and support files are close to each other. Also, I can simply use the dired listing of the active dir as my "active projects list" in GTD parlance :) > Not that playing with agenda hooks might have some advantages. I have indeed cooked up a hooky solution that should have hit the list by the time you read this :) Cheers Neilen
Re: [O] Recursive org-agenda-files
Hi Nick, Nick Dokos hp.com> writes: > Seek and ye shall find: > > C-h v org-agenda--hook RET > > will list all the matching hooks. Which one to choose? I'll leave that up > to the interested reader Indeed, doing (load-library "find-lisp") (add-hook 'org-agenda-mode-hook (lambda () (setq org-agenda-files (find-lisp-find-files "~/Dropbox/GTD/ActiveProjects" "\.org$")) )) fixes it good. Fantastic, thanks! Cheers Neilen
Re: [O] Recursive org-agenda-files
My understanding is that you want a file that gets moved into the active directory to be automatically included in the agenda? >From worg: You can simply include the directory (as one of the items) in the value of the variable org-agenda-files: (setq org-agenda-files '("/my/special/path/org/active/")) There is another way of accomplishing the same end: (setq org-agenda-files (file-expand-wildcards "/my/special/path/org/active/*.org")) The other files/directories could be in the extended text search if needed but not part of the automatic agenda. Just my two cents. Not that playing with agenda hooks might have some advantages. Matt Sauer On Tue, Oct 4, 2011 at 9:12 AM, Nick Dokos wrote: > Neilen Marais wrote: > >> Jambunatha, >> >> >> > > Have you considered adding it to say org-mode-hook? >> > >> > Seems like a Wrong suggestion to me. >> > >> > Try using `C-c [' to add the current org file. I am assuming that org >> > files are created by hand and not by some daemon that spits out agenda >> > files when you are away from emacs. >> >> Not a daemon, no, but I do tend to move files around. I.e. I'll move a >> project >> file/dir from my "someday" folder to my "active" folder. I would like to >> avoid >> any further manual steps to get it integrated in my agenda. >> >> Is there a hook function that gets called every time an agenda view is >> opened or >> refreshed? I could probably use that to update the agenda list. >> > > Seek and ye shall find: > > C-h v org-agenda--hook RET > > will list all the matching hooks. Which one to choose? I'll leave that up > to the interested reader :-) Or try > > C-h v org--hook RET > > to get a list of *all* the org hooks. > > Nick > > > > >
Re: [O] Recursive org-agenda-files
Neilen Marais wrote: > Jambunatha, > > > > > Have you considered adding it to say org-mode-hook? > > > > Seems like a Wrong suggestion to me. > > > > Try using `C-c [' to add the current org file. I am assuming that org > > files are created by hand and not by some daemon that spits out agenda > > files when you are away from emacs. > > Not a daemon, no, but I do tend to move files around. I.e. I'll move a project > file/dir from my "someday" folder to my "active" folder. I would like to avoid > any further manual steps to get it integrated in my agenda. > > Is there a hook function that gets called every time an agenda view is opened > or > refreshed? I could probably use that to update the agenda list. > Seek and ye shall find: C-h v org-agenda--hook RET will list all the matching hooks. Which one to choose? I'll leave that up to the interested reader :-) Or try C-h v org--hook RET to get a list of *all* the org hooks. Nick
Re: [O] Recursive org-agenda-files
Jambunatha, > > Have you considered adding it to say org-mode-hook? > > Seems like a Wrong suggestion to me. > > Try using `C-c [' to add the current org file. I am assuming that org > files are created by hand and not by some daemon that spits out agenda > files when you are away from emacs. Not a daemon, no, but I do tend to move files around. I.e. I'll move a project file/dir from my "someday" folder to my "active" folder. I would like to avoid any further manual steps to get it integrated in my agenda. Is there a hook function that gets called every time an agenda view is opened or refreshed? I could probably use that to update the agenda list. Thanks Neilen
Re: [O] Recursive org-agenda-files
Jambunathan K writes: > Neilen Marais writes: > >> Hi, >> >> netty hacky gmail.com> writes: >> >>> >>> Hi Neilen, >>> >>> I think you want these in your .emacs (from >>> http://orgmode.org/worg/org-faq.html, "Can I add files recursively to >>> my list of agenda files?"): >>> (load-library "find-lisp") >>> (setq org-agenda-files (find-lisp-find-files "~/org" "\.org$")) >> >> Thanks. I tried this, but as far as I can tell it won't automatically see new >> files or directories as they are added, so I have to re-evaluate te setq >> every >> time I add new projects or files. Or am I wrong? > Have you considered adding it to say org-mode-hook? Seems like a Wrong suggestion to me. Try using `C-c [' to add the current org file. I am assuming that org files are created by hand and not by some daemon that spits out agenda files when you are away from emacs. >> Thanks >> Neilen >> >> >> >> >> --
Re: [O] Recursive org-agenda-files
Neilen Marais writes: > Hi, > > netty hacky gmail.com> writes: > >> >> Hi Neilen, >> >> I think you want these in your .emacs (from >> http://orgmode.org/worg/org-faq.html, "Can I add files recursively to >> my list of agenda files?"): >> (load-library "find-lisp") >> (setq org-agenda-files (find-lisp-find-files "~/org" "\.org$")) > > Thanks. I tried this, but as far as I can tell it won't automatically see new > files or directories as they are added, so I have to re-evaluate te setq every > time I add new projects or files. Or am I wrong? Have you considered adding it to say org-mode-hook? > Thanks > Neilen > > > > > --
Re: [O] Recursive org-agenda-files
Hi, netty hacky gmail.com> writes: > > Hi Neilen, > > I think you want these in your .emacs (from > http://orgmode.org/worg/org-faq.html, "Can I add files recursively to > my list of agenda files?"): > (load-library "find-lisp") > (setq org-agenda-files (find-lisp-find-files "~/org" "\.org$")) Thanks. I tried this, but as far as I can tell it won't automatically see new files or directories as they are added, so I have to re-evaluate te setq every time I add new projects or files. Or am I wrong? Thanks Neilen
Re: [O] Recursive org-agenda-files
Hi Neilen, I think you want these in your .emacs (from http://orgmode.org/worg/org-faq.html, "Can I add files recursively to my list of agenda files?"): (load-library "find-lisp") (setq org-agenda-files (find-lisp-find-files "~/org" "\.org$")) Or you can add each project directory to org-agenda-files yourself, however, this is not recursive, it only adds .org files under the project directories, not their sub-directories (see docstring of org-agenda-files: C-h v org-agenda-files): (setq org-agenda-files '("~/org/projA" "~/org/projB" "~/org/projC")) In my setup, I also use the following to exclude directory "exc" from the list: (eval-when-compile (require 'cl)) (setq org-agenda-files (remove-if '(lambda (x) (string-match (concat "^" (regexp-quote (expand-file-name "~/org/exc/"))) x)) org-agenda-files)) Net On Mon, Oct 3, 2011 at 8:48 AM, Neilen Marais wrote: > Hi, > > I like to have a directory per project, with an .org file in each > directory. Is there a way to set org-agenda-files such that it can > recursively scan my whole projects dir for all org files? > > Thanks > Neilen > >
[O] Recursive org-agenda-files
Hi, I like to have a directory per project, with an .org file in each directory. Is there a way to set org-agenda-files such that it can recursively scan my whole projects dir for all org files? Thanks Neilen