From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: Problem quitting properly from transient keymap with one keystroke Date: Fri, 20 Oct 2017 10:45:50 -0400 Message-ID: References: Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c12576e3fcaf1055bfb8953" X-Trace: blaine.gmane.org 1508510850 15800 195.159.176.226 (20 Oct 2017 14:47:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2017 14:47:30 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 20 16:47:26 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5YZm-0001I9-Nk for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2017 16:47:06 +0200 Original-Received: from localhost ([::1]:54325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5YZu-0007Ic-3i for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2017 10:47:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5YZ8-0007I8-TG for emacs-devel@gnu.org; Fri, 20 Oct 2017 10:46:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5YZ4-0004Zp-1X for emacs-devel@gnu.org; Fri, 20 Oct 2017 10:46:26 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5YZ3-0004Zk-Tz for emacs-devel@gnu.org; Fri, 20 Oct 2017 10:46:21 -0400 Original-Received: from mail-qt0-f171.google.com ([209.85.216.171]:50134) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1e5YZ3-0002ld-JN for emacs-devel@gnu.org; Fri, 20 Oct 2017 10:46:21 -0400 Original-Received: by mail-qt0-f171.google.com with SMTP id k31so18725906qta.6 for ; Fri, 20 Oct 2017 07:46:21 -0700 (PDT) X-Gm-Message-State: AMCzsaVrulNZ/E9SvDUwaTtRGMAwNY1IeaMgSckaKobBgIa5IauM4HU1 ygvyObPcf16IkNqpfhI0kaMSA7opnI2En+R/K2g= X-Google-Smtp-Source: ABhQp+QePwcofjXU4Kb/pr6dDLCfJJVZPmByvwplwJmQspT+0p0fvvizPV6LBtCt+1k8EJfvKc4ik8M0RFbaKAnWn8o= X-Received: by 10.237.43.99 with SMTP id p90mr7665576qtd.171.1508510781129; Fri, 20 Oct 2017 07:46:21 -0700 (PDT) Original-Received: by 10.200.12.74 with HTTP; Fri, 20 Oct 2017 07:45:50 -0700 (PDT) In-Reply-To: X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:219649 Archived-At: --94eb2c12576e3fcaf1055bfb8953 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Oct 20, 2017 at 8:27 AM, Stefan Monnier wrote: > > I can't just add a post-command-hook that calls the transient map > > disable function because calling (keyboard-quit) from the > > post-command-hook triggers an error and I imagine that is not a proper > > usage scenario. > > =E2=80=8B=E2=80=8B > Why do you need a post-command-hook? > =E2=80=8B=E2=80=8B HyControl uses post-command-hook to persist a prefix-argument value across commands and to continually display a help message in the minibuffer until exit. =E2=80=8B=E2=80=8B =E2=80=8B=E2=80=8BJust curious, why does set-transient-map use pre-command-= hook instead of post-command-hook=E2=80=8B to test whether or not to keep the transient-map enabled? This prevents the test from using the results of the most recent key binding run. --94eb2c12576e3fcaf1055bfb8953 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Oct 20, 2= 017 at 8:27 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>= ; I can't just add a post-command-hook that calls the transient map
> disable function because calling (keyboard-quit) from the
> post-command-hook triggers an error and I imagine that is not a proper=
> usage scenario.

=E2=80=8B=E2=80=8B
Why do you need a post-command-ho= ok?
=E2=80=8B=E2=80=8B
HyControl uses post-command-hook t= o persist a prefix-argument value across commands and to continually displa= y a help message in the minibuffer until exit.
=E2=80=8B=E2=80=8B
=E2=80= =8B=E2=80=8BJust curious, why does set-transient-map use pre-command-hook i= nstead of post-command-hook=E2=80=8B to test whether or not to keep the tra= nsient-map enabled?=C2=A0 This prevents the test from using the results of = the most recent key binding run.
--94eb2c12576e3fcaf1055bfb8953--