From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Control help- and Info-mode buffers from other buffers Date: Sat, 03 Jun 2023 15:49:17 +0200 Message-ID: <87edms4pwi.fsf@ledu-giraud.fr> 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> <863539sv46.fsf@mail.linkov.net> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15508"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Arthur Miller , Eli Zaretskii , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 03 15:50:09 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 1q5Rdx-0003p8-F3 for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Jun 2023 15:50:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5RdG-0007xn-G0; Sat, 03 Jun 2023 09:49:26 -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 1q5RdE-0007xK-CV for emacs-devel@gnu.org; Sat, 03 Jun 2023 09:49:24 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5RdC-0008NO-In; Sat, 03 Jun 2023 09:49:24 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=P2o8TqEU guQc6cZhI+nj/B8nxSpqIf3Q4P3/bYSUYe4=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=Q15/nmXRWAoIXUh9WXMAL7gsg5oBhF gPpk7jEu5KAk2pDCmMBrNqx29WHP2zuHWyOeIPltpU1fk54WCBDG/TBg== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=P2o8TqEUguQc6cZh I+nj/B8nxSpqIf3Q4P3/bYSUYe4=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=jYUFNvB/uzAn9//GLYJvnb2Q/fHcLlQrl/4pwZ +xqDv7kKoGOd+9l0uC88AhgUoLbZjLBk9R4rpx7Uv8GcTisAvIL13EOinp2EZXImdkT6vr aGXJeg2srmCZT7vXNZMoT7z8c7wfeorleTlR38pNQXU/eNTmeUTeevbzn14kJ5oLWleZCh CvcPYOrrkGzrc/dgRY1Arwjmi40+IMVbyXZr4Ew5kD2z4r1j4dt4iyRadn57JEHzoKKdRu St16r0h6kg9XVyzUdeC1RLVUPgDHeImIUjYM92RREpVnbD1NvQELS6tC68EJc/lwSL/DQk ecLm5qnp444ZV7sZcZhyrr7Q== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 8287eeab (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 3 Jun 2023 15:49:19 +0200 (CEST) In-Reply-To: <863539sv46.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 02 Jun 2023 19:13:30 +0300") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr 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, 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-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:306588 Archived-At: Juri Linkov writes: >> 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 so= me >> 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 :). > > It seems these fundamental issues can't be fixed without changing core fu= nctions. > The problem is that another window's buffer should be selected before rea= ding > a key sequence in it and executing the bound command. So the only reliab= le > alternative is to have global keymaps with tons of commands that use with= -selected-window. > To make them at least more general that just Help/Info specific, a better= pattern > would be to base these commands on 'scroll-other-window', e.g. > > (defun forward-char-other-window (&optional n) > (interactive "P") > (with-selected-window (other-window-for-scrolling) > (forward-char n))) Hi, Maybe I'm missing something but I thought that Arthur proposition was more specific to "help" buffers. So maybe following this pattern it could be something like this: (defun scroll-other-help (&optional lines) (interactive "P") (with-selected-window (other-help-window) (scroll-up-command n))) =E2=80=A6 but then, we'd have to imagine what 'other-help-window' is. --=20 Manuel Giraud