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: Control help- and Info-mode buffers from other buffers Date: Thu, 01 Jun 2023 15:45:53 +0200 Message-ID: References: <87h6ruf09e.fsf@ledu-giraud.fr> <861qixbum2.fsf@mail.linkov.net> <86wn0opgpi.fsf@mail.linkov.net> <86ilc78zc2.fsf@mail.linkov.net> <834jnrek7w.fsf@gnu.org> <86v8g77iof.fsf@mail.linkov.net> <83o7lzcxm8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4645"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: juri@linkov.net, manuel@ledu-giraud.fr, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 01 18:03:33 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 1q4klu-0000rw-5R for ged-emacs-devel@m.gmane-mx.org; Thu, 01 Jun 2023 18:03:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4klL-0005PC-J8; Thu, 01 Jun 2023 12:02:55 -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 1q4icr-00008R-Bt for emacs-devel@gnu.org; Thu, 01 Jun 2023 09:46:02 -0400 Original-Received: from mail-vi1eur05olkn2073.outbound.protection.outlook.com ([40.92.90.73] helo=EUR05-VI1-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 1q4ico-0008Fv-LL; Thu, 01 Jun 2023 09:46:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P3BR/a57y7/hYWdw7ujSmoj0Tdokr3KCzBROQ0RSKPTZEjsRGibaZpKatvACyJ6uZW4Yniimqjd6aIbrjzxbNgemtyvrk24/al4qfYpXCFe/5ZSs0c7LO043AVt6P6VunZuCLBCL0WpZ6SK3SbtOnerSphGCQmQ+0XB7oR3sHUr7n/ipTIZzJJrULEQo1kCmfmzxQvVPk53Adul+wG8Zcw/4Nu81MU8F7+gxOd1zPo4RYHffgJU36emMWky5Br0EUBVg8RbEhyAkjVOtTNVGPlBCd6AcWCybSJO9ugHEi5mEcO83engznXZFKVvepzIdzDzlGVf5f8VrOh6lDIbRtQ== 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=euEcuClj3iCxGR5MBRxp42HmDqJWbHGkzQKrrfqVcPE=; b=W4Pk9Kqo62h57pTmmyaS7Q57U2z5daxvJI37QyCf+GddIPCY7njfTzY9V15FWqSdOzix+cXO4T0TWjEWPll67AvfitMqyDqNhk6bpW/TuklByQfdRCgLCJiVpdAFxyWDOS16+nxNuw7WJCqBACnbM4Cn75wsTVNbsMphHCp2lYKUcMRSu5QEU9MhHaPTQPThu3zTM3frae7qbAGjupFonmTl0aYjJKok9W3YsgsiNknwVUy9snZdcGFVIEEkNduxVDkJi487zl52IopoDjoDaEiUtQJXd7+dgUpnP7LKvXbZ9dNcu4jocEyb9xNMf1OVfOwkkRAljrXxwSTE0gxDwg== 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=euEcuClj3iCxGR5MBRxp42HmDqJWbHGkzQKrrfqVcPE=; b=KnaimPcH3VEOgYYjYRrpiTt01fvqGdPDhcewOdF1KMBouc0R47ydU9vpo4C2CZ9qbGWmVpvs7dGn/nta3nP7xx50WP+tLTzNGio7XVVZXt0Apo60TR+Nb/31YuoEyBiXLj3Xzzfc8dwrc4wIMjqVB0I07aoJKcL/hKXTEr7eZuaUbx6gq6737i5U0X6k51R9hK4aW7UDM+MweZuVOSmc5Z12DtY4lF4N4QnFfEJGQX2qu0GFQCB3TybOOM4jWZSq1gXwSNDRNA2RBnaBeKrm3Wtvi4rsnVUf9Lqztraz4gWwDYSyTzOl8UAIC/zFZmq2dOEC4LtRufyQ1bGC71SEOg== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AS8PR09MB4695.eurprd09.prod.outlook.com (2603:10a6:20b:297::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23; Thu, 1 Jun 2023 13:45:55 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::6983:1def:fb14:21bf]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::6983:1def:fb14:21bf%6]) with mapi id 15.20.6455.020; Thu, 1 Jun 2023 13:45:55 +0000 In-Reply-To: <83o7lzcxm8.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 01 Jun 2023 05:57:54 -0400") X-TMN: [T2RaC6lXIPq4JMagH9vMFMkZUYB+BGuM] X-ClientProxiedBy: FR3P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::6) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <82fs7bfg8e.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|AS8PR09MB4695:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a8bb6cb-91cc-4add-4f55-08db62a6856c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0yI/ZV7EMslqBDBYOfJDiEUD3dN/0ww/JiP6rbRU9ytFVentxcIiO+3cR1nPOmI93210wNC/8bFXJl4UoseHYxaWFyebMvzFXiHrQ+ObYj/8vtB1BZ42ukXjOkjIigqag5xGPQD0diS4D+9YhcPhKKSyFjZB61gzYotGcpIf0fDusbbmZKp3AtY/4AawvhSEKWZreZg61V2NbTBKEX6d+a/HJzgUZq0RqcDHuaPXrZ29IncoH9v2xOlmbtF9K4gIlIVbsz1qwi/w7+UugBoGN3Nd2tImFHlqxOpH1MNfwqUaacM2MT9vuhFw3Oj68MHA2O/i6CP+vO3XCqknpDaC9u8PaQnrVA8daolqf/Fqhit2FBFiF7Kz33siCv655jHHyd5eYb9wk509jWHmdiRRmcRfPxZiCPphwEXU0KWhkSWjQE4wHnYwarNLyLhiCf/XSD0KEqeFnFGGjToEtTcCNqcl2c2Q+7h26jSwnzLjF3dvW/QcFpXZg5rkLoxhiF94h0OdfrMzQYPPyJ1S4ecVKjnfUy+UUXjP+eWmFa39TB2GvPgSqM0LNtSJ0SrckrT2ryds/pebYYVAcou/GakRDJph6h/eQNy8V5sWdTIb9Lsk7TSaXZgsmHd9gAEtyMp+ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?gb2312?B?djg4V2U1dlVHd1JUanhBS3lpZnlNbXlzeEV1by9pekgvWVFxRG5LeU9vR0JW?= =?gb2312?B?MFZjb1FaOXlCT0VMaTVPTTZwS3NObk5tZW01Uzc5MnhuYThQZWh0Q1g5OWln?= =?gb2312?B?aTQ0Q2ZaRVhQU1FxYWFRbDcxTHJhSWlCUEdMd1dLYlJGZVozWlR0RytpZmRh?= =?gb2312?B?OTByUlFQbFdFRTl5V09Zd2VoNE51N3pSWEU1cU4wU3VVeFl6Y2ZhWGszTG94?= =?gb2312?B?SUdmdDlkTWVleDd4WHhrNndpRlU0ZUlObWxPL1NpSk55RTI3OFgxYVNKTkNI?= =?gb2312?B?MEt3dGZ6a05abk5jSTl5ZVNGVXBIOG1jTHFQRHozMFRhVmhWcjFkeldXRTdz?= =?gb2312?B?UFFhZTRNYW5jT09mVFpnWVlMNTFzVWd2aTFPb3lTVkxjd0VTdXFqQUlHdEgx?= =?gb2312?B?c0owNnNJRlMxdmI2QlJDdWJ5OG1SV2lDUEN1YnJNR1VuNnNVNTBQYVozRFJW?= =?gb2312?B?L1BwU2UxWEo3OEgvdVlaQ0NpKzcrK0VXbVJtWHFSdENYWUZpejlneFB6N095?= =?gb2312?B?bjI1QlRMWmRjcFFMTUFZcVZhMjVmVDBhUXVlTGhnYTNxdGJOR252OEU1YWNQ?= =?gb2312?B?QVBoazRSVmREVmRGbkhYcy9IN2JWMkxGeVFEQnYxNkx0UkRsUlNDZGpEcFJK?= =?gb2312?B?Wlp2L2JZZ2c5REt6Z3JWUW9xan X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 8a8bb6cb-91cc-4add-4f55-08db62a6856c X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 13:45:55.5204 (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: AS8PR09MB4695 Received-SPF: pass client-ip=40.92.90.73; envelope-from=arthur.miller@live.com; helo=EUR05-VI1-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: Thu, 01 Jun 2023 12:02:35 -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:306519 Archived-At: Eli Zaretskii writes: >> From: Arthur Miller >> Cc: Eli Zaretskii , manuel@ledu-giraud.fr, emacs-devel@g= nu.org >> Date: Thu, 01 Jun 2023 11:16:50 +0200 >>=20 >> In general, (I think) that allow to support commands that are available = in >> selected-window, to be executed in other-window, but does not have acces= s to >> commands defined in other-window, and naturally we can't executed comman= ds from >> selected-window if they are not supported in other-window. With other wo= rds, if >> set of commands from selected window is S and set of commands in other-w= indow is >> O, than this will work in on the intersect of those commands, S=A1=C9O. = Perhaps there >> is more to it, but I think that is the minimal requirement (the commands= has to >> work on both buffers). > > I'm sorry, I don't understand what you are trying to say here. What > exactly is the minimum requirement, and why? If I try to illustrate with an example: consider a two-window setup with sc= ratch buffer in first and info buffer in second window. If presses a key to execu= te next command in other window and then 'm'the system will choose commands fr= om selected window (self-insert command in scratch buffer) and try to execute = that command in other window which is info buffer. Tbat is obviously wrong since= user probably meant to execute Info-menu, by default bound to 'm' in Info-mode. I don't know if that can be fixed by perhaps manipulating unrread-key-event= s list or in some other way, perhaps by putting input key back, or by some ot= her means. I haven't managed to get it correctly and have given up and instead = tre to address the problem in more fundamental way by making those functions aw= are of the context they execute in. Also, even if problems could be fixed, I se= e no point of using such method in this particular patch. Sure, the hack has definitely a value on its own, and please, include it in Emacs if you get some good understanding and robust error handling for it. But for the suggested patch for help and info, I see no reason to use pre/p= ost hook to switch windows, I can just use with-selected-window which does=20 exactly the same switching for me in 90% of cases, and manually fix the few cases which needed some extra care. >> Potentially it can also result in many bug repports and /r/Emacs threads= where >> people wonder why it does not work some command Foo in other buffer. > > If we have a good reason why it doesn't work, we will explain it. And > if we don't have a good reason, we can add another binding. Where's > the problem? Yes, I understand that, and that is why I am also discussing it and trying = to bring to the table what is my understanding of the process involved. I don'= t consider myself to understand everything going on in interaction between commands and pre/post command hooks. For example what happends if a command call another command and it happen to have post hooks? Will it run after the sec= ond command call internally (I think it will), which means it will switch back = to old window prematurely.=20