From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#15568: Lookup this-command-keys without a prefix argument Date: Fri, 11 Oct 2013 02:58:35 +0300 Organization: JURTA Message-ID: <871u3sy7io.fsf@mail.jurta.org> References: <8761t7l57d.fsf@mail.jurta.org> <87hacq6lsy.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1381451535 7517 80.91.229.3 (11 Oct 2013 00:32:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Oct 2013 00:32:15 +0000 (UTC) Cc: 15568@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 11 02:32:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VUQeQ-0006U9-By for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Oct 2013 02:32:18 +0200 Original-Received: from localhost ([::1]:51834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUQeQ-0007zd-0Z for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Oct 2013 20:32:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUQeH-0007zR-08 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 20:32:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUQeA-00044i-S8 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 20:32:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUQeA-00044e-Pe for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 20:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VUQeA-00007k-8m for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 20:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Oct 2013 00:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15568-submit@debbugs.gnu.org id=B15568.1381451477422 (code B ref 15568); Fri, 11 Oct 2013 00:32:02 +0000 Original-Received: (at 15568) by debbugs.gnu.org; 11 Oct 2013 00:31:17 +0000 Original-Received: from localhost ([127.0.0.1]:41898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VUQdR-00006h-0R for submit@debbugs.gnu.org; Thu, 10 Oct 2013 20:31:17 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:49486 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VUQdN-00006Y-SD for 15568@debbugs.gnu.org; Thu, 10 Oct 2013 20:31:14 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 09284258B9E935; Thu, 10 Oct 2013 17:31:11 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed, 09 Oct 2013 21:02:57 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79170 Archived-At: >> Also I discovered that to support a key sequence like >> `C-s C-u C-u C-l' requires adding the command `universal-argument-more' >> (and `universal-argument-minus' for completeness). > > Indeed, tho I think your fix is a workaround rather than a real fix: > Basically after the first C-u we're in some kind of transient > "universal-argument mode" and isearch shouldn't have to know the list of > commands that can be run in this mode, it should instead just "wait for > the mode to exit". > > This is a general issue regarding interaction between various uses of > set-temporary-overlay-map (and friends, since isearch doesn't actually > use set-temporary-overlay-map). There should be some kind of notion of > nesting, where the outer set-temporary-overlay-map should not exit as > long as the inner one is still active. Maybe `universal-argument--mode' should be defined as a minor mode and provide a variable with the same name that can be checked by isearch. This mode can be disabled using `on-exit'. Something like: (defun universal-argument--mode () (setq universal-argument--mode t) (set-temporary-overlay-map universal-argument-map nil (lambda () (setq universal-argument--mode nil)))) and in isearch.el: (and isearch-allow-prefix (or (memq this-command '(universal-argument digit-argument negative-argument)) universal-argument--mode))