help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple search strings in query-replace-regexp


From: David Kastrup
Subject: Re: multiple search strings in query-replace-regexp
Date: Sat, 07 Oct 2006 11:11:15 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:

> [A complimentary Cc of this posting was NOT [per weedlist] sent to
> David Kastrup 
> <dak@gnu.org>], who wrote in article <85iriwy3m0.fsf@lola.goethe.zz>:
>> > [A complimentary Cc of this posting was NOT [per weedlist] sent to
>> > David Kastrup 
>> > <dak@gnu.org>],
>> 
>> I already told you to leave off "complimentary copies" to group
>> articles: they are a breach of netiquette since they add no valuable
>> information at all and tend to confuse the recipient into having to
>> reply multiple times: once in mail, and later, when the mistake has
>> been noticed, on the group again.
>
> Fill free to read this header again.  Thanks.
>
> BTW, you know that sending BLIND Cc is considered a breach of
> netiquette, right, and you know the reasons?  And still you do it...
> Sigh...

That was not a blind CC.  That was a separate mail sent first, before
I noticed.  It was the reply to your mail.  I had to repost this reply
to the list when I noticed.

You should have noticed the difference: the group version carried the
complaint, the mail version didn't.

So you are, in effect, complaining that your "courtesy copy" had just
the bad effect I told you it had.

>> Please stop this nuisance.  You can expect that people writing on
>> Usenet groups are also reading there.
>
> Your statement would have some significance if Usenet were a
> reliable media.  It was not 20 years ago.  It still is not.

But your message contained no information that would have been
personally important to me.  So there was no point in making sure that
it specifically reached me in case Usenet failed.

>> >> >> C-M-% \(foo\)\|\(rock\)\|metal RET
>> >> >> \,(cond (\1 "bar") (\2 "house") ("goa")) RET
>> >> >
>> >> > To make it useful, one needs a function to count the number of
>> >> > parentheses in a given regular expression.  Is there?
>> >
>> >> Uh WHAT?  You just type the above stuff.  Why would that not be
>> >> useful?
>> >
>> > How many people do you know who would type something like this?  :-(
>
>> Well, enough for the idiom to be useful.  That's why it was invented
>> and documented.
>
> Enough to invent and document it.  AFAIK, not enough for it to be
> useful.

Well, if it is not useful, there is no point in complaining about it.
Just don't use it, then.

>> > And to have a "generally usable" wrapper, one needs a way to
>> > identify how many paren groups are inside your "foo" and "rock"
>> > regular expressions.
>> 
>> I can't actually think of a user interface for such a wrapper that
>> would not really complicate things.  In particular if you want to
>> refer to matched groups in the replacements, it is pretty hard to
>> come up with anything close to a useful interface.
>
> All this means is that you had a bad day.  Just revisit it in a day
> or so, if you do not know the answer already.  [Hint at the end of
> the message. ;-]

> Hint: one presses ENTER to end the replacement string.  What about
> pressing something els, like C-u ENTER?  ;-)

How about rereading what I wrote above?  "In particular if you want to
refer to matched groups in the replacements, it is pretty hard to come
up with anything close to a useful interface."

So how does C-u RET make it easy to refer to matched groups?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]