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: Sun, 02 Oct 2022 09:20:35 -0700 Message-ID: References: <86r10jghs7.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22846"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 02 18:21:55 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 1of1j0-0005gp-Ro for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Oct 2022 18:21:54 +0200 Original-Received: from localhost ([::1]:34050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of1iz-0006rx-AH for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Oct 2022 12:21:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of1hp-00067H-OH for emacs-devel@gnu.org; Sun, 02 Oct 2022 12:20:41 -0400 Original-Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:46891) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of1ho-0004YY-0r for emacs-devel@gnu.org; Sun, 02 Oct 2022 12:20:41 -0400 Original-Received: by mail-pg1-x533.google.com with SMTP id 78so7897514pgb.13 for ; Sun, 02 Oct 2022 09:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=r0/lbbKDFIX+LlXAJKJIbIEWCcUSIrp+FpYuk0X5GGg=; b=Aou73TkfW78LWG42WojO+IWhHOrGRN/Zoo1/w9QPpSdi4MM0TuSWkw5fgnv5Y0+rb1 NLIdiTfxz1/2GNAjmhXo5A6linkACy85a2wcg3MMjcF6RgbkODcPMU7Y7iVFft+4xEDD 9b3MyxpJErlBa+nzX4docUX1YioFlC5mn20c5jKlhp0e3/eAwlpWXBQNswlORR1yxIDl 1k4PL3UdCUjnozq82pP4ia7cS/Nub4xpP04KhAa+sWmNu/I2O1apBCGGoBbGb6gZpUqz Ai1Bd6nIaQCpTa2uBQ1wKpJL+fcPmLiVVWm+DGoeVbzztwc6YXyEYIA+E6fNG+zvnWjv JiyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date; bh=r0/lbbKDFIX+LlXAJKJIbIEWCcUSIrp+FpYuk0X5GGg=; b=MtiFkxENpUn+PnRRQNdOsa5Ntw2Sg1auXsRNF0fkK40tgq3gR0QyjeQp63dGw4gM8n UUfjmmNJi5iqABjAT47Nv9j3E0ork8HLAWCtNTKha1uxeGeiWNR85ywT7EYqVHip+m7A dhApbAQZKYHmYFO4SCWy7DNXja2ZedqtES3CRcRvzp/CQDAgiiaSeVxXHTuk8H/2jySf S63rzxksUMR8rt3sR55CEYgTJu6/YGaoAuz3QgNCWDZHkIaiLAUWkDu/4XpzRfpW8xZn QhJmnlJNoFNIxRNQx0AiNg+lspz6ZVyYrxfoXUxQ6Y1mn+m1J942sK5W+o34Q3+6OANi NtNw== X-Gm-Message-State: ACrzQf3m2Z4w9uFuq6Vo4RFJIMv5k3U2mr53DKAg+/56HctA7MPlKIya Q2rLzZOZcjH+soPQLB+W/Hi+oGkrKyDf2g== X-Google-Smtp-Source: AMsMyM7hTyZjlGxfhnsDXwWNLaacmJyJbGA+XLpN0roVagqTXzOm2UwEywfVjL3tQnbQrr0wfnmmHA== X-Received: by 2002:a05:6a00:2906:b0:52a:bc7f:f801 with SMTP id cg6-20020a056a00290600b0052abc7ff801mr19039490pfb.49.1664727637830; Sun, 02 Oct 2022 09:20:37 -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 i13-20020a17090a2acd00b0020a8f44e52csm1169429pjg.38.2022.10.02.09.20.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Oct 2022 09:20:37 -0700 (PDT) In-Reply-To: <86r10jghs7.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 10 Sep 2022 22:18:16 +0300") Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=raman@google.com; helo=mail-pg1-x533.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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:296635 Archived-At: Juri Linkov writes: Hi, The suggestion you gave me, ie dont put the repeat property on the command that stops media works brilliantly --- excpt: If the media plays to completion while repeat is still active, then the repeat fails to deactivate. Any ideas on how to handle that? >> 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? > > 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? Currently 'exitfun' is used only by repeat-exit-timer. > >> I'd rather not call keyboard-quit explicitly -- that sounds like >> overkill? > > Or you could put 'repeat-exit-key' on 'unread-command-events'. --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8