all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: luca.spinacci@seleniacomms.com
Subject: Replacing ocurrences of a string...
Date: Fri, 13 May 2005 15:15:14 +0200	[thread overview]
Message-ID: <OF752C2C49.09712867-ONC1257000.004717B0@SeleniaComms.com> (raw)


I generate a C function template in a buffer running a command.
I would like to replace every occurence of the <name> string
on direct request.
Let's say:
M-x my-template-generator

generates in my - C - buffer
a template like

/*
**********************
* <name>
**********************
void <name>()
{


} // <name>

I would like to be prompted for the function name to be replaced with.
Using (query-replace "<name>" "") in "my-template-generator" I have to
call SHIFT-e to be requested for "Edit replacement string: "  and
SHIFT-1 to replace every occurence of <name> with the new string "my-name".
Is there a smarter way (I'm sure there is) to be requested for the
replacement
string ("Edit replacement string: ") automatically as the template is
inserted
in the buffer without using SHIFT-e?
The function query-replace is not mandatory...

Thanks in advance,
Luca.

             reply	other threads:[~2005-05-13 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-13 13:15 luca.spinacci [this message]
     [not found] <mailman.5053.1115990680.2819.help-gnu-emacs@gnu.org>
2005-05-13 14:35 ` Replacing ocurrences of a string Pascal Bourguignon
2005-05-13 15:04 ` Greg Rowe

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

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

  git send-email \
    --in-reply-to=OF752C2C49.09712867-ONC1257000.004717B0@SeleniaComms.com \
    --to=luca.spinacci@seleniacomms.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 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.