[Orgmode] Re: Search all `org-agenda-files'

2008-04-19 Thread Mario Peter
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.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Search all `org-agenda-files'

2008-04-18 Thread Leo
On 2008-04-18 04:44 +0100, Carsten Dominik wrote:
 Internal commands for this in Org are:

[...]

 - Carsten

Great. Both are what I am looking for.

Thanks,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

Use the better alternative -- http://www.openoffice.org/



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Search all `org-agenda-files'

2008-04-18 Thread Bernt Hansen
Carsten Dominik [EMAIL PROTECTED] writes:

 Internal commands for this in Org are:

 1. multi-occur, a standard emacs command.  To apply it to the
   agenda files, call it through the agenda dispatcher, for me this
   is `C-c a /'.

   That does not include any archive files though.  To do so,
   get the new version from the git repo and do

(setq org-agenda-text-search-extra-files '(agenda-archives))


Great!  I learn more useful org-mode/Emacs commands everyday :)


 2. You can also use search view, which is a new agenda view and allows
 you
   to search for multiple words and/or regexps which all need to match
 in an
   entry, not necessarily in a single line.  It searches for whole
 words, not
   partial words.  Hmm, maybe it should for partial words as well?

   C-c a S +word1 +word2 -excludethisword RET

C-c a s +word1 +word2 -excludethisword RET
  ^
  lowercase 's'

   This also searched the extra files defined above.

I tried this with the org-agenda-text-search-extra-files setting above
and it runs through each of my archives stating they don't exist.

non-existent file todo.org_archive. [R]emove from list or [A]bort?

Maybe it's looking in the wrong directory?

Thanks for this.  I can see this will be really useful for digging up
my old notes in my (now huge) org files (and their archives) :-)

Regards,
Bernt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Search all `org-agenda-files'

2008-04-18 Thread Jost Burkardt
Hi Leo,

is

M-x org-occur-in-agenda-files 

what you are looking for?

 Dear All,

 Have you ever wanted to retrieve some information from your org files
 regarding some projects?

 I wonder whether a command similar to `occur' but applies to all files
 listed in `org-agenda-files' and their corresponding ARCHIVED files
 might be desirable for org users.

 Thank you for considering this proposal.

 Regards,
 -- 
 .:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

 Use the better alternative -- http://www.openoffice.org/



 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--
 Jost



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Search all `org-agenda-files'

2008-04-17 Thread Eddward DeVilla
On Thu, Apr 17, 2008 at 7:12 AM, Bernt Hansen [EMAIL PROTECTED] wrote:
  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

  is probably simpler.

I have org-mode store my agenda file list in a separate file instead
of the .emacs.  So I can do something like:

  grep ^foo$ `cat ~/.agenda_files`

I can't say I've had the need to.

Edd


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode