From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#17642: pre-command-hook has thousands of `clear-transient-map' in 24.3.91.1 Date: Fri, 30 May 2014 21:36:59 -0400 Message-ID: References: <87vbsnylw8.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401500309 15931 80.91.229.3 (31 May 2014 01:38:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2014 01:38:29 +0000 (UTC) Cc: 17642@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 31 03:38:21 2014 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 1WqYFZ-0003Dr-0H for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 May 2014 03:38:21 +0200 Original-Received: from localhost ([::1]:57295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqYFY-0006WN-MV for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 May 2014 21:38:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqYFO-0006WF-56 for bug-gnu-emacs@gnu.org; Fri, 30 May 2014 21:38:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WqYFG-0002jZ-KY for bug-gnu-emacs@gnu.org; Fri, 30 May 2014 21:38:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqYFG-0002jV-HX for bug-gnu-emacs@gnu.org; Fri, 30 May 2014 21:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WqYFF-0003P0-VS for bug-gnu-emacs@gnu.org; Fri, 30 May 2014 21:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 May 2014 01:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17642 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17642-submit@debbugs.gnu.org id=B17642.140150022912981 (code B ref 17642); Sat, 31 May 2014 01:38:01 +0000 Original-Received: (at 17642) by debbugs.gnu.org; 31 May 2014 01:37:09 +0000 Original-Received: from localhost ([127.0.0.1]:38185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqYEO-0003NI-Qx for submit@debbugs.gnu.org; Fri, 30 May 2014 21:37:09 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:47878) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqYEL-0003Mj-RZ for 17642@debbugs.gnu.org; Fri, 30 May 2014 21:37:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVPO+IOj/2dsb2JhbABSB4MGg0rAPYEXF3SCJQEBAQECAVYjBQsLNBIUGA0kiAQI0hkXjjJIB4Q4BKkZgWqBcYFbIYEsIw X-IPAS-Result: ArUGAIDvNVPO+IOj/2dsb2JhbABSB4MGg0rAPYEXF3SCJQEBAQECAVYjBQsLNBIUGA0kiAQI0hkXjjJIB4Q4BKkZgWqBcYFbIYEsIw X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="65128761" Original-Received: from 206-248-131-163.dsl.teksavvy.com (HELO pastel.home) ([206.248.131.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 May 2014 21:37:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C271E602E6; Fri, 30 May 2014 21:36:59 -0400 (EDT) In-Reply-To: <87vbsnylw8.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 30 May 2014 23:52:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) 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:89782 Archived-At: > Helm is using `set-transient-map' a lot and it seems `set-transient-map' > doesn't remove properly its `clearfun' from `pre-command-hook' or more > exactly the `clearfun' doesn't remove itself from `pre-command-hook'. Clearly, that's what we see, but the question is "why". The code does do (remove-hook 'pre-command-hook clearfun) so why is this code not run? Maybe it's because of the new condition: ((not (eq map (cadr overriding-terminal-local-map))) ;; There's presumably some other transient-map in ;; effect. Wait for that one to terminate before we ;; remove ourselves. ;; For example, if isearch and C-u both use transient ;; maps, then the lifetime of the C-u should be nested ;; within isearch's, so the pre-command-hook of ;; isearch should be suspended during the C-u one so ;; we don't exit isearch just because we hit 1 after ;; C-u and that 1 exits isearch whereas it doesn't ;; exit C-u. t) IOW, could it be that Helm keeps adding new transient-maps, rather than follow the usual "nesting" of transient maps? Stefan