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: Sat, 03 Jun 2023 17:06:24 +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> <83ttvpao80.fsf@gnu.org> <83ilc48wx8.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="16630"; 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 Sat Jun 03 17:15:53 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 1q5Syv-00048u-3i for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Jun 2023 17:15:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5SyH-0008Bs-R5; Sat, 03 Jun 2023 11:15:14 -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 1q5Spr-0007ON-C2 for emacs-devel@gnu.org; Sat, 03 Jun 2023 11:06:31 -0400 Original-Received: from mail-am0eur02olkn2024.outbound.protection.outlook.com ([40.92.49.24] helo=EUR02-AM0-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 1q5Spp-00088p-Ho; Sat, 03 Jun 2023 11:06:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fAb4aXxXEL6XWGQ/9Kv42yYOO0LA6CvNeTnA/jJaZJugPfQgWioGGaXcb0FcVnkdg+5khA1bY+BeJTpRC365SAlGvCveHyY1DDU3TI3oceK+78IkiKCVuayVpLqMqnHdaQ0Rncq0wA3Yfq1ITLWxNdqWFPxCTqesNt9eW6pKviG3xVohQ0UvJ9RY1SOTH+hLFC6SgFJuJUDRuVjsTFIcvY5vux5v0ZGNQ7isSAeyHSDule9n39U8f+MwhlIZf3LUOC1X2unNQXmYjQ7MO4rq3Ews1DKHYr2fMw5GOvPe0RJNnZdozVOEQYOLz/Z/4ykYn2p9eGTRLvp/TLjtEtpvxA== 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=nKbo8pCjGBDzDOp0WYGaKDu63s4zQn6yAdmiVCI1kvw=; b=SidcRrn34LgkDvwkf9X3pdI7K54mCm5rtkDuY9wqbnbRvo44masDaaFf4ClD0AlBpL17TL843j0819XRi4LxoM5PnY5wmLTWSaEDKtNC5O9xw3bNoFHqXZ2z/SqjTVXllM+u6D9Y8bHIjbRnSXaz7Zf4AP3MblZzs3ipLXg+gHd6b9MVSd4xFmwiDxRrmQTStAPSgaxt/2fbvgc2fR/jiObjFn0jw3BgotAw6krDw4yV1t8pcCCRZ9vUOmO97R3fxZ38EZY6NBjyZ7QLyFP2n5oattjsTT/pRYapFaBKnprnsgCnkzIws+sgnq31XSoTUbEfTqVOvENSuofCXWykzw== 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=nKbo8pCjGBDzDOp0WYGaKDu63s4zQn6yAdmiVCI1kvw=; b=nudTGasHBNIYaF7zMLPchRF9v5ePwVXitEDnGyk7ER/v2RWMYR4VXYDs6g7W2i/m+jgxPpBmh08qo8O6ncrifmHRDVb3Zs7o4B0k+t7k/6yJvXB/qrZr/MDu/aiJ4eBnK/Z56wGdUjysTptlxY7Cl/KIg0MRN0iIXCPXNsI8/5ZoAhHfk3SDumbTssbmXmCAFl3Twx5YG71Dl39lzrSqiU0o19/fRoCV1YYiKH0UwXdve6B27zCloyV+QPfFt4Fou2m5ha4yBtgyn0cgL5lilnvZEIj5l8XmG3RkFl9Gid1wuRaWrFVQ365Cd11T1gqeWsBzdfz4GvkhuaVLDJDohw== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by GV2PR09MB6062.eurprd09.prod.outlook.com (2603:10a6:150:bc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.28; Sat, 3 Jun 2023 15:06:26 +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.027; Sat, 3 Jun 2023 15:06:26 +0000 In-Reply-To: <83ilc48wx8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Jun 2023 10:03:15 -0400") X-TMN: [skVl0l8oUHGwH/2gDIgx2KZW02KKR+6pF0Q1MdbqNF0=] X-ClientProxiedBy: MM0P280CA0079.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::12) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87y1l08u1b.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|GV2PR09MB6062:EE_ X-MS-Office365-Filtering-Correlation-Id: 3862be86-6f6a-4295-9714-08db64441a13 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /ABSh3j5+maESN752AK1Zc8N9tWw1r8/eCtCBCdPtCILLLuBnuxBqAZjhem78blhERMRTEAVPNOqBBCZ743AmuXMUKp28to8dmvI5TQ4iAUUawGurF9nQxBOEHbrSBlJPMoR96jml5BzSsueTQmKUbMBu8UA062pjeYuqZXq8UiE8jHsrQZAjf9XZSC0y4+Rk8lE3zRfEayx4ho21W3xdHVk7M+CJc1ZQNnfxVIzg9K2lp8HP41kJ+D3HopBXPpx6IrhLubkPBXqJsq3Me/00FI0G1gT0/TTQx7+Ug/qIGcnrhNA3YdJSUruSvloI9ZPEE664UeANDat4y3yaugSYu+o6hBj/b2lSKsd7CDiOp07Vz8i42rWBb08fXHBS960NFowlicMe3dNLId6GOFm2vIv3m7ACYKyy/HQ9q9Mp5FG0u37EjOnmlg6jU3Xvvgl5P7d3JqVY2pc1UOCITH2CFVtnjdLBdWGTK/zq4zAbS9rgBJ+SUrK7lDMNx7aYyDYuYxRgx0edrpfNb9Snux7Xc5LFAQ6EJGLQHX62Fd/JOeyRth6aPXAGC8ylF4GKxfacto0F5Hl8py9kdqeCRYGgLq7xsY5MAMMjSXFEqBLNDgSRw8cxihy14Wi+DWqu39h X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?VoNHagL4q7X+40rByLvl0TIJh4YycYx0RDsUEyxGTTXg+QlTY/ZWjTfF3hS2?= =?us-ascii?Q?2rc1eicdqKDV9vqs0waiVEruEMG4sG0BZCZa/PHWiwIhaahvVGU2/Nxy0yzi?= =?us-ascii?Q?IHLlWpYR48fb4NFNu0593obOeRb/hqWXMYb/hcv2hKsqnZ0aPlhEMIUcXF2i?= =?us-ascii?Q?RefVMPUtBIDshb8+yGbDGr/hhkrtUdc2H6qrXQdnRl3kJ+4M37l5tkgL3elr?= =?us-ascii?Q?3eGusbmu4WDXI9j9Qe4E5YtLqb1Gl4+r7A1hzyWlQskYC6swg0Kcoq3ZLXjz?= =?us-ascii?Q?gezM6FvrbJym0SNT+C8+ppTMz7om6asRIS3q2pu2yfLJ2R4Z1BkcdobZ/TI0?= =?us-ascii?Q?w/jtvr97ksh9/8RCR9iwPcn9BiENpjSZ1z031tCLoUyUrSUg74yc4HFHb2ME?= =?us-ascii?Q?rmAf7uu8pmRsTg/pUUy1rxMJTUwcYQMDtYe4OF3+X8/iTE0U3SVvvb9AOLC3?= =?us-ascii?Q?lzm1Hv3TC6VWmg0aunjHsKKqQnnJEiYZa9sXDrLskED9WRvXeJKH8PjhC/06?= =?us-ascii?Q?S5le5uUS22XHg261lYkjhOiGOqJHzE9N8hdfK39QPm4QAvIVgy0JRnBzf7MG?= =?us-ascii?Q?caK96O7LoSfeuW7N7GSNdh0J8NUKqRMVt5BwRPeAUW5Jdl50hlQ6tsTVH7Db?= =?us-ascii?Q?iw X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 3862be86-6f6a-4295-9714-08db64441a13 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2023 15:06:26.5733 (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: GV2PR09MB6062 Received-SPF: pass client-ip=40.92.49.24; envelope-from=arthur.miller@live.com; helo=EUR02-AM0-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: Sat, 03 Jun 2023 11:15:09 -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:306594 Archived-At: Eli Zaretskii writes: >> From: Arthur Miller >> Cc: juri@linkov.net, manuel@ledu-giraud.fr, emacs-devel@gnu.org >> Date: Sat, 03 Jun 2023 15:53:22 +0200 >> >> The interactive form has to be the very first form in a function body, which >> makes it impossible to just wrap the entire function into >> with-selected-window. > > I still don't understand why you need the entire function to be > wrapped in with-selected-window. Because part in the interactive form would like to do some work in the info buffer too. Since we have called function from some other buffer it simply wont work before switch to info buffer. >> However, that is just a side note as answer to your remark, but unfortunately I >> have found that there is a bigger problem. I am not sure if it is Emacs or my >> X11 window manager, but I do suspect the WM in this case. >> >> I have both in my WM and in Emacs that focus should follow mouse. Now what >> happens is that, despite the function jumpiing to correct Emacs window on >> another frame, due to cursor being in old frame, all input goes to the old >> frame, so at least this particular function does not work with multiple >> frames. > > I don't understand: I thought we were talking about causing the other > window to do something without the user selecting that window. So why > does it matter where input goes? what input do you want to go to the > non-selected window or frame? Yes we are; but some functions prompts user for additional input, and if the info is in another frame but the one with the focus, than minibuffer does not get the focus, and the input instead goes into the frame where mouse cursor/point is. See more further down. > For example, the command "M-PgUp" scrolls "the other" window without > selecting it, and I don't want in this case to have input switched to > that other window. Same will be my expectation when there will be a > command to show me the source of a function whose doc string is > displayed in the *Help* buffer shown in the other window: I want just > to see the source in that other window, I don't want to start typing > there. > > What am I missing or misunderstanding? Why are you suddenly talking > about redirecting input? As above, some functions, like Info-menu, asks use interactively for additional input, which we type in minibuffer. But since the old frame is selected it is not possible to type in info frames minibuffer without moving cursor over to that frame, which defeats the purpose of the patch. Can I somehow tell Emacs to prompt in minibuffer in current frame? I haven't done this before, so I am familiar what to look for here. Perhaps it is enough to do it in info buffer which I can do in with-info-buffer, now when I think of it; I am not sure if I have tried to be honest. But anyway, as a general case, the interactive form part has to be take care of separately from the rest of the function. Just using the buffer instead of switching the window perhaps solves problem of frame focus when prompted in minibuffer. Sorry thinking loud :). >> I do have another question too: what is a good strategy if there are multiple info >> windows open? Prompt user to select with a completing read, or just leave as-is, >> i.e. return the first info window? > > You are talking about a situation where multiple *Help* windows are > shown? Not *Help*; I am asking about multiple *info* windows.