[Top][All Lists]

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

Re: query-replace-read-args - be able to use word-at-point? init-value?

From: Juri Linkov
Subject: Re: query-replace-read-args - be able to use word-at-point? init-value?
Date: Tue, 12 Oct 2004 18:07:03 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

"Drew Adams" <address@hidden> writes:
> I think that this, or something similar, was already beat to death back in
> July, but I'm not sure that this side of it was raised. I'll desist at the
> first sign that no one wants to hear this, but let me argue this _once_. I
> think I'll make my point clearly enough that I won't have to follow up to
> reinforce the argument. If others want to discuss it, fine, but I won't push
> this discussion.

The current query-replace interface is far from ideal, so sooner or later 
it needs to be improved.

> So, I guess I'm asking:
> 1. Can't we do something better for q-r, so you can easily retrieve and edit
> the word-at-point? To me, that's a better default value than anything
> available currently.

With multiple default values, it is possible to make several values
accessible via M-n: the last search string, the word at point, whatever.

> 2. Is the debate over init-value closed? Are you sure it's a no-no that has
> to go?

As a solution for most problems I see a new function which would
display the minibuffer with several editable fields and return a list
of entered values.


(read-multiple-values '("Query replace: " " with ") ... '("abc" "def") ...)
                      ========== prompts ==========     = initial values =

displays the minibuffer like:

Query replace: abc with def
               ===      === - editable fields

So you need no init value: if you don't like the value of `from' argument
you can move the point from `to' field to `from' field with a special key
(e.g. TAB), edit it and return back to `to' field.

Juri Linkov

reply via email to

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