unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* query replace -- error with prompt instead of insert
@ 2011-09-13 17:00 fork
  2011-09-13 21:55 ` Ian Zimmerman
  0 siblings, 1 reply; 3+ messages in thread
From: fork @ 2011-09-13 17:00 UTC (permalink / raw)
  To: help-gnu-emacs

Is there a way to make query-replace flash and
error instead of inserting a "y"or "n" when 
I answer prompts beyond the buffer?

So if there are two instances of 'foo' and 
I replace 'foo' with 'bar' but hit
'y' 10 times, I don't want to insert 8 'y' 
characters, but flash and error instead.

(A similar thing for c-x e for executing 
macros would be great too).

Tx




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: query replace -- error with prompt instead of insert
  2011-09-13 17:00 query replace -- error with prompt instead of insert fork
@ 2011-09-13 21:55 ` Ian Zimmerman
  2011-09-14  8:06   ` suvayu ali
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Zimmerman @ 2011-09-13 21:55 UTC (permalink / raw)
  To: help-gnu-emacs


fork> So if there are two instances of 'foo' and I replace 'foo' with
fork> 'bar' but hit 'y' 10 times, I don't want to insert 8 'y'
fork> characters, but flash and error instead.

Your desires are contradictory.

The very purpose of prompts is to get input from a thinking human before
committing to each action.  If you know in advance you want to always
answer `y', you should use the promptless replace-string.

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Rule 420: All persons more than eight miles high to leave the court.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: query replace -- error with prompt instead of insert
  2011-09-13 21:55 ` Ian Zimmerman
@ 2011-09-14  8:06   ` suvayu ali
  0 siblings, 0 replies; 3+ messages in thread
From: suvayu ali @ 2011-09-14  8:06 UTC (permalink / raw)
  To: Emacs mailing list

On Tue, Sep 13, 2011 at 11:55 PM, Ian Zimmerman <itz@buug.org> wrote:
>  If you know in advance you want to always
> answer `y', you should use the promptless replace-string.

or respond ! to the first prompt.

-- 
Suvayu

Open source is the future. It sets us free.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-14  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 17:00 query replace -- error with prompt instead of insert fork
2011-09-13 21:55 ` Ian Zimmerman
2011-09-14  8:06   ` suvayu ali

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).