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: Fri, 30 Jun 2023 10:41:38 +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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1879"; 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 Fri Jun 30 13:07:01 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 1qFBxr-0000H4-Pb for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jun 2023 13:07:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFBx3-0006gW-VO; Fri, 30 Jun 2023 07:06:09 -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 1qF9hJ-0001Cq-72 for emacs-devel@gnu.org; Fri, 30 Jun 2023 04:41:46 -0400 Original-Received: from mail-am7eur03olkn2047.outbound.protection.outlook.com ([40.92.59.47] 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 1qF9hH-0001ER-7X for emacs-devel@gnu.org; Fri, 30 Jun 2023 04:41:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bxc6XPD75zgrt69NV864xFmN+mMr34kUBBZP+HipxxMK/Gzudnuk8mquxBn42QgdtjxnWpT/ueCp7flsvXUYCgT7LX6/+futwRyFhh+eetsjz6c/P4qdHe3ZB68FBcGdSels9E6SXHx0g9rqZop1KRoEbpjIXYckssOZfrC/AUugDbwxJ9hzgLr/Qx6mcWDrwJnHPfgrSfhkFCv7+P55DycIrW4N1SZfHkHSh/AohYA1z6aRvMjf2UqcbfH8+2Vv5+JA1Q2fkdyZbMcgP/lwKKE/Unwct25HduW4CCPKfQbu2zTo+TC77ewlGj9yKmOj/EKHRJN4LhNBImrYRXgXBQ== 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=Zo2NI5ntcZpkBSR8+BaUheWxr1X8C+1hyRE0EldaUQ0=; b=et1YnXRDQFfYTuLCYl61fGkie0RI1ZGymKAE3UoBmJlv8oxAgO2kJYQe5OcSRdLc4z8FLUBKYWhdNgIJoELE2ZhB6dq0q/+/Riv7yUTT879T9m3q4MnqbzQW4ee+0FSmpJV3IyQ1wDoO4xD5C94xijtmDAOGDshs6UPVHqQT3rpjk8ez6UiGNPBAVGeNXzjLwV+vRpXL+iWWpHvx2nnfVX+cdbDzzhZUxfQxo07ttWIxCCLvhvWMzWC39lYrhoAO4mWr/qBqytfD5l6WtZKJSXtA5sXmix+SycnwfuuRWzTGr4QsPGnxbUY+KVnZxhQ4sdoWUhjZeLqbIBZ1BsoBcA== 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=Zo2NI5ntcZpkBSR8+BaUheWxr1X8C+1hyRE0EldaUQ0=; b=gAqWyUQoB/BIBgTgyNhU2AGQokQcLOmvsu5PSBw6CR7DYJF61snPtwBfO9oLmoQIJHMjmwmsZfLqQdF6L9tLIAz+XV5Q9HqQ7MJ5JQ2FdKzYMUxCRCyJcAJyYnPkHatxKPl+wqJySRjhPzd4n/kL0xtPWdXlLsiPSZyith3RJMzhLHtUa3XCZujDVws/ImfNBUGXlZ1ILao2U2Ak26LF564zFYTmJ5oODPekp8PwTNwxbPT3otRdf1Lmj58IkBuXnQ35syKM8dkz00tMlPVfmm6zOoEOyiLSpKN4vKv21j7m4G9GAy6lSmY9zWYwxt4l4Rc40WSZhaEry2B4zi/Hrg== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by VI1PR09MB3917.eurprd09.prod.outlook.com (2603:10a6:800:126::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Fri, 30 Jun 2023 08:41:40 +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.019; Fri, 30 Jun 2023 08:41:40 +0000 In-Reply-To: <86bkgxfm34.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 30 Jun 2023 10:13:30 +0300") X-TMN: [ESXWGdYIuTJgtrZ3EOUoNNDniyPwcfkO] X-ClientProxiedBy: BE1P281CA0044.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:22::11) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <82y1k1pcjh.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|VI1PR09MB3917:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ca73617-6cef-4e5b-62bd-08db7945d2bc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1B7PM8odkfkPhpsREg3O4/V5obx2/AdYYdmCIemDp2WviOb0r5yhYJ6KC+udCGITHbyMkqC6uMBeA/tVPv+0VpO09Ns/hBtkNy6TlXxSOrv3VOGhibVQTSxiBqU5Cal9fjTneTvJo4cW912Xhq6fCZOc5rjZ2vAnz2fN9iyS5E9Sn9Mep2nTzsP37+3tPc7DKQstmriDfnLo01QpbX8hMvOH/55OQz0/ZbaxeRTXn1IbQUB7wAylVBUQNRB28E2w/n1Fs7Vb7fG5xbdXDv3aBRoAdfEIlVWAq3GZD4DekSb5UA9/0YZQlQOSfagCKHwxJIv0ZaxPlsVru1zFw8khBAS+iNJ2yEJxZvyl67+MUVelVhFZIiR6sQGGOwQG2hRBk8JeYVof4g6CA2CKwSYpnzALkY+EKSn91oFAjAvfOYIoWIU9++9MdiGlzltW+Rn2YzHpxsZmBFP3601Nw6wd4IvzmcW44SKEQY7wmrvT4/OvwxWd59y7ZDpGCD03wMnCMe+ODBNdrEjCiVF5MA/ihChvK6OtrYU83AcIyc2L2cF0HNM9dKvWi2pQQzcPHiNW X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lEI7Y5wpFmfIEh4VF2xcqjWUhduHICfztv5b49QBnPc89OooFrAjUGVfsXi/?= =?us-ascii?Q?0ep0nd6eyUdCTa44jBkY0eg3pmvCoAKJ9b9EOu9hyz+Vm/rgL5z+/bxdtRwT?= =?us-ascii?Q?1yWjsHSbqtpb/RPQYhySkh9NllZ58AHKAMT2Y/1On7X9SzxUmRBB/pWTgZnZ?= =?us-ascii?Q?D51K01maDRmypEklbg5VlYu1bxP6U0bYuTvEW6AWcqXZvrrg4bQjD9BKUGDM?= =?us-ascii?Q?GwWH5A4e3NRXu56EtIUcVy3L32BZA7x/flcJB7C8PPnrUOIEiJcojRnoUFcN?= =?us-ascii?Q?9GCXQswkalnv4sa9vLeijXa7htc5jO4kKE5nQNq9nwqOhrFEPYiOTp1K98xI?= =?us-ascii?Q?OnTRtJUL2ATlqqCve+0mJ/7meUeXCX7VOYe/aNw6nuuMpiLuJFno9JY3ekGV?= =?us-ascii?Q?0S7gP9x6xynCIKy5w3wE4/FArppcq6QuAUflFHogTBjwIOdSzu1QKX7vZPSP?= =?us-ascii?Q?kGKI+Lco2o+AmQ/3Lj8Du13aFeZ8DLJrkhJc5cZJyQLZija09iSA4IBnRKbc?= =?us-ascii?Q?HT5YL1Y07UYF39hKYLkrrqBRNqFuYDeOHZETKCDad3HuKpLcCEVjdUGrfXY4?= =?us-ascii?Q?Ebz+HHiuT/XeuMXQ/VKOCpn6Fu/iCkt5ivHQL5G4REVQKrv/kpleJ5V7Z9kQ?= =?us-ascii?Q?i4 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 9ca73617-6cef-4e5b-62bd-08db7945d2bc X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 08:41:40.6506 (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: VI1PR09MB3917 Received-SPF: pass client-ip=40.92.59.47; 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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: Fri, 30 Jun 2023 07:06:08 -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:307313 Archived-At: Juri Linkov writes: >>> Please note that risk of prompting user more than once doesn't exist in case >>> of using wrapper commands. Only the wrapper command prompts the user. >>> Then all other intermediate functions called recursively or via >>> function call chain don't need to prompt the user again because >>> they all work in the right window. >> >> Yes, that is expected since you are calling old command from a new function. A >> new function is a clean slate, so yepp, I am aware of that and I was aware that >> you want to pre-select window before calling the original command. So yes, that >> is a positive thing with wrapper approach, you get that one for free. I just >> clarified what commands needed the optional window and why, since you seemed to >> think that I meant all commands need it. > > 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? >>> I see an extra map as an advantage because users will be able >>> to put both help-other-window and info-other-window commands >>> on the same prefix map. Then e.g. 'M-i l' will go back either >>> in the nearest Help or Info window. >> >> What does that mean? You are building some general >> "go-back-in-help-or-info-mode" command that will work specifically for info and >> help and switch based on window buffer, or what is your plan there? > > Yes, you can build combined commands, so users need to bind only 1 key. I can also build entire Emacs if I want, that wasn't the question :). Of course I can build new commands, if I wanted that I would release a 3rd patry package and wouldn't want to alter the core info and help-mode files that get into dumped image. I didn't want to have bunch of spaghetti stuff you are suggesting. >> How will you deal with 's' which does two completely different things, >> search and view source? Are you building some key dispatcher into your wrapper? >> Under which name will users file the command in that collective map? > > You can implement 's' with something like this > > (defun Info-search-or-help-view-source-other-window () > (with-selected-window (help-or-info-window) > (if (derived-mode-p 'help-mode) > (help-view-source) > (Info-search))) > > But such convenience is optional, this is just an example to demonstrate > flexibility of the wrapper commands approach. That is not a convenience, this is classical inheritance entaglement you are suggesting here. Any user who would want to bind a thrid mode would have to write their own mode and re-wrap your stuff in his/her own wrapper. Idea of combined method is actually not so bad, it is also a sort of automation, but there is a better way to do it, with or without my patch. >> I am not sure I understand you there. How am I supposed to go back in info >> buffer, if help window is nearest, or how am I supposed to go back in some other >> info buffer than the nearest one? What does "nearest" even mean? > > The nearness can be defined by the combined help-or-info-window > that handles both modes. "Can be defined" is not an answer on "what does it mean".