emacs-devel
[Top][All Lists]
Advanced

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

Re: History for query replace pairs


From: Stefan Monnier
Subject: Re: History for query replace pairs
Date: Wed, 22 Oct 2014 08:58:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> - You still have access to the "TO-history" in the FROM case, indirectly
>> (by browsing the corresponding FROM/TO pair and erasing the FROM and
>> the separator).
> The only problematic part is that if the user will be able
> to erase the separator, then the user rightfully might want
> to insert it back, but it's not straightforward to type a string
> with text properties.

`undo' should do it.

> Perhaps using the Widget library is too heavy to implement this,
> so it should be possible to have two fields in the minibuffer
> by putting the properties `field' and `read-only' on the separator.

The widget library is definitely too heavy.  And I don't like the idea
of making it read-only either.  Just use a special character/string, and
give it a special appearance via text-properties (make sure the user
can't delete just a part of it, so a single char is best, probably with
a display property), so that the user can tell it's not just text and so
that Elisp can reliably recognize it as well.
E.g. (propertize "\0" 'display (propertize " -> " 'face 'my-face))


        Stefan



reply via email to

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