emacs-devel
[Top][All Lists]
Advanced

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

Re: bug#7234: 24.0.50; strange message after text-scale-adjust


From: Stefan Monnier
Subject: Re: bug#7234: 24.0.50; strange message after text-scale-adjust
Date: Wed, 20 Oct 2010 12:07:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> > Shall I install that change, or do you have a better prompt
>> > string, or should we wait for your alternative
>> > implementation?
>> Go ahead with your change.
> Ok, done.

>> > I think the situation is similar to isearch.  How does
>> > isearch solve it?
>> isearch uses an overlay map (overriding-terminal-local-map) rather than
>> read-key/event/char.
> Then, what's the pros and cons of using an overlay map and
> your set-temporary-overlay-map?

I think isearch would like to use set-temporary-overlay-map.
To a large extent they are very similar, but using
overriding-terminal-local-map means that the non-isearch bindings
(which cause isearch to exit) are not directly available, so isearch as
to catch them with a default binding (define-key map [t] ...), then
exit and push the events on unread-command-events for re-execution.

And unread-command-events is evil because it's hellishly difficult to
make it behave 100% correctly in all cases where function-key-map,
input-decode-map, key-translation-map, keyboard-translate-table,
input-methods, etc... are involved.

But set-temporary-overlay-map didn't exist back then (it barely exists
now) ... and it's far from obvious that someone will find the motivation
to change isearch to use something like set-temporary-overlay-map.

>> > With that, how to show the prompt?
>> You'd do it with `message'.
> Doesn't the message disappear when a command in the
> temporary overlay-map is executed?

Yes.  So you only get it at the beginning of the lifetime of the
temporary-overlay-map, or you have to do extra work to also display it
later on (e.g. with a post-command-hook: maybe
set-temporary-overlay-map should provide such a feature itself, so it's
encapsulated).

As I said, set-temporary-overlay-map barely exists now and while it
solves some problems, it comes with a new set of problems.  I know its
good sides (the ones that pushed me to try and play with it) but I'm
only slowly learning the downsides.


        Stefan



reply via email to

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