unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Kenichi Handa <handa@m17n.org>
Cc: miles@gnu.org, emacs-devel@gnu.org
Subject: Re: bug#7234: 24.0.50; strange message after text-scale-adjust
Date: Wed, 20 Oct 2010 12:07:49 -0400	[thread overview]
Message-ID: <jwvpqv4g8r6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <tl7pqv5hbdm.fsf@m17n.org> (Kenichi Handa's message of "Wed, 20 Oct 2010 11:00:05 +0900")

>> > 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	other threads:[~2010-10-20 16:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tl762x0i1l2.fsf@m17n.org>
     [not found] ` <E1P7jwu-0005UJ-KX@fencepost.gnu.org>
     [not found]   ` <mailman.0.1287400359.30531.bug-gnu-emacs@gnu.org>
     [not found]     ` <87mxqbu1ii.fsf@catnip.gol.com>
2010-10-18 14:17       ` bug#7234: 24.0.50; strange message after text-scale-adjust Stefan Monnier
2010-10-19  0:37         ` Kenichi Handa
2010-10-19 16:26           ` Stefan Monnier
2010-10-20  2:00             ` Kenichi Handa
2010-10-20 16:07               ` Stefan Monnier [this message]
2010-10-21  1:21                 ` Kenichi Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpqv4g8r6.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).