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: Info-mode patch Date: Sun, 02 Jul 2023 20:53:51 +0300 Organization: LINKOV.NET Message-ID: <86v8f2xkr4.fsf@mail.linkov.net> References: <86fs6ertto.fsf@mail.linkov.net> <86wmzpqva6.fsf@mail.linkov.net> <867cropyh3.fsf@mail.linkov.net> <86mt0kulli.fsf@mail.linkov.net> <86wmzmzs1s.fsf@mail.linkov.net> <86edluyxhl.fsf@mail.linkov.net> <86bkgxfm34.fsf@mail.linkov.net> <86zg4gddtf.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8753"; 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: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 02 20:18:03 2023 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 1qG1e6-00028s-QM for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Jul 2023 20:18:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qG1dJ-0001WG-Mk; Sun, 02 Jul 2023 14:17:15 -0400 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 1qG1dA-0001Vs-L2 for emacs-devel@gnu.org; Sun, 02 Jul 2023 14:17:04 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qG1d8-0007B2-I3 for emacs-devel@gnu.org; Sun, 02 Jul 2023 14:17:04 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id DE3041BF208; Sun, 2 Jul 2023 18:16:57 +0000 (UTC) In-Reply-To: (Arthur Miller's message of "Sat, 01 Jul 2023 11:11:34 +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: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307368 Archived-At: >>>> Another advantage of wrapper commands is that you can implement what >>>> Manuel asked you to do to make key sequences for another window repeatable. >>>> This is possible only when you have separate wrapper commands like >>>> Info-directory-other-window and a separate keymap with them like >>>> Info-other-window-map. >>> >>> What exactly would not make my patch work with repeating commands? >> >> You can't add repeat symbols on existing Info commands used in Info buffers, >> only wrapper commands with a prefix key should be repeatable. > > I am not sure what that means, but I have tried repeat mode now with > my patch and it works out of the box. Both from an info buffer, and from other > buffer. It is kind-a cool, was not familiar with repeat mode before. But it's needed only for Info-other-window commands, not for Info-same-window commands. > Can I get *some* help? When rewriting Info-mode-map definition, so I can use > :repeat keword to skip typing bunch of "put" statements, I couldn't add tool-bar > shortcuts in the map definitions. How do I use those with kbd syntax? > > (defvar-keymap Info-mode-map > ( ... ) > ;;" " 'Info-history-back-menu > ;;" " 'Info-history-forward-menu > ) > > (define-key Info-mode-map [tool-bar C-Back\ in\ history] 'Info-history-back-menu) > (define-key Info-mode-map [tool-bar C-Forward\ in\ history] 'Info-history-forward-menu) > > I would like to not have to use those two define-key statements after the > definition. It seems you found a bug in 'key-valid-p'! And indeed it returns nil: (key-valid-p " ") Whereas (kbd " ") correctly returns [tool-bar C-Back\ in\ history]. This is a clear bug in emacs-29. > Is there some way to tell interactive where all propts will be placed, without > parsing interactive form and checking strings for interactive codes or something > similar awkward? Yes, there is such way by using the variable 'minibuffer-follows-selected-frame'.