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: Wed, 31 May 2023 08:38:47 +0200 Message-ID: References: <83sfbdg5hf.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="21639"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 31 13:14:17 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 1q4JmS-0005Ly-FM for ged-emacs-devel@m.gmane-mx.org; Wed, 31 May 2023 13:14:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4JlS-0005e6-8g; Wed, 31 May 2023 07:13: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 1q4FTz-00011c-3k for emacs-devel@gnu.org; Wed, 31 May 2023 02:38:55 -0400 Original-Received: from mail-db8eur05olkn2053.outbound.protection.outlook.com ([40.92.89.53] 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 1q4FTw-0003pg-VE; Wed, 31 May 2023 02:38:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l3Kh4Hx6OG79pE1fKI8gD8+jDfJVYH2p9m7UtNS3q+i+KMSLX+7z+AT5Ouem0c39ejhoDNAy9Txoo9Ex/J7sNGgOPatE5Pvsvr+Cl95M7r/bMnC8OQZGz/jzdduEgWveOjjhPyzE5XFAk7/qbCL5Qr40pYkYfJdMEOiw2yKlXjNuB8TC6SLGMe1v2Us8mOZac9kdWUojjlVIrbP+H/jXuKBKleIOE03ujV07DFCbZrqb+l3mVuuxFO57zrTDmE4NGZL3Ajp0dAHBdC48f8Nw9O0d266EZ5IZsNqij5SWlmfOqeU9pZRN2MOqMWw/fOvovxKH6zZWxQ/4ZZBEx++06g== 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=TPrs2WRi6hsTvuc4+8NyLkSs8iqGPUlXPfDjhXxonBY=; b=OReXlcQ9mgYIK2GOWMtCtNHhXZTR6RjU+Bpn03vqNjvSLn814zBru6Nuogscq4AJ43W6NoMcl//eG0/9JWSkxVIjJhJqVnHsCNlRRX8nnGxF/s43RKqxAqhoCuAamKhcPav5EALSRN/LMORBJVWCMSgR/kZtu2GcHcu7fLEA1xJ2VA9nqzBaYhOZAX0KwM2rRHEanSmEH31EkkgNXAhLbrXvyvXb7KIq7H3cir0fcahffEmEZOiH7LZhaL4CDxon1BsIOgHQYEDuXCtQydAHW+wOE+WiPDQCnmcnx8dD4/vXAOXbJstdRKi3CBDVPO7KNW/+g/VCJPX+OmMcKC5MIQ== 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=TPrs2WRi6hsTvuc4+8NyLkSs8iqGPUlXPfDjhXxonBY=; b=VsMZwgV4N2sStBxVncgS6zp2b/PnWx/E6LjKIU9HN78j8hI2jFsB0vP4nty7nqZy4wWFe8nbv0Etak6qK+POdkRchT34fm7aUY9yXfmAOrqE3crGuhb7qhoTPOW71/Eb99Ls5ZTNIoCPV1ZUUxUdNAUHblJWsj29pBKdvwQzjF7DZEitQfZH0DKVSgKazHDgTyqo0edX3Iyja7FHZcqJQQ7KUQwesf10Ag1IL3lLy1c7MRG2SyzInQt3ElbgKOB8oVXqihHro9dXcoTavf+Lgx8Sxw5xLd5ngYbL+MzJRNFUrgjoVeP8ESFXuKychWxQYAJHTwNRrkpgdwIdIb785Q== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM7PR09MB3654.eurprd09.prod.outlook.com (2603:10a6:20b:106::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Wed, 31 May 2023 06:38:49 +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; Wed, 31 May 2023 06:38:49 +0000 In-Reply-To: <83sfbdg5hf.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 May 2023 12:15:16 -0400") X-TMN: [YZW0HNu8VvKjmS7r+W+Zwscuo/1SMzT+4SDhbGJwZFQ=] X-ClientProxiedBy: MM0P280CA0083.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::24) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87wn0p6m4o.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|AM7PR09MB3654:EE_ X-MS-Office365-Filtering-Correlation-Id: 66b2d821-1e29-444b-3dc2-08db61a1b0be X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: msSzTjd0ePO5EAwj+DkStkNdvXHNbTXoWS5h/aqiCo1Egrr1PdAt9C/sXPRZmbRdR1l82FxjZzveKhZBuHS16wEJr1M46OAqSO/m+kkDD8Zlwqgn7Zvd9rG5sKtCGZA4LxOgwLkt704Rlq6OnzWMkkFsWbaBdmiGGDtaSTaYrtxahzNmUa8AVdWk7QZbY8j3+Z6FOy++DviFP/ve66eIk8EP96KPMEYpN7FyN1PW3Ekqzoyo2YED8pzwXn4W8M7O3ay65pMcxq5R7PBrL30bM0NxXK28q0gyoyeIHlp5kHKO9NiRYSZcxo0WjiGGwV4kwLMXa+Fp0qadO7r7s5pqL6gFCe0Wwa7ChjqLGV+xKvVzc0QgBFN44XJ3TSA+TRF86ovuSydw1MYNUNN87j+bbESV7Z2BIqTgP55qTaZpqGJmf/UjBMzNhsV5Wv2zj4k5WWzyzm7lXBVvQHdmoxqGr4qmWY9m+pB2otPa2oQf4pPbYpXA9R7M+aG7ikptxE/LgiJ0O+d+gJAuJ0ZIIwDDq3amG7NVQFvtTMGI8i5wWkWcropBrgv/mlcuvRWPbdCId5ZXYLkXiw3RM1FfDESkua6O2WvoMZpo9FWEez6rkDIwq+YAUMyhnAu7c5SwvDuW X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2xrD/fwx2ONQh4OvLXVLluRZhdMl6mj4vHO+1xk9stvh1N2E6Vy1WFqLpCpe?= =?us-ascii?Q?nhHgh0jzokD48IrFNi0Z5RJYQHXXHkCFWU87HA0+Y+uEROvYQFzZSfNNDi5J?= =?us-ascii?Q?892FvI3dXkgXmxLExE6OTkbRW7xhChPmJuuOQ1GJN0wLMXrmIWBctIC5SW5p?= =?us-ascii?Q?xh2abzqr6QooOAFLjw7wPqe5TijsJX5QRPJgNw+nKVt1O8zKCK8oH8hc6EMN?= =?us-ascii?Q?/LVMrl6CGMPp0nDhxxEx5xxRqfaowA0XkGCwmlDBwq3E56D052qD2ppKLE09?= =?us-ascii?Q?ptSelanTfNG/fM4osW4IJMIZvLZyi/6wGWdcGn7iwcEMVZfj6JIyTHQuV/HK?= =?us-ascii?Q?i3EciPDTtPaxPlCHwcR7PV/ey1ZSzxiN72j30oE27BsenejvKthIxBhRlEV7?= =?us-ascii?Q?aZAzXeoD78qklQacJGE0yUGN8iD75zCqFiYr4QLp8HuL++ElUHtNIxNT1mex?= =?us-ascii?Q?oRd/CB/mrSTgk37W3wwtBSQEgtPnTJgw/6gG4PqPJKsmjC55p2Se4E1PqHjP?= =?us-ascii?Q?ZqLf0j38zXzaXOg51LK/04gqg6/o1RHVMlVT3bCzPUJQu1COSJQfRnnr2m9G?= =?us-ascii?Q?k5n9U2gmD5r10ZDDt5TMv4nTnepXK1J9L63AtZLLHT2vZ9XvdoiTzZMnZNe2?= =?us-ascii?Q?YY X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 66b2d821-1e29-444b-3dc2-08db61a1b0be X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2023 06:38:49.1394 (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: AM7PR09MB3654 Received-SPF: pass client-ip=40.92.89.53; 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: Wed, 31 May 2023 07:13:11 -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:306438 Archived-At: Eli Zaretskii writes: >> From: Arthur Miller >> Date: Tue, 30 May 2023 07:38:54 +0200 >> >> I would like to be able to control Info and Help buffers from other buffers, to >> lessen switch between windows. >> >> All commands are (should be) completely backwards compatible, so when called >> from within help- and Info-mode buffers, they should act as before the >> patch. Some rudimentary error checking is performed to ensure that user has a >> visible help- and Info-bufers. Mouse commands are not touched (should not be >> needed). >> >> This patch also introduces two defcustomed prefix keys for help- and >> Info-mode-map, so they can be assigned a prefix key. I have used somewhat >> cumbersome to use, C-h M-h for help-mode-map, and C-h M-i Info-mode-map as >> prefix keys. I personally use M-h and M-i as prefixes, but those are already >> assigned by default, and since I do understand the conseervative nature of the >> list, I prefer to default to something cumbersome and let user remap to anything >> they find suitable. These are just suggestions. It is also completely valid to >> not define any prefix key, and leave that code completely out, but a >> pre-defined prefix key does suggest a certain usage pattern. > > This is a useful feature, especially the *Help* buffer part (I tend to > have a separate frame for Info manuals visible at all times). But to > be really useful, the key bindings must be very easy and convenient to > type, because otherwise people will keep switching to the *Help* > window and doing it from there. I don't think it is a problem; it should still be valid workflow to do things in help buffer itself. I see this just as a helper to help diminish some switching. Those two jump functions are particullary for cases where user would like to do several actions in help/info buffer. In that case simplicity of a single key probably wins. But I do agree that simple to type prefix is to prefer. > window and doing it from there. And "C-h M-h" is not easy to type. I > hope we will be able to find an easier-typed prefix. I have used at some point C-h h for help-mode-map and C-h g for Info-mode-map, but I am not sure those are much better. It still is 4 letter to type at the end. >> The defcustom init funciton to read user key is adapted from Helm, I am not sure >> how/if that works with copyrights (I have signed myself, and this re-uses a >> relatively small piece of code out of Helm). > > This is actually unfortunate. I'd suggest that you rewrite those > parts from scratch, using just the general ideas, because otherwise I > envision it to be hard for us to accept the code. It is basically just two define-key statements, five lines all-in-all; not much to re-write. I'll see if there is something similar somewhere in Emacs, unless the writer of that lambda does not want to step in and donate that code to Emacs? :) >> Perhaps it might be natural to expect this to work even with multiple frames, >> but it does not. I am not sure what workflow would be, should user be switched >> to the frame containing the help/info buffer, or should buffer be openend in a >> new frame? > > Why does it matter whether a *Help* or *Info* buffer is shown on > another frame? Emacs can be told to select a window showing a buffer > either on the selected frame, or on any frame, AFAIR. Yes, I tottally understand that :). That was mostly because I am not so familiar with Emacs on multiple frames and that part of the API.Second reason is just the tune ut takes to test all of it. Drew hinted me where to look, so I'll take a try. > Thanks. Thanks for looking at it.