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:36:00 -0400 Message-ID: References: Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1141bda2125ab9055bfb669c" X-Trace: blaine.gmane.org 1508510240 1307 195.159.176.226 (20 Oct 2017 14:37:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2017 14:37:20 +0000 (UTC) Cc: emacs-devel To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 20 16:37:16 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 1e5YQ8-0007J3-Ia for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2017 16:37:08 +0200 Original-Received: from localhost ([::1]:54297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5YQG-0003OS-34 for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2017 10:37:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5YPc-0003JG-PH for emacs-devel@gnu.org; Fri, 20 Oct 2017 10:36:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5YPX-00005Q-Sb for emacs-devel@gnu.org; Fri, 20 Oct 2017 10:36:36 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5YPX-00005G-PQ for emacs-devel@gnu.org; Fri, 20 Oct 2017 10:36:31 -0400 Original-Received: from mail-qt0-f178.google.com ([209.85.216.178]:49633) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1e5YPX-0006bH-EC for emacs-devel@gnu.org; Fri, 20 Oct 2017 10:36:31 -0400 Original-Received: by mail-qt0-f178.google.com with SMTP id k31so18687542qta.6 for ; Fri, 20 Oct 2017 07:36:31 -0700 (PDT) X-Gm-Message-State: AMCzsaVp9ASw+7psGDP9GTfaAU0bTiQksa/ww0aJICtJ3SkOR7Kqvoay 4hQCJLCIHWYIF/Hc814mWALDXRX1DpWJSmuYlG4= X-Google-Smtp-Source: ABhQp+QU8KOogVRYGeFHSp6T6uHnQsDAvn8qtK7hDFnsPutB5j7ARLS2HcBM6U4QXOt9G4gCw4/rZWa/NmDpg5tJihA= X-Received: by 10.200.44.9 with SMTP id d9mr7483151qta.173.1508510190949; Fri, 20 Oct 2017 07:36:30 -0700 (PDT) Original-Received: by 10.200.12.74 with HTTP; Fri, 20 Oct 2017 07:36:00 -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:219647 Archived-At: --001a1141bda2125ab9055bfb669c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Oct 20, 2017 at 8:42 AM, Oleh Krehel wrote: > Hi Bob, > > > Everything is working as desired except for disabling the transient map= . > > Both C-g and q should disable the transient map and run the on-exit > > function I have defined. > > Have you looked at the hydra package on ELPA? It's easy to do what you > describe with `defhydra'. > =E2=80=8BSo, I could I bind {C-g} in my hydra map, execute some functions a= nd then do a (keyboard-quit) and have that not trigger an error but just signal a quit? Bob --001a1141bda2125ab9055bfb669c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Oct 20, 2= 017 at 8:42 AM, Oleh Krehel <ohwoeowho@gmail.com> wrote:
Hi Bob,

> Everything is working as desired except for disabling the transient ma= p.
> Both C-g and q should disable the transient map and run the on-exit > function I have defined.

Have you looked at the hydra package on ELPA? It's easy to do wh= at you
describe with `defhydra'.

=E2=80=8BSo, I cou= ld I bind {C-g} in my hydra map, execute some functions and then do a (keyb= oard-quit)
and have that not trigger an error but just signal a quit?
Bob

--001a1141bda2125ab9055bfb669c--