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: Mon, 3 Oct 2022 07:19:34 -0700 Message-ID: <25402.61302.543034.734529@retriever.mtv.corp.google.com> References: <86r10jghs7.fsf@mail.linkov.net> <86czba2jib.fsf@mail.linkov.net> <86mtadv0kv.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="28662"; mail-complaints-to="usenet@ciao.gmane.io" Cc: raman@google.com, emacs-devel@gnu.org To: juri@linkov.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 03 16:23:54 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 1ofMML-0007Kj-GQ for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Oct 2022 16:23:53 +0200 Original-Received: from localhost ([::1]:54166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofMMJ-0001hX-VY for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Oct 2022 10:23:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofMIG-0006eL-E1 for emacs-devel@gnu.org; Mon, 03 Oct 2022 10:19:40 -0400 Original-Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:33583) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofMIE-0007Em-Pc for emacs-devel@gnu.org; Mon, 03 Oct 2022 10:19:40 -0400 Original-Received: by mail-pg1-x52a.google.com with SMTP id f193so9831743pgc.0 for ; Mon, 03 Oct 2022 07:19:37 -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=I2tRjm8V4WFiqMvnadr/i9e18Fp7awTJaYmY9WRfavY=; b=pWqdGRswmUAKhmFwJaMb5SVamtoccFzcEQbZYoXSgq9+8gMtvlAZxCs1sEoXXoDygM 5Qt0X4zPVPd8VmwHqDw6miGUKYHR7eIERAXR+azOlw9PSgDKdDZNqb/yEs4/v9R0MNRC EiueBZyP3TdBmxj2du/p/KauU9uJKZ845FO+uSvxifJWTiXfWKr2PTrByOlAnBD8JzLF XzVkC7W3J1eWHoncY4dRENMg4J0cpcYP6zA06/7+0Z5uYuEG5wuHvt/baQ4FpFwFNv7y Kq/ius9of6o1O+t6BqvjkWr1wiw6sRe+HSKg8LNbhn9Z13Ri3hKgHXHAkVgPigAyXxvo tt0g== 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=I2tRjm8V4WFiqMvnadr/i9e18Fp7awTJaYmY9WRfavY=; b=VclK2QaH5FeGLl8AWQrpIDA0GtO3R9da4x8okfeq7hyHbzvrjWfFBaK8d1i++sb2cU N42JPiJg3XH264u9j+LIGYFevLEsnFt/TbnUo2xmoNDNNKqXAleZQYiC64c+HCQhw1Zp SrubhTpyTWGjTNv5ZwlQ4arDiDotrZ0V/KherL+ph7wRjH79KjxBMVi4zmg975/80wkp A3gM7T36gdXhJtE1vtnmoHRQQxGkrux19Q6Rfz/DohkkixK0jhAO3+n/mZjttQVJ0tjp hKTR1lytL+w1zUOvesfLYCqVr12bFLpeULzoXbGxnApISjKDUxwdPyxGlwo4gg37OaRW Dtvg== X-Gm-Message-State: ACrzQf1yuoIIrKj83pRkE6xlAllhga8h55I0AYNAYPiBSOG7maPXa3ty rCyiR0rD+LgsGR4aO3HFzlf1xtqOdxlltQ== X-Google-Smtp-Source: AMsMyM4QyNxX6zEnvXdd63SHN/4vBbYk1tZAkjUnqVIsuWjflAZcr/8ynp0uN3H96FK8+l0mOhCZFQ== X-Received: by 2002:a05:6a00:d76:b0:560:8a2e:6cce with SMTP id n54-20020a056a000d7600b005608a2e6ccemr9141600pfv.6.1664806776086; Mon, 03 Oct 2022 07:19:36 -0700 (PDT) Original-Received: from retriever.mtv.corp.google.com ([2620:0:1000:1612:110:5844:f806:c8e7]) by smtp.gmail.com with ESMTPSA id e68-20020a621e47000000b0055f8175aa85sm5164404pfe.214.2022.10.03.07.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 07:19:35 -0700 (PDT) In-Reply-To: <86mtadv0kv.fsf@mail.linkov.net> X-Mailer: VM 8.1.1 under 29.0.50 (x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=raman@google.com; helo=mail-pg1-x52a.google.com X-Spam_score_int: -190 X-Spam_score: -19.1 X-Spam_bar: ------------------- X-Spam_report: (-19.1 / 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=-1.467, 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:296751 Archived-At: Dont know that I am starting multiple timer, unless that is it's happening magically underneath Juri Linkov writes: > > Replacing the earlier (push 7 unread-command-events) > > with > > (when repeat-exit-timer > > (timer-set-idle-time repeat-exit-timer 0)) > > > > in my disable-repeat function that I called from the process-senti= nel of > > the media player -- with check for exit as the guard condition has= no > > effect and the repeat remains in effect. >=20 > Maybe you are starting multiple timers=3F Currently repeat-mode can= cels > all previously started timers, but unfortunately cancel-timer for > repeat-exit-timer doesn't run its timer function that should exit > the repeat map. I propose to add a new optional argument RUN-FUNCTI= ON > to cancel-timer, that will run the timer function after canceling th= e timer. > This means copying this part of timer-event-handler to cancel-timer:= >=20 > (save-current-buffer > (apply (timer--function timer) (timer--args timer))) --=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 🦮