Subject: Re: bug#64141: 27.1 newly has clunky type-break y-or-n-p

From: Eli Zaretskii <[email-masked]>
Date: Tue, 20 Jun 2023 14:47:04 +0300

> From: Juri Linkov <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Tue, 20 Jun 2023 09:57:51 +0300
> 
> > just now in normal usage, the y-or-n-p popped up in the middle of an isearch.
> >
> > point was in the middle of hte isearch still.  it was not trivial  to
> > answer the y-or-n-p (point not there) and fix state.
> 
> Reading type-break.el raised some questions: please confirm does the same
> problem occur after using the default value of 'type-break-query-function'
> that is 'yes-or-no-p', and not 'y-or-n-p'?
> 
> It looks like type-break uses 'run-at-time' and then tries to
> call 'y-or-n-p' in the middle of an isearch.  I tried both
> 
>   (run-with-timer 5 5 #'yes-or-no-p "OK? ")
>   (run-with-timer 5 5 #'y-or-n-p "OK? ")
> 
> and activated isearch.  Then the typed answer was added
> to the search string.  Emacs 28 has an option
> 'y-or-n-p-use-read-key' that you can set for type-break
> that pops up the query at random times.  But the problem
> still exists for 'yes-or-no-p'.

Is this a new problem?  That is, did we have this working OK in some
previous version of Emacs?  If so, which version had it right?