Bernt Hansen <bernt <at> norang.ca> writes:
[...]
> It seems to me that grep works just fine for this application. I put
> all my org files under a single directory so that a single recursive
> grep for a regexp over *.org and *.org_archive gets me the information I
> want. Then I use org to edit/read the files at the specific line
> matches.
>
> If you do this in org-mode do you only search files in org-agenda-files
> (and maybe their archives?). If you scatter files around a lot how do
> you locate them all for the search?
>
> $ find $HOME -name '*.org' -o -name '*.org_archive' | xargs grep -n -e $REGEXP
for me coming from planner and muse it is useful to search in my old
repositories too. Assuming everything is under ~/org I can easygoing search:
(defun mpe-org-grep (string)
"Grep wrapper for searches in org hierarchy"
(interactive "sOrg Search (regexp): ")
(let ((grep-find-command "find ~/org/ -type f -print0 | xargs -0 -e grep -nHi
-e "))
(grep (concat grep-find-command string))))
regards, Mario
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode