From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Q: How to programatically terminate repeat-mode Date: Sat, 10 Sep 2022 12:44:48 -0700 Message-ID: <25372.59696.529490.482429@google.com> References: <86r10jghs7.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7775"; mail-complaints-to="usenet@ciao.gmane.io" Cc: juri@linkov.net, emacs-devel@gnu.org To: raman@google.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 10 21:46:32 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oX6Qy-0001kX-0r for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 21:46:32 +0200 Original-Received: from localhost ([::1]:38612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX6Qw-0007wg-NF for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 15:46:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX6PP-00076y-KA for emacs-devel@gnu.org; Sat, 10 Sep 2022 15:44:55 -0400 Original-Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:45967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX6PO-0007Rf-39 for emacs-devel@gnu.org; Sat, 10 Sep 2022 15:44:55 -0400 Original-Received: by mail-pg1-x534.google.com with SMTP id h188so4569384pgc.12 for ; Sat, 10 Sep 2022 12:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:from:to:cc:subject:date; bh=iiLU/scvy9Dvj1Is21OL+cLbDUdPxPQFjehJsycrBWA=; b=knJT9st6xO8Zl+7yoDLX1jyLmVxhfj/NA7+Hr1dnKrXBwKfl2OBJrsgHmTmW0POWOj VPDHjtiu78S3P5eUdDPPd5iRVYLYu40QL+hENhWIaQzFU2l5fP5hdxT1IsxYd1YMlF3q EqIc9A+EMxPNvzTP1i9Ss7wzZq7USLrTfgbpn6IZvwztKDlj+rFiphWfmaBhPMnxZ/8p WFirnz0rUkU05WDBkaqjIZ9mhpPB+ClxWDLw8Su+oZKremTPmXDwwU9TUWwcffhGqkVD rDUHBotYWZH+ObjWkFWLwJoubhK7gH4jGhFNrdgZRufnQjb2aIxGYG56agDg9LzZrUSl urzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:x-gm-message-state:from :to:cc:subject:date; bh=iiLU/scvy9Dvj1Is21OL+cLbDUdPxPQFjehJsycrBWA=; b=K5GfnrEyKCyV+X89tU+k78yl1YSvd0wAbFC/JY1ltv/yE0fCQ07kc0K0dxNwu81GRb OwJKaolLcTdLB2xWU/kiIryvETTnBZAMUI06lUg3gOYEZWChRa1xNnluz6sl9q8v96pO KysAM2AMjfLhhuBt/3J9dd37B3Ya2x4F7FUYayluPesc8TvCQXg1BjreX4dLUVAz+Pbk 4W4giX/vkdvy8t/Iz4hPMSs9d+tGj/IlOI5xU903wsxhJWHRM+sa0YIS3EoK9tN7cGba ihlNIXoUgVBx6JQAsnatINBtk09yJeZ8oZxEGITcJM86ZsKQL5N/cWn8wOH8Z0E77C0L Rjzw== X-Gm-Message-State: ACgBeo0PAetCpc29KrnIJ47rAcI51RFxO4KVtaPJd4RRbibdRMxE53DE RQF/sLQFeO3iPJjOZdAjL9ipUuaJOTkz3Q== X-Google-Smtp-Source: AA6agR4t/5K8QNlIZgB3e+xds4h1KjJFueh6ByZf1GnAXBoyTrKkK+4GmJ2obnPfy52j30NhwU7qGg== X-Received: by 2002:a63:515d:0:b0:42a:cf33:4320 with SMTP id r29-20020a63515d000000b0042acf334320mr8499029pgl.21.1662839092158; Sat, 10 Sep 2022 12:44:52 -0700 (PDT) Original-Received: from raman9 (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id p9-20020a17090a348900b00200aff02e90sm2408714pjb.18.2022.09.10.12.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Sep 2022 12:44:51 -0700 (PDT) In-Reply-To: X-Mailer: VM 8.1.1 under 29.0.50 (x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=raman@google.com; helo=mail-pg1-x534.google.com X-Spam_score_int: -177 X-Spam_score: -17.8 X-Spam_bar: ----------------- X-Spam_report: (-17.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-0.214, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295145 Archived-At: Works like a charm, that took less than a minute to implement and test:-) T.V Raman writes: > Juri Linkov writes: >=20 > will try your suggestions. Would be nice to have a simple API to do= > this. >=20 > >> I have been using repeat-mode to good effect in emacspeak e.g. in= the > >> context of its media player etc. > >> > >> One issue I have is that once a command to stop media has been > >> executed, I'd like the repeat to stop i.e. without me executing > >> another explicit kbd command like C-g to terminate the repeat. > > > > The simplest way is just not to put the property 'repeat-map' > > on the symbol of the command that stops media. Then executing > > this command will terminate the repeat. > > > >> How do I do this from lisp=3F > > > > It's no easy to do the same from Lisp because in repeat-post-hook > > the value of 'exitfun' returned from 'set-transient-map' is not > > exposed outside. Maybe the value of 'exitfun' should be stored > > in a variable=3F Currently 'exitfun' is used only by repeat-exit-= timer. > > > >> I'd rather not call keyboard-quit explicitly -- that sounds like= > >> overkill=3F > > > > Or you could put 'repeat-exit-key' on 'unread-command-events'. >=20 > --=20 >=20 > Thanks, >=20 > --Raman(I Search, I Find, I Misplace, I Research) > =E2=99=89 Id: kg:/m/0285kf1 =F0=9F=A6=AE --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =E2=99=89 Id: kg:/m/0285kf1 =F0=9F=A6=AE -- Thanks, --Raman(I Search, I Find, I Misplace, I Research) ♉ Id: kg:/m/0285kf1 🦮