GNU bug report logs - #75804
31.0.50; Enlarge or disable `ispell-help-timeout'

Previous Next

Package: emacs;

Reported by: Rudolf Adamkovič <rudolf <at> adamkovic.org>

Date: Fri, 24 Jan 2025 11:21:01 UTC

Severity: wishlist

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Rudolf Adamkovič <rudolf <at> adamkovic.org>,  Eli Zaretskii <eliz <at> gnu.org>
Cc: 75804 <at> debbugs.gnu.org
Subject: bug#75804: 31.0.50; Enlarge or disable `ispell-help-timeout'
Date: Sun, 26 Jan 2025 07:15:45 -0600
Rudolf Adamkovič <rudolf <at> adamkovic.org> writes:

> From d8ded5bcba933cb057572807473f9699d7db4919 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <rudolf <at> adamkovic.org>
> Date: Sat, 25 Jan 2025 11:24:34 +0100
> Subject: [PATCH] Ispell: Increase help timeout
>
> * lisp/textmodes/ispell.el (ispell-help-timeout): Increase the timeout
> from 5 to 30 seconds to allow users, especially new users, read the
> Ispell help menu comfortably and act confidently (bug#75804).

Thanks.

1. I don't see that we support a nil value, so I think we should add it,
   and `nil` should mean "never time out".  This would be easier to set
   than (setq ispell-help-timeout most-positive-fixnum).

2. I gave this a try, but actually I'm not at all sure why we should
   hide the buffer at all, by default.  The user asked to show it, after
   all, and Emacs is waiting for them to hit a key.  IMO, it is hard to
   even understand the purpose of this hiding "feature".

   I think we should just leave it on the screen, which is what the help
   system does everywhere else.  Users who _really_ want to hide it, for
   some reason that I don't understand, will just have to customize it
   back.  So I'm in favor of a `nil` default.

The above 1-2 should be documented in NEWS.

3. We should probably consider this, because a value <1 is rather
   useless and more likely than not a user mistake:

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 761a413baab..7b1f5c8ed7f 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2513,7 +2513,7 @@ ispell-help
 	      (with-current-buffer buffer
 		(insert (concat help-1 "\n" help-2 "\n" help-3)))
 	      (ispell-display-buffer buffer)
-	      (sit-for ispell-help-timeout)
+	      (sit-for (max ispell-help-timeout 1))
 	      (kill-buffer "*Ispell Help*"))
 	  (unwind-protect
 	      (let ((resize-mini-windows 'grow-only))
@@ -2523,7 +2523,7 @@ ispell-help
 		;;(set-minibuffer-window (selected-window))
 		(enlarge-window 2)
 		(insert (concat help-1 "\n" help-2 "\n" help-3))
-		(sit-for ispell-help-timeout))
+		(sit-for (max ispell-help-timeout 1)))
 	    (erase-buffer)))))))

 (define-obsolete-function-alias 'lookup-words 'ispell-lookup-words "24.4")

> ---
>  lisp/textmodes/ispell.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
> index b0f4e416a6e..eca42b63023 100644
> --- a/lisp/textmodes/ispell.el
> +++ b/lisp/textmodes/ispell.el
> @@ -402,7 +402,7 @@ ispell-local-dictionary-alist
>   			       (const :tag "default" nil))
>                         (coding-system :tag "Coding System"))))
>
> -(defcustom ispell-help-timeout 5
> +(defcustom ispell-help-timeout 30
>    "The number of seconds to display the help text."
>    :type 'number
>    :version "28.1")

The :type should be 'natnum instead, and the :version tag needs updating
like Robert pointed out.

> --
> 2.39.5 (Apple Git-154)




This bug report was last modified 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.