unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51475: read-char-choice should hide the cursor
@ 2021-10-29  5:24 ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-29 13:06 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 20+ messages in thread
From: ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-29  5:24 UTC (permalink / raw)
  To: 51475

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

Since it only reads a single character, the cursor is unnecessary and unsightly in the prompt:

(read-char-choice " a - good\n b - bad\n c - ugly" '(?a ?b ?c))

[-- Attachment #2: Type: text/html, Size: 202 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29  5:24 bug#51475: read-char-choice should hide the cursor ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-29 13:06 ` Lars Ingebrigtsen
  2021-10-29 14:53   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-29 18:41   ` Gregory Heytings
  0 siblings, 2 replies; 20+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-29 13:06 UTC (permalink / raw)
  To: ndame; +Cc: 51475

ndame <laszlomail@protonmail.com> writes:

> Since it only reads a single character, the cursor is unnecessary and unsightly
> in the prompt:
>
> (read-char-choice " a - good\n b - bad\n c - ugly" '(?a ?b ?c))

But it looks nice in

(read-char-choice " a - good; b - bad; c - ugly: " '(?a ?b ?c))

We could hide it if the prompt is multi-line, I guess?  Anybody got an
opinion?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 13:06 ` Lars Ingebrigtsen
@ 2021-10-29 14:53   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-29 17:13     ` Stefan Kangas
  2021-10-29 18:41   ` Gregory Heytings
  1 sibling, 1 reply; 20+ messages in thread
From: ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-29 14:53 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 51475


>
> We could hide it if the prompt is multi-line, I guess? Anybody got an opinion?

Or maybe an optional argument for  read-char-choice to hide it if it does not look good with the chosen layout.






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 14:53   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-29 17:13     ` Stefan Kangas
  2021-10-29 17:16       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 20+ messages in thread
From: Stefan Kangas @ 2021-10-29 17:13 UTC (permalink / raw)
  To: ndame; +Cc: Lars Ingebrigtsen, 51475

ndame <laszlomail@protonmail.com> writes:

>>
>> We could hide it if the prompt is multi-line, I guess? Anybody got an opinion?
>
> Or maybe an optional argument for read-char-choice to hide it if it
> does not look good with the chosen layout.

An optional argument could perhaps be good, as this could vary depending
on the use.

It would be even better if we had a real-world example of where showing
point looks ugly.  Could you perhaps provide such an example?





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 17:13     ` Stefan Kangas
@ 2021-10-29 17:16       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 20+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-29 17:16 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: ndame, 51475

Stefan Kangas <stefan@marxist.se> writes:

> It would be even better if we had a real-world example of where showing
> point looks ugly.  Could you perhaps provide such an example?

There was one in the original bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 13:06 ` Lars Ingebrigtsen
  2021-10-29 14:53   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-29 18:41   ` Gregory Heytings
  2021-10-29 18:47     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 20+ messages in thread
From: Gregory Heytings @ 2021-10-29 18:41 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ndame, 51475

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


>
> We could hide it if the prompt is multi-line, I guess?  Anybody got an 
> opinion?
>

Or we could make it depend on a dynamic variable.  See attached patch.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=Make-it-possible-to-hide-the-cursor-during-read-char.patch, Size: 3383 bytes --]

From d541c01d44fed39b3e144fff5499c7a306c255f8 Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Fri, 29 Oct 2021 18:37:32 +0000
Subject: [PATCH] Make it possible to hide the cursor during
 read-char-choice/from-minibuffer.

* lisp/subr.el (read-char-choice-hide-cursor,
read-char-from-minibuffer-hide-cursor): New variables.
(read-char-choice, read-char-choice-with-read-key,
read-char-from-minibuffer): Use them.
---
 lisp/subr.el | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index 86460d9da6..3ff160cc64 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3041,6 +3041,9 @@ read-char-choice-use-read-key
 character.  This is not possible when using `read-key', but using
 `read-key' may be less confusing to some users.")
 
+(defvar read-char-choice-hide-cursor nil
+  "Whether to hide cursor during `read-char-choice'.")
+
 (defun read-char-choice (prompt chars &optional inhibit-keyboard-quit)
   "Read and return one of CHARS, prompting for PROMPT.
 Any input that is not one of CHARS is ignored.
@@ -3050,7 +3053,8 @@ read-char-choice
 `read-char-choice-use-read-key' is non-nil, the modal `read-key'
 function is used instead (see `read-char-choice-with-read-key')."
   (if (not read-char-choice-use-read-key)
-      (read-char-from-minibuffer prompt chars)
+      (let ((read-char-from-minibuffer-hide-cursor read-char-choice-hide-cursor))
+        (read-char-from-minibuffer prompt chars))
     (read-char-choice-with-read-key prompt chars inhibit-keyboard-quit)))
 
 (defun read-char-choice-with-read-key (prompt chars &optional inhibit-keyboard-quit)
@@ -3066,7 +3070,7 @@ read-char-choice-with-read-key
   (unless (consp chars)
     (error "Called `read-char-choice' without valid char choices"))
   (let (char done show-help (helpbuf " *Char Help*"))
-    (let ((cursor-in-echo-area t)
+    (let ((cursor-in-echo-area (not read-char-choice-hide-cursor))
           (executing-kbd-macro executing-kbd-macro)
 	  (esc-flag nil))
       (save-window-excursion	      ; in case we call help-form-show
@@ -3224,6 +3228,9 @@ read-char-from-minibuffer-insert-other
     (minibuffer-message "Wrong answer")
     (sit-for 2)))
 
+(defvar read-char-from-minibuffer-hide-cursor nil
+  "Whether to hide cursor during `read-char-from-minibuffer'.")
+
 (defun read-char-from-minibuffer (prompt &optional chars history)
   "Read a character from the minibuffer, prompting for it with PROMPT.
 Like `read-char', but uses the minibuffer to read and return a character.
@@ -3268,8 +3275,12 @@ read-char-from-minibuffer
          ;; Protect this-command when called from pre-command-hook (bug#45029)
          (this-command this-command)
          (result
-          (read-from-minibuffer prompt nil map nil
-                                (or history 'empty-history)))
+          (minibuffer-with-setup-hook
+              (lambda ()
+                (setq-local cursor-type
+                            (not read-char-from-minibuffer-hide-cursor)))
+            (read-from-minibuffer prompt nil map nil
+                                  (or history 'empty-history))))
          (char
           (if (> (length result) 0)
               ;; We have a string (with one character), so return the first one.
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 18:41   ` Gregory Heytings
@ 2021-10-29 18:47     ` Lars Ingebrigtsen
  2021-10-29 18:54       ` Gregory Heytings
  2021-10-29 20:09       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 20+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-29 18:47 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: ndame, 51475

Gregory Heytings <gregory@heytings.org> writes:

> Or we could make it depend on a dynamic variable.  See attached patch.

I'd rather have an optional variable if this is something that should be
controlled.

But I'm not sure we want to.  The original example was:

(read-char-choice " a - good\n b - bad\n c - ugly" '(?a ?b ?c))

But that's an ugly prompt in itself.  If it's amended to

(read-char-choice " a - good\n b - bad\n c - ugly: " '(?a ?b ?c))

then it's fine showing the cursor.  (And that's a prompt should look.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 18:47     ` Lars Ingebrigtsen
@ 2021-10-29 18:54       ` Gregory Heytings
  2021-10-29 19:00         ` Lars Ingebrigtsen
  2021-10-29 20:09       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 20+ messages in thread
From: Gregory Heytings @ 2021-10-29 18:54 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ndame, 51475


>> Or we could make it depend on a dynamic variable.  See attached patch.
>
> I'd rather have an optional variable if this is something that should be 
> controlled.
>

You mean, an optional argument?  If so, unless you also add an additional 
optional argument to read-char-from-minibuffer, you'll need a dynamic 
variable anyway.

>
> But I'm not sure we want to.  The original example was:
>
> (read-char-choice " a - good\n b - bad\n c - ugly" '(?a ?b ?c))
>
> But that's an ugly prompt in itself.  If it's amended to
>
> (read-char-choice " a - good\n b - bad\n c - ugly: " '(?a ?b ?c))
>
> then it's fine showing the cursor.  (And that's a prompt should look.)
>

I'm not sure either.  I'm also not sure the OP would agree that your 
amended version is fine.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 18:54       ` Gregory Heytings
@ 2021-10-29 19:00         ` Lars Ingebrigtsen
  2021-10-29 19:18           ` Gregory Heytings
  0 siblings, 1 reply; 20+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-29 19:00 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: ndame, 51475

Gregory Heytings <gregory@heytings.org> writes:

> You mean, an optional argument?  If so, unless you also add an
> additional optional argument to read-char-from-minibuffer, you'll need
> a dynamic variable anyway.

Hm, yes...

Perhaps if the user wants this, they could just use
`minibuffer-setup-hook' to make the cursor go away?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 19:00         ` Lars Ingebrigtsen
@ 2021-10-29 19:18           ` Gregory Heytings
  2021-10-30 11:38             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 20+ messages in thread
From: Gregory Heytings @ 2021-10-29 19:18 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ndame, 51475


>
> Perhaps if the user wants this, they could just use 
> `minibuffer-setup-hook' to make the cursor go away?
>

Indeed, that's yet another solution:

(minibuffer-with-setup-hook
     (lambda () (setq-local cursor-type nil))
   (read-char-choice " a - good\n b - bad\n c - ugly" '(?a ?b ?c)))

But that doesn't work if read-char-choice-use-read-key is non-nil.  And 
given that cursor-in-echo-area is explicitly bound in 
read-char-choice-use-read-key, there's I think no similar trick that could 
be used to make that case work.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 18:47     ` Lars Ingebrigtsen
  2021-10-29 18:54       ` Gregory Heytings
@ 2021-10-29 20:09       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-29 20:28         ` Gregory Heytings
                           ` (3 more replies)
  1 sibling, 4 replies; 20+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-29 20:09 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ndame, Gregory Heytings, 51475

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Gregory Heytings <gregory@heytings.org> writes:
>
>> Or we could make it depend on a dynamic variable.  See attached patch.
>
> I'd rather have an optional variable if this is something that should be
> controlled.
>
> But I'm not sure we want to.  The original example was:
>
> (read-char-choice " a - good\n b - bad\n c - ugly" '(?a ?b ?c))
>
> But that's an ugly prompt in itself.  If it's amended to
>
> (read-char-choice " a - good\n b - bad\n c - ugly: " '(?a ?b ?c))
>
> then it's fine showing the cursor.  (And that's a prompt should look.)

Isearch for example doesn't show the cursor after the colon until after
the cursor can do something useful (ie. you press M-e to edit the search
string).  By the same reasoning, I think that read-char-choice should
always hide the cursor.

I'd prefer if we decide if the cursor is always visible or invisible.
Adding variables or parameters for this would add complexity to Emacs
for a, IMO, small matter.  If there's no agreement, I think leaving
things as is is preferably, but that's just my opinion.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 20:09       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-29 20:28         ` Gregory Heytings
  2021-10-29 21:04         ` Andreas Schwab
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Gregory Heytings @ 2021-10-29 20:28 UTC (permalink / raw)
  To: Daniel Martín; +Cc: ndame, Lars Ingebrigtsen, 51475


>
> Isearch for example doesn't show the cursor after the colon until after 
> the cursor can do something useful (ie. you press M-e to edit the search 
> string).  By the same reasoning, I think that read-char-choice should 
> always hide the cursor.
>

Isearch doesn't use a minibuffer, it uses the echo area.  When you press 
M-e it starts to use a minibuffer.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 20:09       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-29 20:28         ` Gregory Heytings
@ 2021-10-29 21:04         ` Andreas Schwab
  2021-10-30  1:24         ` Stefan Kangas
  2021-10-30 11:36         ` Lars Ingebrigtsen
  3 siblings, 0 replies; 20+ messages in thread
From: Andreas Schwab @ 2021-10-29 21:04 UTC (permalink / raw)
  To: 51475; +Cc: laszlomail, larsi, gregory, mardani29

On Okt 29 2021, Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Isearch for example doesn't show the cursor after the colon until after
> the cursor can do something useful (ie. you press M-e to edit the search
> string).  By the same reasoning, I think that read-char-choice should
> always hide the cursor.

Isearch has its focus on the buffer that is searched.  The focus for
read-char-choice is on the input.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 20:09       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-29 20:28         ` Gregory Heytings
  2021-10-29 21:04         ` Andreas Schwab
@ 2021-10-30  1:24         ` Stefan Kangas
  2021-10-30  8:48           ` Gregory Heytings
  2021-10-30 11:36         ` Lars Ingebrigtsen
  3 siblings, 1 reply; 20+ messages in thread
From: Stefan Kangas @ 2021-10-30  1:24 UTC (permalink / raw)
  To: Daniel Martín; +Cc: ndame, Lars Ingebrigtsen, Gregory Heytings, 51475

Daniel Martín <mardani29@yahoo.es> writes:

> Isearch for example doesn't show the cursor after the colon until after
> the cursor can do something useful (ie. you press M-e to edit the search
> string).  By the same reasoning, I think that read-char-choice should
> always hide the cursor.

Transient does the same, and I always found that to be a very natural
interface.

The same thing if you just press "C-x" and wait a second.

At the very least these examples demonstrate that it's fine not to show
a cursor.

> I'd prefer if we decide if the cursor is always visible or
> invisible.
[...]
> If there's no agreement, I think leaving things as is is

I agree with both of these ideas, so that we can keep the Emacs
interface a tiny bit more consistent.

Otherwise it will be down to the preference of individual package
authors, who will pick one or the other on a whim or individual fancy.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-30  1:24         ` Stefan Kangas
@ 2021-10-30  8:48           ` Gregory Heytings
  0 siblings, 0 replies; 20+ messages in thread
From: Gregory Heytings @ 2021-10-30  8:48 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: ndame, Lars Ingebrigtsen, 51475, Daniel Martín


>
> Transient does the same, and I always found that to be a very natural 
> interface.
>
> The same thing if you just press "C-x" and wait a second.
>

These two examples do not use a minibuffer, they use the echo area.

>> I'd prefer if we decide if the cursor is always visible or invisible.
>>
>> [...]
>>
>> If there's no agreement, I think leaving things as is is
>
> I agree with both of these ideas, so that we can keep the Emacs 
> interface a tiny bit more consistent.
>

FWIW, I strongly disagree with the "always" idea.  There are cases where 
seeing a cursor is perhaps not important and perhaps undesirable, but 
there are many cases where seeing visually that the selected window has 
changed and that the active cursor has moved to the minibuffer is 
important, such as when you press C-x C-c with a non-saved file-visiting 
buffer, and/or when you (fset 'yes-or-no-p 'y-or-n-p).





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 20:09       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
                           ` (2 preceding siblings ...)
  2021-10-30  1:24         ` Stefan Kangas
@ 2021-10-30 11:36         ` Lars Ingebrigtsen
  2021-11-01  8:18           ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  3 siblings, 1 reply; 20+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-30 11:36 UTC (permalink / raw)
  To: Daniel Martín; +Cc: ndame, Gregory Heytings, 51475

Daniel Martín <mardani29@yahoo.es> writes:

> Isearch for example doesn't show the cursor after the colon until after
> the cursor can do something useful (ie. you press M-e to edit the search
> string).  By the same reasoning, I think that read-char-choice should
> always hide the cursor.

read-char-choice is a generalisation (sort of) of `y-or-n-p', which does
show the cursor.  (And I checked with 25.1 -- it shows the cursor there,
too.)

So if we're going to make things consistent, then we'd have to start
showing a fake cursor in the echo area for commands like `C-s' and
`C-x', too.

But...  I don't feel very enthusiastic about the idea.

> I'd prefer if we decide if the cursor is always visible or invisible.
> Adding variables or parameters for this would add complexity to Emacs
> for a, IMO, small matter.  If there's no agreement, I think leaving
> things as is is preferably, but that's just my opinion.

Yeah, probably.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-29 19:18           ` Gregory Heytings
@ 2021-10-30 11:38             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 20+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-30 11:38 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: ndame, 51475

Gregory Heytings <gregory@heytings.org> writes:

> Indeed, that's yet another solution:
>
> (minibuffer-with-setup-hook
>     (lambda () (setq-local cursor-type nil))
>   (read-char-choice " a - good\n b - bad\n c - ugly" '(?a ?b ?c)))
>
> But that doesn't work if read-char-choice-use-read-key is non-nil.
> And given that cursor-in-echo-area is explicitly bound in
> read-char-choice-use-read-key, there's I think no similar trick that
> could be used to make that case work.

That's true -- people who want to hide the cursor has to set/bind
read-char-choice-use-read-key to nil.  But I think that's OK.

I think that, upon reflection, that there's nothing here that needs to
be fixed.  So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-10-30 11:36         ` Lars Ingebrigtsen
@ 2021-11-01  8:18           ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-11-01  9:11             ` Gregory Heytings
  0 siblings, 1 reply; 20+ messages in thread
From: ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-01  8:18 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Gregory Heytings, 51475, Daniel Martín

>
> read-char-choice is a generalisation (sort of) of `y-or-n-p', which does show the cursor. (And I checked with 25.1 -- it shows the cursor there, too.) So if we're going to make things consistent,


As for consistency, it's strange that read-char-choice  shows a static cursor, while y-or-no-p shows a blinking one:

(read-char-choice " a - good; b - bad; c - ugly: " '(?a ?b ?c))

(y-or-n-p "How would you fix Emacs?")







^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-11-01  8:18           ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-01  9:11             ` Gregory Heytings
  2021-11-01 16:12               ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 20+ messages in thread
From: Gregory Heytings @ 2021-11-01  9:11 UTC (permalink / raw)
  To: ndame; +Cc: Lars Ingebrigtsen, 51475, Daniel Martín


>
> As for consistency, it's strange that read-char-choice shows a static 
> cursor, while y-or-no-p shows a blinking one:
>
> (read-char-choice " a - good; b - bad; c - ugly: " '(?a ?b ?c))
>
> (y-or-n-p "How would you fix Emacs?")
>

That's probably because of one of your customizations, in emacs -Q both 
show a blinking cursor.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#51475: read-char-choice should hide the cursor
  2021-11-01  9:11             ` Gregory Heytings
@ 2021-11-01 16:12               ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 20+ messages in thread
From: ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-01 16:12 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: Lars Ingebrigtsen, 51475, Daniel Martín

> >
> > cursor, while y-or-no-p shows a blinking one:
> >
> > (read-char-choice " a - good; b - bad; c - ugly: " '(?a ?b ?c))
> >
> > (y-or-n-p "How would you fix Emacs?")
>
> That's probably because of one of your customizations, in emacs -Q both
> show a blinking cursor.

I tried it with -Q.

GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-12


Maybe it's changed for Emacs 28.






^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-11-01 16:12 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29  5:24 bug#51475: read-char-choice should hide the cursor ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-29 13:06 ` Lars Ingebrigtsen
2021-10-29 14:53   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-29 17:13     ` Stefan Kangas
2021-10-29 17:16       ` Lars Ingebrigtsen
2021-10-29 18:41   ` Gregory Heytings
2021-10-29 18:47     ` Lars Ingebrigtsen
2021-10-29 18:54       ` Gregory Heytings
2021-10-29 19:00         ` Lars Ingebrigtsen
2021-10-29 19:18           ` Gregory Heytings
2021-10-30 11:38             ` Lars Ingebrigtsen
2021-10-29 20:09       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-29 20:28         ` Gregory Heytings
2021-10-29 21:04         ` Andreas Schwab
2021-10-30  1:24         ` Stefan Kangas
2021-10-30  8:48           ` Gregory Heytings
2021-10-30 11:36         ` Lars Ingebrigtsen
2021-11-01  8:18           ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-01  9:11             ` Gregory Heytings
2021-11-01 16:12               ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).