From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Pressing ? does not allow window scrolling through the list of info commands Date: Sat, 8 Jul 2023 01:28:29 +0700 Message-ID: References: <83bkgoguea.fsf@gnu.org> <837crcgra6.fsf@gnu.org> 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="6339"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 07 20:29:16 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1qHqCi-0001Qk-IN for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 07 Jul 2023 20:29:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHqCD-0001Ud-67; Fri, 07 Jul 2023 14:28:45 -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 1qHqCC-0001US-Ct for help-gnu-emacs@gnu.org; Fri, 07 Jul 2023 14:28:44 -0400 Original-Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHqCA-0002fc-S0; Fri, 07 Jul 2023 14:28:44 -0400 Original-Received: by mail-vs1-xe2f.google.com with SMTP id ada2fe7eead31-44523d9fd18so647828137.0; Fri, 07 Jul 2023 11:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688754521; x=1691346521; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4cBFQjY2hrh4q44ADGUpi5mty7htCc+RMhYj3Q08DiQ=; b=sPfnOQ9ZA7pVOXwNmtMbyQZ2zhm7+xeUUd4q76mSU4PYUryjvkfrvk2eRM4ge8X4xs nh3VQ4d+YOUz20ZsSJ3kmo0bXmN9B9MuIpayQnWgTHw3Bxt8/qPF3kKg+c4AuOx6c06E ZkTbaN/TLkRSFzt+l+EWvaCXcLpbprUmm9TwOt2wLbg/MvLmmYMal/W0oFZsB41A47Wl 1vfnrkWeTYtn/mrDlRhIFRCVGABwF0LIQa65scjUCckN1wKWBoS56rdNDs+HiVwwcGws OUXu8O+9kaUWE6APJ38+sZkN8OclfT9PSzeMgXtXHJW9Kn8V3vAb/nI0ts3PsC97AOss yDjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688754521; x=1691346521; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4cBFQjY2hrh4q44ADGUpi5mty7htCc+RMhYj3Q08DiQ=; b=YQzx0zvjMiuBQmno5Ipj6AIkg4XjHeeo5WlLKbtmyNgNCithxIe8GImd8STt8HUqNq G9GpoRncjYYXPgiwc58WXsurQUTWOU31o3glIZPbDOVStdGafBL84f7uwnZYuwTzMlwB fDjhPqREuRrUIElrDrGj03Q3tF0VLt6zDUPoJtWp3gMQ8MypC+HL2jjAZY9rXeUL4F5C QLlFiKPVr+WD0GJXGkMOAf8n3L3/dtR36IHmW5Tp0w5KlwLthzdrg2CrEUiDqrGqT/1Z bT3uO74x+2Ajx6RTlv+IkERadK+1SH4jEK5td+0m7Aywff14ZPOrerkE0xHKnT1m4xps J/QQ== X-Gm-Message-State: ABy/qLaRyMTAOQzAEkhHq3ic520y4XNGM5h/zqugCuvbgT0PSSSwU7x7 nm6uxtUpEDCXDW5WiKhI7h5k7deH9BrURnsplrpBZl9kW9w= X-Google-Smtp-Source: APBJJlGt3zd/uHXlA57Z8PXLem+/nDeBvQ+N7alqDQjzuFJuaTNpSS6Qr0l0t38ABjVZuzwQV/WoSFrD4QOoB3r9rbw= X-Received: by 2002:a67:b14b:0:b0:443:6549:3e18 with SMTP id z11-20020a67b14b000000b0044365493e18mr2409001vsl.18.1688754521027; Fri, 07 Jul 2023 11:28:41 -0700 (PDT) In-Reply-To: <837crcgra6.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::e2f; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe2f.google.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, SPF_HELO_NONE=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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144177 Archived-At: On Fri, 7 Jul 2023 at 13:39, Eli Zaretskii wrote: > > However, what is the reason for that event loop? > > The reason is to allow return to the manual with minimal fuss. As the > user who invokes "?" is very likely to be a newbie to Emacs, having > them to deal with buffers and windows at this point is unwise, to say > the least. =E2=80=98help-mode-map=E2=80=99 has =E2=80=98q=E2=80=99 bound to =E2=80=98q= uit-window=E2=80=99 and that=E2=80=99s the minimal fuss way to return from the help window. It also would help build habits that work with a wide set of buffers in Emacs. As it is, the user has to build three sets of habits: (1) for the rudimentary Info-summary modal event loop where SPC scrolls up and anything else quits; (2) for modes that inherit from special-mode where SPC scrolls up, DEL and S-SPC scroll down, =E2=80=98q=E2=80=99 quits,= and all familiar keys work; and (3) for the full experience editable buffers where you have to scroll with Page Up/Down and have no notion of quitting. > For the same reason, the first screenful displayed by "?" should show > all of the essential commands, leaving the next screenful to show the > advanced and more rarely-used ones. > > I'm not saying I object to adding more keys to scroll the display > there, but the simplicity of going back to the manual should be > preserved. (Hand-written whitespace-ignoring minimal diff follows. I signed the paperwork some time ago and it should be valid for now.) (defun Info-summary () "Display a brief summary of all Info commands." (interactive) - (save-window-excursion (switch-to-buffer "*Help*") (setq buffer-read-only nil) (erase-buffer) (insert (documentation 'Info-mode)) (help-mode) + (setq-local header-line-format '("Press " + (:propertize "q" face help-key-binding) + " to return to Info")) (goto-char (point-min)) - (let (ch flag) - (while (progn (setq flag (not (pos-visible-in-window-p (point-ma= x)))) - (message (if flag "Type Space to see more" - "Type Space to return to Info")) - (if (not (eq ?\s (setq ch (read-event)))) - (progn (push ch unread-command-events) nil) - flag)) - (scroll-up))) - (bury-buffer "*Help*")) + (message "Press %s to return to Info" (propertize "q" 'face 'help-key-binding)) ) (That said, for personal use, I bind =E2=80=98describe-mode=E2=80=99 to =E2= =80=98?=E2=80=99 in =E2=80=98Info-mode-map=E2=80=99. It displays much the same text, albeit wit= h a long list of minor modes at the top and their details on the bottom.)