From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Control help- and Info-mode buffers from other buffers Date: Tue, 30 May 2023 19:15:56 +0300 Message-ID: <83sfbdg5hf.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8675"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 30 18:16:08 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 1q4212-000285-2K for ged-emacs-devel@m.gmane-mx.org; Tue, 30 May 2023 18:16:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q420E-0003v2-AQ; Tue, 30 May 2023 12:15:18 -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 1q420C-0003n7-Pg for emacs-devel@gnu.org; Tue, 30 May 2023 12:15:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q420C-0003kg-9j; Tue, 30 May 2023 12:15:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=iLHd24cP4EKYOiDEHJeg5JcTU1eyEIs0ZouBWnUGuh0=; b=QSptaF6y3u5B yjxWdYgNWDy1TODk98f1heG2LVp2d4mggFyL0Ioxv7NL6+539ybRFjygJKoKbIc3FX6otNEQ9UB96 VOSJeut81UB+y3uGEww18eROPdK3JtPyfD1jLlD0QBrhsJzx/CFrOHQjZskNwgPIElxFPu3UypvBu eipHhd0gNaqI3CLyLx1b0KihLlS73alWHgBaHwP0TunFLZ6e295clh6HrlGylHu+SQ31zm9KXQrGN 5QsGrPtS/3tO772sDivHI74yV29yPI4Fu0w2+84Qf3W+Tq/+gDxYhi5f5vK6lEbpp6MEKzNK4x70W xcDw5XPJsyb4FHmD+3bfKw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q420B-00005H-LZ; Tue, 30 May 2023 12:15:16 -0400 In-Reply-To: (message from Arthur Miller on Tue, 30 May 2023 07:38:54 +0200) 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:306418 Archived-At: > 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. And "C-h M-h" is not easy to type. I hope we will be able to find an easier-typed prefix. > 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. > 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. Thanks.