unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: C K Kashyap <ckkashyap@gmail.com>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: String replace with lisp code
Date: Mon, 18 Jul 2011 13:37:31 +0530	[thread overview]
Message-ID: <CAGdT1gqXvV7H1GMkUzV=Et1CPJ_DfprqMR7=kyW1jeNB=TH=Qg@mail.gmail.com> (raw)
In-Reply-To: <4E23CF23.4050908@easy-emacs.de>

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

>
>
> M-x query-replace-regexp,
> \(sea\)
> RET
> \,(progn (or count (setq count 1))(setq count (1+ count))(concat "("
> (number-to-string count) ")" \1))
> RET
>
> ;;;;;;;;;;;;
>
> \,EXPR
>
> evaluates the expression and the takes the result for replacement.
>
>
> Andreas
>
> --
> https://launchpad.net/python-**mode <https://launchpad.net/python-mode>
> https://launchpad.net/s-x-**emacs-werkstatt/<https://launchpad.net/s-x-emacs-werkstatt/>
>
>
>
Thank you very much Teemu and Andreas!
Regards,
Kashyap

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

  reply	other threads:[~2011-07-18  8:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  5:36 String replace with lisp code C K Kashyap
2011-07-18  6:13 ` Andreas Röhler
2011-07-18  8:07   ` C K Kashyap [this message]
2011-07-22  0:39   ` Tim Landscheidt
2011-07-18  6:14 ` Teemu Likonen

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='CAGdT1gqXvV7H1GMkUzV=Et1CPJ_DfprqMR7=kyW1jeNB=TH=Qg@mail.gmail.com' \
    --to=ckkashyap@gmail.com \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=help-gnu-emacs@gnu.org \
    /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).