From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Info-mode patch Date: Mon, 03 Jul 2023 00:05:45 +0200 Message-ID: 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> <86v8f2xkr4.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="6651"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 03 04:24:25 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 1qG9El-0001Ur-NP for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Jul 2023 04:24:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qG9E4-0007Rw-Oo; Sun, 02 Jul 2023 22:23:40 -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 1qG5HU-00051W-Sn for emacs-devel@gnu.org; Sun, 02 Jul 2023 18:10:56 -0400 Original-Received: from mail-am7eur03olkn2080e.outbound.protection.outlook.com ([2a01:111:f400:7eaf::80e] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qG5HS-000484-Mm for emacs-devel@gnu.org; Sun, 02 Jul 2023 18:10:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DtsLi57IfDGxfOhSkxPJkn2wire9rN9hDahE4q7TQURkohYs9fuqwiPx2xpyOcxHSS7bXO54GCkx9Z+Madgwb4gK1++HBGLuPM94FBEi78NzKlIGCcjexlaKNfeenVgOCxwyl3N9EuGZYyNF1xjXea/Kzvsroq/oEO431KmcFZjVo46CCFcwHKaKpcgCUwrkHGJKp8whsbswXYlMc8QzYYXl8OfL4Rgeagkeg69csFqrnbo/YadnaasT3Q9KwMWfUpVBglXz96GpmNBELOlH9MNtcdvBGlBxpdl68lWze9qUrlCDPFDxLfdich5WIAnnubMaDcWTuzzog3zhaqA8zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LChx/obabVa9UZShVNocR6BY+lTEgIf5+2V6EtQ9FeA=; b=UHga21txhH9JH6sH3LxZLMcQrx8DirU64+GSrxv3TBEehqV/2KqSWpU8traYUobrNIoKTjSl5pSGZPgp0N4ZtP8oIw2STjRmF/vP3Rfc1MHf05t+4dfKn5tmVeefoToPSV+7zxpx26oZhHVSbCu86ByL4JmXU3q3Q1aAdnT2ihN5NqcBmsTrvasSpBNVAsYhyrdSl3v5V9F8HccCabII9dm/JDVfhH9vUHzW2bBLhlqzSh6bYQazpTqaonsucWWkvst7afZhCtzDIsi5Hh/prVHAYwrcdhOUeUZWR3YbIQKsFLg8kxrJ7MSUE8dzQ0tf5o1p/cNMWqtdd3CRQdh2Dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LChx/obabVa9UZShVNocR6BY+lTEgIf5+2V6EtQ9FeA=; b=pZHL/UiBWQE8Oa4rDwN0D12AOYKrtuNN8cCARO3qtwxizQKolU4NeLRfnobwTgXfx7RVXW4O9zCkKUm1LY87XkcRam1N4M9fvuJkADhAV++kSwln1rgTVt5Lz1ROxStYeaB7g3+wFyJuze29Fe4KXvFMZoR4uWFUyp9iGjWYc6e7UYawTveWdgq2qutIeJNxDcSCj7q0pyFKmvo9AYk0sRPz/4H6kcK4PyGPKFxtV5xckpS+VBGrf6mKf5SHPeNzQGDeVLBW3LKxZqROoYgaN3APtMUdVvUgToKU6NvNGQz39lh0xtX76yZ9rm3rImvdbuSYDABkeEUOdxmu7YpHxg== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by PR3PR09MB4362.eurprd09.prod.outlook.com (2603:10a6:102:39::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Sun, 2 Jul 2023 22:05:49 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::4a5f:42f9:d78f:2021]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::4a5f:42f9:d78f:2021%4]) with mapi id 15.20.6544.024; Sun, 2 Jul 2023 22:05:49 +0000 In-Reply-To: <86v8f2xkr4.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 02 Jul 2023 20:53:51 +0300") X-TMN: [uBsBI79uY72ixNqna58UmGiY5aXajnyZ] X-ClientProxiedBy: FR3P281CA0050.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4a::19) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <82cz1avuiu.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|PR3PR09MB4362:EE_ X-MS-Office365-Filtering-Correlation-Id: 91ec32b1-c17e-4aaf-515d-08db7b487e17 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FtFQIjzDt8JyhlMsfd6iiDCxowdjKL9OLvJTEkSfosQa+yjDahVnsfYrB1n2j3JB94bJnkd0dU0QhSrGy9wroZED/fXWhktqPiVCKa2ktUS9+FOs7R80o6yvHRZeAyZwAxv37ftLemJVN4chL94JZxN91B9KsIjLZQQR26cQKqlzEQDbm7FNbh27fsrhvFmB8qYlyp2q//pbVTYPMNbIgeh0sizdemF2hrKqf2p0OHC4XfBtevlfuRsErxa4rqVd5Jq15WYQ0x/F6EHqE2kcg4gRtuzrF2xa1ngqcTIIxZuEqqCCzkKsbNm0RH9M+w4yOWk7oYcuzkFau2p5i5EiD2h8eTw61jqf8mlanluqsFwy6tMH522PAduKzX23S9nZQwSsSHO1YlJRYL0ibzMKHsvxchSilJhRzya7LPOcC9UJsju710xBe7pCjKi44BF5sIPIDQZWKMbXhs1LnTz5c+iDMIWbWKFOWrz29nIgrJ3+YyPF+ijYSTxOwa8WVx4jps8ezx7wbQgzIFWXL9ZNeQ5Cc1LaSy9jPcdguZxs8tcPJZU27ptiJGhqFYo1gmYp X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2iP5ecMVb66420QRMgmnYMt/61K19IWqdD5+VQUVi2q4XbsUOEylyN8OZvTQ?= =?us-ascii?Q?0TW3Jy0/4tpNXxUvnd35ZczKboWcofF4RFEh8BoXu2qVRr74ND9WHNrQU+32?= =?us-ascii?Q?wZGooxBReiJ3CJ+dWaYYxvnayIM9jN7qnnRNxB+y+veoo5PDfeGU8iHlpBQf?= =?us-ascii?Q?vt+wCnltBnmAY4YNteDMBIs65WNaqMBtFnBVqcf3ZZrh/qL04nhd2qXdLnXf?= =?us-ascii?Q?uNHJrvtPnK22camaj21sajEYk2+CBuzoszPUlu2flywL8ptYV8yL8fJMXPSO?= =?us-ascii?Q?4XxSDNv0Me06uq+XOk4k022CpJ24vJ0SL6W0riQfsVpMYgJPwzUZbY4AcehW?= =?us-ascii?Q?jWpwSaww37H4qI3p+aL0ttBQu13RHqELYuMzC2ihXHcdRE4Agp/8F3uj+Jb0?= =?us-ascii?Q?vOTIK7hg2eN8TrE/OUVbmcLKkqolyo5m4attN8mGHMTPiAY7VxbF+dWiy+i9?= =?us-ascii?Q?J/N4W43lhuKd8t5aaidzdyOcikuofcQ35OX1LJvHOPv4k2+ckAkqHcIyNA1T?= =?us-ascii?Q?ZGxT1eFGfK8qWz8Q/SkGHqOhEv3XxGHBYIN96g4CLOH2oKzqTmHLFdRACX6m?= =?us-ascii?Q?45lNxRUD3Pl+0pOcNJ3kfm8JtBcrkVHPgRupOOjaNBsmlkcXuiFAX+kuHkHp?= =?us-ascii?Q?ZG X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 91ec32b1-c17e-4aaf-515d-08db7b487e17 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2023 22:05:49.1754 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR09MB4362 Received-SPF: pass client-ip=2a01:111:f400:7eaf::80e; envelope-from=arthur.miller@live.com; helo=EUR03-AM7-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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-Mailman-Approved-At: Sun, 02 Jul 2023 22:23:38 -0400 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:307376 Archived-At: Juri Linkov writes: >>>>> 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. Yes, I agree, and I don't need I need repeat mode for too many commands from other window either; but since I have rebuilt the info mode itself, I have "only" Info-mode-map, there are no "same-window/other-window" commands, and it worked just fine with putting repeat mode on all, but that was expected. For the record, I was able to port Info from version current master back to version 25 today. Only bad deal was a mailformad Info-spec, but everything seems to work well when I test. >> 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. Ok. Thanks, good to know. Then I'll keep those two outside of keymap definition. >> 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'. So at least in theory, by let-bidinging it to nil, it should keep prompt on the original frame. I did just quick naive test, and ended up in debugger: (defun info-menu-wrapper () (interactive) (let ((minibuffer-follows-selected-frame nil)) (with-selected-window (info-window) (call-interactively #'Info-menu)))) but perhaps there are more tweacks to it which I am not familiar with, so I'll leave it at that. About wrapping; I agree that it is messy to go through each and every command as I did to modify them, so for old existing commands, it is definitely easier to do the wrapping, if possible. I just hope we get a better way for future command writing. Thanks for the answer