From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#60980: FR: It would be useful to have a repeat-exit-function for a repeat-map Date: Mon, 30 Jan 2023 10:29:30 +0200 Organization: LINKOV.NET Message-ID: <864js8jsx2.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36804"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 60980@debbugs.gnu.org To: Ramesh Nedunchezian Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 30 10:09:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pMQA9-0009Pw-MZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Jan 2023 10:09:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMQ9x-0001MB-LK; Mon, 30 Jan 2023 04:09:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMQ9u-0001Kl-Gj for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2023 04:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMQ9u-00030D-8O for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2023 04:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pMQ9t-0006v7-Vp for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2023 04:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Jan 2023 09:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60980 X-GNU-PR-Package: emacs Original-Received: via spool by 60980-submit@debbugs.gnu.org id=B60980.167506970826557 (code B ref 60980); Mon, 30 Jan 2023 09:09:01 +0000 Original-Received: (at 60980) by debbugs.gnu.org; 30 Jan 2023 09:08:28 +0000 Original-Received: from localhost ([127.0.0.1]:46374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMQ9L-0006uH-Jn for submit@debbugs.gnu.org; Mon, 30 Jan 2023 04:08:27 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMQ9J-0006u1-S0 for 60980@debbugs.gnu.org; Mon, 30 Jan 2023 04:08:26 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id A15A420004; Mon, 30 Jan 2023 09:08:17 +0000 (UTC) In-Reply-To: (Ramesh Nedunchezian's message of "Sat, 21 Jan 2023 14:07:31 +0530") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254403 Archived-At: Thanks for the feature request. > What I need from repeat.el > ================ > When I exit the repeat map---for example when I press in the video, > and leave the "navigation mode" to "edit mode"---I want to unhighight the thing. > That is I propose that there be a provision in `repeat.el` to associate > an `exit-function` with a repeatable map > (put 'thing-sexp-map 'repeat-exit-function 'thing-unhighlight) The problem with the symbol property name `repeat-exit-function` is that the existing variable `repeat-exit-function` has another purpose. For example, for `repeat-exit-timeout` there is the global variable and the symbol property with the same names because they are doing the same thing. But the variable `repeat-exit-function` is different. It's not customizable by the user. So another name would be preferable. > Additional Note > ========== > If you squint a bit, `repeat-echo-function` is an `exit-function` > ... but the problem is it doesn't provide what map is being exited. > See bug#60353: 30.0.50; Make `repeat-echo-function` as a LIST of functions Indeed, before adding a new symbol property could you please try to use the existing `repeat-echo-function`. It's called with the nil argument on exit. Do you need a symbol property `repeat-echo-function`, or can use the global variable, e.g. by checking some buffer-local variable in it?