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: Fri, 02 Jun 2023 17:09:36 +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> <837csncfz1.fsf@gnu.org> <83o7lybaph.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4031"; 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 Fri Jun 02 17:17: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 1q56WT-0000mQ-U0 for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Jun 2023 17:17:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q56Vb-0006P4-14; Fri, 02 Jun 2023 11:16:07 -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 1q56PU-0004ke-5L for emacs-devel@gnu.org; Fri, 02 Jun 2023 11:09:48 -0400 Original-Received: from mail-db8eur05olkn2019.outbound.protection.outlook.com ([40.92.89.19] helo=EUR05-DB8-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 1q56PQ-0000iw-Av; Fri, 02 Jun 2023 11:09:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I2LEfj2nHF+XHlSJTDe0MnVSpMSfik4BbdjF1JC3q2UeUdYWmaPnRfeRvBmGAJHQR1u0xBP91dHsmzE5eDfXW+zS2e8y+9W6MOUytdQQyjAyI3kA4fIvnExSn7W24iHirhCTjV0G3plm6oNuCK69GP+RqRI7g8fNOGiOe2NVg7ZgyZ/BKIzsgQyWkdlO/x+XiSmJiMHuS7w8a8wPhOqat1N10KtwfkevzNEDSpsST0nDhnmxg4Q2Quv55miivYH324aMLh0eZTpygHW3vqtZhQ8s1i9x8QvOJKnlf75goKBdMCnKs7xWWGSK0ebrkWEyK4QaJ1eKtYYxh0msl8ZAow== 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=u//I14ueLsKKZ0lQSByX9+9JzrhJ+RJ5wkFGvNe+ccc=; b=MDN52MdD7DXHNmx26LrEuONCgg4attMAbpmqBjgetpYVWXBTsP4HD4JOK2002j+1rIgojnbPO1YntkhRKgnm453mmsRMGyRaJodcyKJvogy3wFAAcMOExessKVIgQTYCtwbYYlUX1gj6rhokNraUHk+7P1sL4qiVOgIvU7qGgoBGh6fc2R3KSqsEozxV0eKkjvNibq3qeFv2Q6wOGVtOqtZpiOEy7ICikGQdKx7efjC3y6VfoMfN+17YksOV96wn6oMtv9fsjMFnKJiMMCTrFnQo6l93cE+/J4mf6sdm0Abg/yWuWSq+YbSImBFbx88yeCACtNiAF1MHSAiEKMRbrQ== 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=u//I14ueLsKKZ0lQSByX9+9JzrhJ+RJ5wkFGvNe+ccc=; b=Ea965M3r0BEbegy6ZvJ/rUdl5ZjUA8lZNoVvQPl7rFfvTXsXrCexi80sFg5JGHvZwrhYiOhbjP2JvEVMGy0EVTMBV8cjrB+u6vPIF11LuOaymxs7Iw5aSQkFAr0CCxHRR1zbt8c/kvpfqUAxdehNYfCZzF0mU3f8vUSYdoVTttUftKbhQC1SaRUH18UMzEbLZMqu6pu+8ZQA9YI/ZIvYdTGCNwzmzmITbY0Q9KnGNxWXfGubUcRr6S61QZWU83I++EMWEsv1qpfkDlDNFxwCrvyqfx8nEKmjuwxX3LtLUbEL6YZnJaq3scELYIWcQ505FTUzqRfoSpFKis7bNORhRw== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM7PR09MB4247.eurprd09.prod.outlook.com (2603:10a6:20b:10b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 15:09:38 +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; Fri, 2 Jun 2023 15:09:38 +0000 In-Reply-To: <83o7lybaph.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 02 Jun 2023 03:10:20 -0400") X-TMN: [dPnJgeWYmuqy6WDZOFZ7tEhjRKxBHaNd2JD6N0rvrH8=] X-ClientProxiedBy: BE1P281CA0347.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:7d::19) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87pm6d7vf3.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|AM7PR09MB4247:EE_ X-MS-Office365-Filtering-Correlation-Id: 98ff6271-074d-4a6d-ec0f-08db637b6216 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VhFmbxZgcqLgq4V54bONSErz/SdzJ5pa9WE2O8g96qXb/0hpS4zUkkRkV0d1w7zvu6HtH0nt/Jhm9UYTy8f0ngB5HGUEXyIZblIqexrK+16fOJ7/6j2cah4N4WHo45GA2ne5DBj3LgkM8yj+pLlN/2vHhCYaB74H8hmROjnUnCicNFyZTp9sR8z5nogXivMiCt+eTUaCzLquoIhUJCj6bv0bWDTUsNxGyrohbDa/1GMrlv2s9CgO0e24OF+k3GqAL1Jb5CY5XQwsFBI6nKFKPDfxwybIAI5d1NUNVKzpBUufm0BgwXLhyhHyzUBxqOi4csrRJ5STzXpgE2BGnp8F3GbTdzg9ZIp7XYmcat+R1C8XgQstv3HPmMk0AFzSN1NDZsrZ2/Sf65Mxeg0q03gYweMEG5kGdId8WwJIaxvv67DGzPXqgfvrhH25PXxNZza+IHO03X2Ci5luYbFHnBn0xCG6WF0zhi6Eqv5J7+MPcdZS3sfXgHuklqFFIiEsQiSSyMnWoaq93i+Ff+JW7rFcj2u2E44vf443H4nBMZ0FvcTQZYt4VhXPEB5qgoPfXFP0ViaDSPb7+h4Rx2HJLM0rz4YV9Rct1elVT0YegmD5yT94WTXeeg8hyH1+AGxhSASI X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?kpFnd2MbRNAMEkd+/U0DMfAEjM4TktbZnA/+tTsHMaYsENrJkEHEGIVTOmoG?= =?us-ascii?Q?r7epgrtvxeLW643JIAq9NOvd7mMJJHm/xMbU2aWQ5F6qvEaOaBvPRQn5crJt?= =?us-ascii?Q?pElAZycxXyfiz6mm084maGX2cdTorE3J1c1vId3JQxMWsO2Tx12Jv1V3kAtQ?= =?us-ascii?Q?kvV/u1oqr0YTjMgufvHjQscSAzahdv3f6npm4in4WIqqufUnpp5V75VELgxy?= =?us-ascii?Q?luy+7e6Hr7gaqzKW+WOZE+T1fem2xkXLKSfjWqh4muTDUzPK4PN1clMlQUzm?= =?us-ascii?Q?0w7jPtOSjrAfb2J1NTa29tWidC98XwReFa4GQ5uORZhX/TlKF7Lna9Je6fvx?= =?us-ascii?Q?ANMMPWw2GU6ixuvz2khv4zoh3BfH6yisiMqRxfd87oOHObpe74/2uUBUgkIT?= =?us-ascii?Q?mPxn61Tfa+LqqunHfJq3mHkVHWeKYrKQIcAwuAUH+074QBOdUJ2XuBeguqUB?= =?us-ascii?Q?F200Fzd8NVFhX49+Exzua921aU8F13WnIhmg7N6zR0J0Ob3zvDya03psDdLT?= =?us-ascii?Q?ZRQjlfaqhCZD5hx79CWaIOnE71jYn0KQFODs66pvmxqIEbEmcVc4yJ/B1tQO?= =?us-ascii?Q?giN9ZzGixZdF5w/oLHGJ+21lu5oeoaPpnTYBqVhX72ZS0r/D7FdOlrx9S1Ox?= =?us-ascii?Q?mF X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 98ff6271-074d-4a6d-ec0f-08db637b6216 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 15:09:38.8329 (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: AM7PR09MB4247 Received-SPF: pass client-ip=40.92.89.19; envelope-from=arthur.miller@live.com; helo=EUR05-DB8-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, 02 Jun 2023 11:16:06 -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:306556 Archived-At: Eli Zaretskii writes: >> From: Arthur Miller >> Cc: juri@linkov.net, manuel@ledu-giraud.fr, emacs-devel@gnu.org >> Date: Fri, 02 Jun 2023 03:26:26 +0200 >> >> > I don't understand why you see such complexity. All we need is a >> > command that will do >> > >> > (with-selected-window (get-buffer-window "*info*") >> > BODY... >> No you need a bit more than that sometimes. In case that interactive is doing >> some prompting and buffer dependent setup, you will have to wrap interactive >> body for itself, and function body for itself. See Info-mode or Info-find (I >> think) in patch, but conceptually, yes that is about it. If you can live with >> wrapping commands in with-selected-window. Due to fact that interactive form >> must be the first form in a function body. > > You also have call-interactively, which can work around this minor > obstacle. Can it? I am talking about interactive "marker" when in defun impelementation; not calling interactive functions. >> > and then we need to bind it to, say, "C-x 4 h m". Did I miss >> > something important? >> >> Basically that these were two discussions, one where Juri asked me about my >> experiences about running commands in other windows, and one about the >> patch. Juri dislike the idea of wrapping all commands into with-selected-window >> and is trying to find a way to transfer command execution to other window >> without need to wrap commands explicitly as I understand him, which I hope he >> will find. > > Well, I see no reason to dislike what Juri dislikes in this case. So > now you get to choose whose preferences you want to follow ;-) I hope I am not misunderstood here. I certainly don't dislike what Juri does; on contrary. I made that Reddit thread because I very much was looking for something similar, and I am using pre/post hack myself. However I see some fundamental issue in how Emacs works, which I am not sure can be easily overcom, but if Juri can fix them I will certainly be a happy user :). >> The above is discussion about that general command that will send input >> to other windows. > > As I said elsewhere in this thread, trying to make this more general > than it needs to be is over-engineering. Not all commands can > naturally be used with the "other-window prefix", and we are talking > about help-related commands here. For help-related commands, it is > natural to work in another window while having the help displayed > nearby, and it is therefore natural to control that non-selected help > window without having to select it first. So that is what we should > do, IMO. We share similar opinion. As I have mentioned elsewhere, even if pre/post-hack could be used as a general solution, one would still like to make particular specialization for certain modes like Help, Info and perhaps a handfull of others, so in that case I can just give up on generality and manually wrap stuff as I did. As just a small update, I was able to string-replace all get-buffer-window according to Drews helpful tip, so now everything seems to work accross the frames too. However I haven't had time to test each and every function so they really work, so I will send in a patch probably tomorrow or day after when I have had time to go through all to ensure they really do work. I have also removed the prefix-key helper. Theat removed those 5 lines of :set method from Helm. I guess you or someone else can put in something similar later on, or just defvar the prefix in source. Probably not meany people use Customize to redefine their kes anyway.