all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: 32257@debbugs.gnu.org
Subject: bug#32257: 26.1; read-multiple-choice inf loops on mouse clicks
Date: Tue, 31 Jul 2018 12:59:37 +0100	[thread overview]
Message-ID: <vz1d0v3y5sm.fsf@gmail.com> (raw)
In-Reply-To: <87muug4z52.fsf@gmail.com>

On Mon 30 Jul 2018, Noam Postavsky wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> >> > If we want this change on emacs-26, we should carefully audit all the
>>> >> > other users of rmc.el
>>> 
>>> What should we check for though?
>>
>> Anything that read-event handles differently from read-char.  Maybe a
>> good starting point is to compile a list of the differences in
>> behavior between the two.
>
> Looking at the implementation, they both delegate to
> read_filtered_event, but read-char passes 1 for the first three args,
> where read-event passes 0.
>
>    If NO_SWITCH_FRAME, switch-frame events are stashed
>    until we get a character we like, and then stuffed into
>    unread_switch_frame.
>
>    If ASCII_REQUIRED, check function key events to see
>    if the unmodified version of the symbol has a Qascii_character
>    property, and use that character, if present.
>
>    If ERROR_NONASCII, signal an error if the input we
>    get isn't an ASCII character with modifiers.  If it's false but
>    ASCII_REQUIRED is true, just re-read until we get an ASCII
>    character.

So perhaps this `read-char' to `read-event' change will result in different
frame switching behaviour. I'm not sure how to test that though.

> Another possibility is to use read-char-exclusive which only changes
> ERROR_NON_ASCII to 0.  The downside is that when there are mouse clicks
> it prints the events into the minibuffer, covering the prompt (but
> typing "?"  still works to restore the prompt).

AS you have done, I read the implementation and tried a patch using
`read-char-exclusive'. The result is unusable as the printed events
obscure the original question.

The proper long term fix for this is to make read-multiple-choice use a
dedicated buffer rather than the minibuffer, and give better visibility
when more than one question is asked in succession. Perhaps also some
way to stop the echo area from obscuring the minibuffer ?

    AndyM






  reply	other threads:[~2018-07-31 11:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 12:05 bug#32257: 26.1; read-multiple-choice inf loops on mouse clicks Noam Postavsky
2018-07-26  1:25 ` Noam Postavsky
2018-07-27  9:08   ` Eli Zaretskii
2018-07-27 11:35     ` Andy Moreton
2018-07-27 12:30       ` Eli Zaretskii
2018-07-27 12:45         ` Noam Postavsky
2018-07-27 13:50           ` Eli Zaretskii
2018-07-31  1:52             ` Noam Postavsky
2018-07-31 11:59               ` Andy Moreton [this message]
2018-07-31 12:27                 ` martin rudalics
2018-07-31 12:38                   ` Andy Moreton
2018-08-01  8:44                     ` martin rudalics
2018-08-01 12:30                       ` Noam Postavsky
2018-08-01 12:57                       ` Robert Pluim
2018-08-02  7:09                         ` martin rudalics
2018-08-01 20:55                       ` Live System User
2018-08-02  7:09                         ` martin rudalics
2018-07-31 16:06                 ` Eli Zaretskii
2018-07-31 19:26                   ` Andy Moreton
2018-08-01  5:27                     ` Eli Zaretskii
2018-07-31 16:04               ` Eli Zaretskii
2018-07-31 19:29                 ` Andy Moreton
2018-08-01  5:29                   ` Eli Zaretskii
2018-08-01 12:05                     ` Andy Moreton
2019-05-22  0:52                       ` Noam Postavsky
2019-05-22 10:08                         ` Eli Zaretskii
2019-05-26 12:57                           ` Noam Postavsky

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=vz1d0v3y5sm.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=32257@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.