all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: 40915@debbugs.gnu.org
Subject: bug#40915: [PATCH] Make leaving Info-summary more intuitive
Date: Tue, 28 Apr 2020 00:28:31 +0200	[thread overview]
Message-ID: <CADwFkmnwqqmT5sKWf2YcpLKZmqfKyn3ONfLrODeW9EqEXqSM+w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

Severity: minor

There's a small issue with the Info-summary command:

0. emacs -Q
1. C-h i
2. ?
3. q

Result: Now in *scratch* buffer
Expected: Should end up in *info* buffer

The attached patch should fix it by not pushing the character ('q' in
this case) onto 'unread-command-events' before burying the help
buffer.

Best regards,
Stefan Kangas


In GNU Emacs 28.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version
3.24.18, cairo version 1.16.0)
 of 2020-04-27 built on joffe

[-- Attachment #2: 0001-Make-leaving-Info-summary-more-intuitive.patch --]
[-- Type: text/x-patch, Size: 1421 bytes --]

From 0d34e8b98c76bfc1f9dcd24dc0691793b2e03ae5 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Tue, 28 Apr 2020 00:25:11 +0200
Subject: [PATCH] Make leaving Info-summary more intuitive

* lisp/info.el (Info-summary): Discard character on exit instead of
pushing it onto 'unread-command-events'.
---
 lisp/info.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/info.el b/lisp/info.el
index 3015e60a4f..703907b98f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3828,14 +3828,14 @@ Info-summary
     (insert (documentation 'Info-mode))
     (help-mode)
     (goto-char (point-min))
-    (let (ch flag)
-      (while (progn (setq flag (not (pos-visible-in-window-p (point-max))))
-		    (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)))
+    (while (let ((flag (not (pos-visible-in-window-p (point-max)))))
+	     (message (if flag "Type Space to see more"
+			"Type any key to return to Info"))
+             ;; Space scrolls if there is more content.
+             ;; Any other key returns.
+             (setq ch (read-event))
+	     (and flag (eq ch ?\s)))
+      (scroll-up))
     (bury-buffer "*Help*")))
 \f
 (defun Info-get-token (pos start all &optional errorstring)
-- 
2.26.2


             reply	other threads:[~2020-04-27 22:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 22:28 Stefan Kangas [this message]
2020-04-28  7:09 ` bug#40915: [PATCH] Make leaving Info-summary more intuitive Eli Zaretskii
2020-04-28  7:37   ` Stefan Kangas
2020-04-28  7:57     ` Eli Zaretskii
2020-04-28 17:11     ` Drew Adams
2020-04-28 17:17       ` Drew Adams
2020-04-28 17:39       ` Stefan Kangas
2020-04-28 18:43         ` Drew Adams
2020-08-08 12:13 ` Lars Ingebrigtsen
2020-10-07  4:31   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmnwqqmT5sKWf2YcpLKZmqfKyn3ONfLrODeW9EqEXqSM+w@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=40915@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.