unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: C K Kashyap <ckkashyap@gmail.com>
To: MBR <mbr@arlsoft.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs equivalent of the ":g" command in vi
Date: Sat, 23 Jul 2011 08:32:03 +0530	[thread overview]
Message-ID: <CAGdT1gpGkwaiHuSkjbWwJLMTvjxkJ6t7bQKmBnKSmw4toJ0pRg@mail.gmail.com> (raw)
In-Reply-To: <4E29DD40.80909@arlsoft.com>

[-- Attachment #1: Type: text/plain, Size: 768 bytes --]

>
> Save your .emacs file: C-x C-s
>
>   Mark Rosenthal
> mbr@arlsoft.com
>
>   P.S. - Interesting side-note.  Did you know that the ed command:
>
>     g/regular expression/operation
>
> is where the name "grep" came from?  In ed and ex, the "g" means do a
> global search for the immediately following regular expression, and apply
> the operation to every matching line.  One such operation is "p" meaning
> "print".  Using "re" as shorthand for "regular expression", the ed command
> to print every line that matches a particular regular expression is:
>
>                 g/re/p
>
>
>
Thank you very much Mark for the detailed explanation and the interesting
side note :) I am inclined to the macro approach since the possibilities are
endless.

Regards,
Kashyap

[-- Attachment #2: Type: text/html, Size: 1445 bytes --]

  parent reply	other threads:[~2011-07-23  3:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22  8:42 Emacs equivalent of the ":g" command in vi C K Kashyap
2011-07-22  9:27 ` Peter Dyballa
2011-07-22  9:48   ` Thierry Volpiatto
2011-07-22 10:02     ` C K Kashyap
2011-07-22 10:12       ` Peter Dyballa
2011-07-22 10:41         ` C K Kashyap
2011-07-22 10:34       ` Thien-Thi Nguyen
2011-07-22 10:44         ` C K Kashyap
2011-07-22 10:45       ` Deniz Dogan
2011-07-22 10:46         ` Deniz Dogan
2011-07-22 19:03       ` Eric Abrahamsen
2011-07-22 20:27 ` MBR
2011-07-22 20:37   ` Andreas Röhler
2011-07-22 20:51     ` MBR
2011-07-23  7:10       ` Andreas Röhler
2011-08-15  0:27       ` Ken Goldman
2011-07-23  3:02   ` C K Kashyap [this message]
2011-07-23  8:44     ` suvayu ali

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAGdT1gpGkwaiHuSkjbWwJLMTvjxkJ6t7bQKmBnKSmw4toJ0pRg@mail.gmail.com \
    --to=ckkashyap@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbr@arlsoft.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.
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).