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: [PATCH] Make `C-x {' and `C-x }' repeatable Date: Wed, 22 May 2013 17:47:18 -0400 Message-ID: References: <87mwrombc3.fsf@mail.jurta.org> <87r4gyondh.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369259255 16528 80.91.229.3 (22 May 2013 21:47:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 21:47:35 +0000 (UTC) Cc: Gauthier =?iso-8859-1?Q?=D6sterva?= =?iso-8859-1?Q?ll?= , Drew Adams , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 22 23:47:34 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UfGsg-0000Qs-1K for ged-emacs-devel@m.gmane.org; Wed, 22 May 2013 23:47:34 +0200 Original-Received: from localhost ([::1]:58962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfGsf-0003BC-Nl for ged-emacs-devel@m.gmane.org; Wed, 22 May 2013 17:47:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfGsW-0003Aw-V1 for emacs-devel@gnu.org; Wed, 22 May 2013 17:47:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfGsR-0005d2-VA for emacs-devel@gnu.org; Wed, 22 May 2013 17:47:24 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:60602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfGsR-0005cx-Qn for emacs-devel@gnu.org; Wed, 22 May 2013 17:47:19 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r4MLlIfA002026; Wed, 22 May 2013 17:47:18 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 1E05CB4030; Wed, 22 May 2013 17:47:18 -0400 (EDT) In-Reply-To: <87r4gyondh.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 22 May 2013 21:55:38 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4587=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4587> : streams <965642> : uri <1427390> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159734 Archived-At: > I don't know why a prefix arg exits temporary-overlay-map. Trying to > (define-key window-size-adjust-keymap [?\C-u] 'universal-argument) > doesn't help to fix this. `C-u' still terminates the key sequence > `C-x } } } } C-u }'. I haven't looked into it, but at least I wouldn't know offhand why that would be a problem (`universal-argument' is a special command with some nasty ad-hoc handling in the command_loop C code for it, but I can't think of an obvious reason why it would explain what you're seeing). >> I want to have a repeatable command bound to a key on `isearch-mode-map'. Of course. Bug#14095 is a clear bug linked to the following comment in set-temporary-overlay-map: ;; FIXME: That's the keymaps with highest precedence, except for ;; the `keymap' text-property ;-( the bug is actually wrong, because additionally to the `keymap' property, overriding-local-map and overriding-terminal-local-map are two more keymaps of higher precedence. So the right fix for it is to introduce a new keymap (call it "overriding-temporary-local-map" or something) which is like overriding-terminal-local-map except that it doesn't disable other keymaps (it just has higher precedence). > Maybe a better implementation would be with the help of > `set-temporary-overlay-map'. I'll try to do this for Isearch. Isearch might benefit from being changed to use such a new overriding-temporary-local-map as well. It might let us drop the isearch-other-char command (which has the drawback of putting things back onto unread-command-event, which is inherently unreliable in the presence of some function-key-map bindings, among other problems). Of course, such a change might also bump into new problems. Stefan