[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: improving query-replace and query-replace-regexp
From: |
Juri Linkov |
Subject: |
Re: improving query-replace and query-replace-regexp |
Date: |
Sun, 30 May 2004 23:59:57 +0300 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Miles Bader <address@hidden> writes:
> On Sun, May 30, 2004 at 12:15:00AM +0300, Juri Linkov wrote:
>> But an empty argument to M-% can't be used to repeat query-replace
>> because the first argument of query-replace makes sense even when
>> it is empty. It can be used to insert a replacement string between
>> all characters, i.e. to change a string like "abcdef" into ";a;b;c;d;e;f;"
>> by (query-replace "" ";"). This is an infrequent operation but
>> still makes sense.
>
> I don't think it's frequent enough to matter; the "empty string inserts
> between characters" usage is a kludgey hack, not something you expect people
> to know about.
I have no other objections to M-% RET. I only wanted to note that
an empty argument makes sense, but since it's infrequent, RET is ok.
There are other available methods to insert a string between all characters.
I tried Stefan's implementation and it works fine. I have only one remark:
if the last history item contains newlines, it may confuse users because
it displays only the closing square bracket at the minibuffer prompt.
--
Juri Linkov
http://www.jurta.org/emacs/
Re: improving query-replace and query-replace-regexp, Miles Bader, 2004/05/29
Re: improving query-replace and query-replace-regexp, Stefan Daschek, 2004/05/29