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: Tue, 30 May 2023 17:22:36 +0200 Message-ID: <87r0qxoncz.fsf@ledu-giraud.fr> References: <87h6ruf09e.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11342"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) 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 17:24:28 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 1q41D1-0002if-Iy for ged-emacs-devel@m.gmane-mx.org; Tue, 30 May 2023 17:24:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q41Bf-0007xX-K5; Tue, 30 May 2023 11:23:03 -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 1q41BK-0007vQ-3E for emacs-devel@gnu.org; Tue, 30 May 2023 11:22:42 -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 1q41BI-0008KM-0d for emacs-devel@gnu.org; Tue, 30 May 2023 11:22:41 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=51F2NeS6 AS3yBeL24YdBKaPOyKLq//coQTNMeA85m+A=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=NCCO0q9tKMNRujVfhuGWUEFRPOeuRC p7B9RQQYLPiMuAwlMYD9NBCpuos6dBYrH356JOR0nYfddDGSII4KOdBg== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=51F2NeS6AS3yBeL2 4YdBKaPOyKLq//coQTNMeA85m+A=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=c7Avi41LfNPVZoe1/yKppdH7gnqs0DOy8zLzDR vjLkkJQs75g+cJQv1Xs3vyppSOHg10g9DuXQiQW1rvaBhMxrSZd+c9uOhKiGKKXChNQM23 9JKJalLNYhrZo0z9RhGBNvJGKQecWsf2v9IJP+U/+C8Q5DEaBvq6n62WP6N/+Z4U6sgTi3 gQRrDLaldibd5sfJS6pZMhaX94wWSIRd9B8nNB0j78NGyupXpdfdOyf7d2+gd1oQ1Fzmiy JIZERoCpCaGwAC0/Emg1kBA0LlxLaKaLPlvFfUwN0ktHdqMyjwfdlnM9VBO9kPVF5Bw7qY YQwKiu9K0tgqU93luDi2nkBA== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 9b13d40e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 30 May 2023 17:22:37 +0200 (CEST) In-Reply-To: (Arthur Miller's message of "Tue, 30 May 2023 15:31:27 +0200") 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:306415 Archived-At: Arthur Miller writes: > Hi Manuel; > > thank you very much for testing it, and for the kind words. I have reworked > somewhat the patch, because of some unnecessary warnings. I am attaching the > reworked version in this mail too (I have send it in another mail). Sorry for > the inconvenience, but if you test, I suggest testing with the later one. It is > very much the same, minus some re-furnituring for the code, some local variables > renaming and some doc string changes. I'm testing this one but I think SPC should be 'help-scroll-up-command', no? [...] > The technique can be extended to "remotely" control any buffer, but it works > well only with "unique" buffers (one of a kind), like Help buffer for > example. Even with *info* buffers it is a bit less clean since there can be few > of those. But technically it is possible (I have been doing this > programmatically too). Yes, you're right: Man buffers do not have a unique name. Maybe this could be done later. [...] > I am not a repeat-mode user myself to be honest, so IDK, but I guess there > should be no problems. These are just commands that can be called very well via > M-x as any other command, so I guess it should work with repeat mode > as well? I, myself, have activated '(repeat-mode)' and I think your new bindings are good candidate for it. It could also come into another patch after this one. [...] > But in Info-mode there are some nested char-tables in the keymap which turns out > to be quite slow to process programmatically. Also, even if it was fast, doing > that every time Emacs starts is unnecessary, it is probably better to do it once > and for all, so I have implemented it now manually. Similar can be implemented > for any command to make it "buffer specific", but as said, works well only in > cases where there is just one buffer at a time, so I doubt in generality of this > technique. I have actually tried to find some general way to do this > programmatically with any buffer, but thus far, I don't see any general way > that is both efficient and 100% failsafe. Ok, I think I start to see your motivations for this patch then. And I do think that having this in place for *Help* buffers and *info* makes sense. -- Manuel Giraud