From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: bug#7234: 24.0.50; strange message after text-scale-adjust Date: Wed, 20 Oct 2010 12:07:49 -0400 Message-ID: References: <87mxqbu1ii.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287594057 5187 80.91.229.12 (20 Oct 2010 17:00:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2010 17:00:57 +0000 (UTC) Cc: miles@gnu.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 20 19:00:55 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8c1z-0006m9-TP for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2010 19:00:55 +0200 Original-Received: from localhost ([127.0.0.1]:37496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8c1x-0006ey-9U for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2010 13:00:49 -0400 Original-Received: from [140.186.70.92] (port=40712 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8bqy-0001LC-8Y for emacs-devel@gnu.org; Wed, 20 Oct 2010 12:49:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8bCh-0003yl-Od for emacs-devel@gnu.org; Wed, 20 Oct 2010 12:07:52 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:31816 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8bCh-0003yb-L3; Wed, 20 Oct 2010 12:07:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An8KAIOwvkxMCpO7/2dsb2JhbACgUnpyv02FSgSSGw X-IronPort-AV: E=Sophos;i="4.57,356,1283745600"; d="scan'208";a="80225054" Original-Received: from 76-10-147-187.dsl.teksavvy.com (HELO ceviche.home) ([76.10.147.187]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 20 Oct 2010 12:07:50 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id EB33B66112; Wed, 20 Oct 2010 12:07:49 -0400 (EDT) In-Reply-To: (Kenichi Handa's message of "Wed, 20 Oct 2010 11:00:05 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131901 Archived-At: >> > 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