* Search all `org-agenda-files'
@ 2008-04-17 9:57 Leo
2008-04-17 12:12 ` Bernt Hansen
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Leo @ 2008-04-17 9:57 UTC (permalink / raw)
To: emacs-orgmode
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Search all `org-agenda-files'
2008-04-17 9:57 Search all `org-agenda-files' Leo
@ 2008-04-17 12:12 ` Bernt Hansen
2008-04-17 14:34 ` Eddward DeVilla
2008-04-19 12:47 ` Mario Peter
2008-04-17 18:23 ` Jost Burkardt
` (2 subsequent siblings)
3 siblings, 2 replies; 10+ messages in thread
From: Bernt Hansen @ 2008-04-17 12:12 UTC (permalink / raw)
To: Leo; +Cc: emacs-orgmode
Leo <sdl.web@gmail.com> writes:
> 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.
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
is probably simpler.
-Bernt
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Search all `org-agenda-files'
2008-04-17 12:12 ` Bernt Hansen
@ 2008-04-17 14:34 ` Eddward DeVilla
2008-04-19 12:47 ` Mario Peter
1 sibling, 0 replies; 10+ messages in thread
From: Eddward DeVilla @ 2008-04-17 14:34 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode, Leo
On Thu, Apr 17, 2008 at 7:12 AM, Bernt Hansen <bernt@norang.ca> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Search all `org-agenda-files'
2008-04-17 9:57 Search all `org-agenda-files' Leo
2008-04-17 12:12 ` Bernt Hansen
@ 2008-04-17 18:23 ` Jost Burkardt
2008-04-18 3:44 ` Carsten Dominik
2008-04-18 13:31 ` Joel J. Adamson
3 siblings, 0 replies; 10+ messages in thread
From: Jost Burkardt @ 2008-04-17 18:23 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Search all `org-agenda-files'
2008-04-17 9:57 Search all `org-agenda-files' Leo
2008-04-17 12:12 ` Bernt Hansen
2008-04-17 18:23 ` Jost Burkardt
@ 2008-04-18 3:44 ` Carsten Dominik
2008-04-18 3:58 ` Carsten Dominik
` (2 more replies)
2008-04-18 13:31 ` Joel J. Adamson
3 siblings, 3 replies; 10+ messages in thread
From: Carsten Dominik @ 2008-04-18 3:44 UTC (permalink / raw)
To: Leo; +Cc: emacs-orgmode
Hi Leo and others,
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))
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
This also searched the extra files defined above.
- Carsten
On Apr 17, 2008, at 11:57 AM, Leo wrote:
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Search all `org-agenda-files'
2008-04-18 3:44 ` Carsten Dominik
@ 2008-04-18 3:58 ` Carsten Dominik
2008-04-18 7:06 ` Leo
2008-04-18 12:45 ` Bernt Hansen
2 siblings, 0 replies; 10+ messages in thread
From: Carsten Dominik @ 2008-04-18 3:58 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode, Leo
On Apr 18, 2008, at 5:44 AM, Carsten Dominik wrote:
> Hi Leo and others,
>
> 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))
>
> 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
Sorry, this must be C-c a s
small "s".
- Carsten
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Search all `org-agenda-files'
2008-04-18 3:44 ` Carsten Dominik
2008-04-18 3:58 ` Carsten Dominik
@ 2008-04-18 7:06 ` Leo
2008-04-18 12:45 ` Bernt Hansen
2 siblings, 0 replies; 10+ messages in thread
From: Leo @ 2008-04-18 7:06 UTC (permalink / raw)
To: emacs-orgmode
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Search all `org-agenda-files'
2008-04-18 3:44 ` Carsten Dominik
2008-04-18 3:58 ` Carsten Dominik
2008-04-18 7:06 ` Leo
@ 2008-04-18 12:45 ` Bernt Hansen
2 siblings, 0 replies; 10+ messages in thread
From: Bernt Hansen @ 2008-04-18 12:45 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode, Leo
Carsten Dominik <dominik@science.uva.nl> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Search all `org-agenda-files'
2008-04-17 9:57 Search all `org-agenda-files' Leo
` (2 preceding siblings ...)
2008-04-18 3:44 ` Carsten Dominik
@ 2008-04-18 13:31 ` Joel J. Adamson
3 siblings, 0 replies; 10+ messages in thread
From: Joel J. Adamson @ 2008-04-18 13:31 UTC (permalink / raw)
To: Leo; +Cc: emacs-orgmode
Leo <sdl.web@gmail.com> writes:
> 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.
Try using ibuffer, filtering by name to files containing "org" or
whatever appropriate regex, then the command "O" will run something like
M-x occur. You have to mark the files before you run O.
Joel
--
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
(617) 643-1432
(303) 880-3109
Public key: http://pgp.mit.edu
The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Search all `org-agenda-files'
2008-04-17 12:12 ` Bernt Hansen
2008-04-17 14:34 ` Eddward DeVilla
@ 2008-04-19 12:47 ` Mario Peter
1 sibling, 0 replies; 10+ messages in thread
From: Mario Peter @ 2008-04-19 12:47 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-04-19 12:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-17 9:57 Search all `org-agenda-files' Leo
2008-04-17 12:12 ` Bernt Hansen
2008-04-17 14:34 ` Eddward DeVilla
2008-04-19 12:47 ` Mario Peter
2008-04-17 18:23 ` Jost Burkardt
2008-04-18 3:44 ` Carsten Dominik
2008-04-18 3:58 ` Carsten Dominik
2008-04-18 7:06 ` Leo
2008-04-18 12:45 ` Bernt Hansen
2008-04-18 13:31 ` Joel J. Adamson
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.