emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: 노정태 <basil83@gmail.com>
To: suvayu ali <fatkasuvayu+linux@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Re: Search files in a folder
Date: Mon, 13 Sep 2010 16:15:41 +0900	[thread overview]
Message-ID: <AANLkTik=uyD=itgu3GLmASHr71rq2WdsTHYG85hthk0H@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=ty1tcxRvyMOWaOjk-7JRSNTdZ9jEdOf1xbcdx@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1656 bytes --]

Suvayu, I read your comment, and googled about what I can't understand.

In Emacs, M-x grep <RET> Filename * <RET> does what I want. Thank you.

And now, I want to make it as one elisp command.

What should I do? Can anybody write a simple script?

Sincerely, Jeongtae.


suvayu ali <fatkasuvayu+linux@gmail.com <fatkasuvayu%2Blinux@gmail.com>>
2010/9/13 suvayu ali <fatkasuvayu+linux@gmail.com<fatkasuvayu%2Blinux@gmail.com>
>

> 2010/9/12 노정태 <basil83@gmail.com>:
> > Thank you everyone.
> >
> > I learned I could do it with grep, but I don't know how to use grep
> > properly.
> >
>
> grep is one of my favourite *nix tools. :)
>
> You can try invoking grep in many ways. these are my most used options,
>
> 1. simply search for a regex and show results.
>    grep -nH -E <regex> <wildcard_to_match files>
> 2. search for results and show results with context
>    grep -nHB <number> -E <regex> <wildcard_to_match files>
>    # context lines before matching lines
>    grep -nHA <number> -E <regex> <wildcard_to_match files>
>    # context lines after matching lines
>    grep -nHC <number> -E <regex> <shell_wildcard_to_match files>
>    # context lines from both before and after matching lines
> 3. You can try `M-x find-grep' if you want more control over what file
> you want to search
>    find -type f -name <shell_wildcard_to_match_files> -print0 | xargs
> -0 grep -nH -E <regex>
>
> Note: find and grep regex are a little different from emacs regex
> because of some quoting differences. 'man grep' is your friend.
>
> GL :)
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>

[-- Attachment #1.2: Type: text/html, Size: 2333 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

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

  reply	other threads:[~2010-09-13  7:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-12 19:11 Search files in a folder 노정태
2010-09-12 19:31 ` Eric S Fraga
2010-09-12 20:29   ` suvayu ali
2010-09-13  1:51   ` Matt Lundin
2010-09-13  4:09     ` 노정태
2010-09-13  4:22       ` suvayu ali
2010-09-13  7:15         ` 노정태 [this message]
2010-09-13 16:19           ` Matt Lundin
2010-09-14 16:06             ` 노정태
2010-09-20  8:31             ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTik=uyD=itgu3GLmASHr71rq2WdsTHYG85hthk0H@mail.gmail.com' \
    --to=basil83@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fatkasuvayu+linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).