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.devel Subject: Re: Repeat undo-only is not working Date: Mon, 23 Aug 2021 19:06:01 +0300 Organization: LINKOV.NET Message-ID: <87eeakgqa6.fsf@mail.linkov.net> References: <20210823131240.rxfepbz4q2buo733.ref@Ergus> <20210823131240.rxfepbz4q2buo733@Ergus> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20300"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 23 18:15:45 2021 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 1mICbu-00053v-D5 for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Aug 2021 18:15:42 +0200 Original-Received: from localhost ([::1]:51084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mICbs-0003Gm-N2 for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Aug 2021 12:15:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mICTg-0007qO-0H for emacs-devel@gnu.org; Mon, 23 Aug 2021 12:07:12 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:57567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mICTd-0000MQ-M7 for emacs-devel@gnu.org; Mon, 23 Aug 2021 12:07:11 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 3F9FD1BF208; Mon, 23 Aug 2021 16:07:05 +0000 (UTC) In-Reply-To: <20210823131240.rxfepbz4q2buo733@Ergus> (Ergus's message of "Mon, 23 Aug 2021 15:12:40 +0200") Received-SPF: pass client-ip=217.70.183.201; envelope-from=juri@linkov.net; helo=relay8-d.mail.gandi.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:272876 Archived-At: > ``` > (global-set-key (kbd "C-/") #'undo-only) > (global-set-key (kbd "C-M-/") #'undo-redo) > > (with-eval-after-load 'repeat > (defvar undo-redo-repeat-map > (let ((map (make-sparse-keymap))) > (define-key map "/" #'undo-only) > (define-key map "M-/" #'undo-redo) BTW, a typo here: (kbd "M-/") is missing. > (define-key map "U" #'undo) > map) > "Keymap to repeat undo-redo key sequences. Used in `repeat-mode'.") > (put 'undo-only 'repeat-map 'undo-redo-repeat-map) > (put 'undo-redo 'repeat-map 'undo-redo-repeat-map) > (put 'undo 'repeat-map 'undo-redo-repeat-map)) > ``` > > And for some reason the repeat map does not activates with "undo-only" > (it doesn't even shows the message in the minibuffer) but with "undo" > and "undo-redo" it works as expected. Is there anything special in > "undo-only" that disables repeat-mode? Sorry, this part of the feature is still unpolished. The intention was to disallow repeating of undo with the key sequence `C-/ u', but allow only with `C-x u u'. Maybe this was a wrong idea? Do you think it should be possible to type `C-/' to initiate the repeating sequence `C-/ u u u'?