From: Jared Finder via "Emacs development discussions." <emacs-devel@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Making TTY menus more visual
Date: Sat, 03 Oct 2020 16:25:42 -0700 [thread overview]
Message-ID: <0bef298d6a043483afdcea119a330bb9@finder.org> (raw)
In-Reply-To: <72bbff31bcf46be917c9e8d8236cad75@finder.org>
On 2020-10-03 3:28 pm, Jared Finder wrote:
> On 2020-10-03 12:26 pm, Jared Finder wrote:
>> On 2020-10-03 1:50 am, Eli Zaretskii wrote:
>>>> Date: Fri, 02 Oct 2020 17:16:55 -0700
>>>> From: Jared Finder <jared@finder.org>
>>>> Cc: emacs-devel@gnu.org
>>>>
>>>> Also, a user may click outside of the popped up menu, which they
>>>> would expect to dismiss the menu. (this is patch 002 in the root of
>>>> the thread, not yet complete)
>>>
>>> This should already work; it does in the MS-Windows build when Emacs
>>> is invoked with -nw. Please tell more why you think any changes
>>> there
>>> are needed. Perhaps you could take me through the code there and
>>> explain what is missing and why. (And why do you call posn-x-y in
>>> the
>>> patch when X and Y are already known and used by that code? is that
>>> because mouse_get_xy does not yet support xterm-mouse? if so, that
>>> support should be added via the terminal's mouse_position_hook.)
>>
>> From injecting debug logs into read_menu_input, I can observe that
>> tty-menu-mouse-movement is never received so the highlighted item
>> never changes except due to keyboard input. And from tracing
>> xterm-mouse--read-event-sequence, it appears that Emacs normally does
>> not receive xterm mouse motion events unless a button is pressed.
>>
>> This appears to be due to xt-mouse sending event code 1002 instead of
>> 1003 (see
>> https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking).
>>
>> Just sending 1003 instead doesn't just work, but I do see mouse events
>> now coming through. Let me do some more investigation here and I will
>> get back to you.
>
> It wasn't that much more work to get xterm-mouse to work. I've
> attached an updated patch.
>
> I have just one question, corresponding to the remaining TODO:
>
> Now there are newly emitted events for mouse-movement that are not
> handled such as "<mode-line> <mouse-movement>" or "<vertical-line>
> <mouse-movement>". It'd be easy enough to bind all of these to ignore
> and further update tty-menu-navigation-map to have more cases, but is
> that the right solution? I'm surprised that only xterm-mouse would run
> into this case.
Apologies, I mistakenly included some exploratory code in my previous
patch. The changes in term_mouse_position are unneeded.
-- MJF
next prev parent reply other threads:[~2020-10-03 23:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-02 6:16 Making TTY menus more visual Jared Finder via Emacs development discussions.
2020-10-02 7:31 ` Eli Zaretskii
2020-10-03 0:16 ` Jared Finder via Emacs development discussions.
2020-10-03 8:50 ` Eli Zaretskii
2020-10-03 19:26 ` Jared Finder via Emacs development discussions.
2020-10-03 22:28 ` Jared Finder via Emacs development discussions.
2020-10-03 23:25 ` Jared Finder via Emacs development discussions. [this message]
2020-10-04 6:43 ` Eli Zaretskii
2020-10-04 9:04 ` Eli Zaretskii
2020-10-05 5:36 ` Jared Finder via Emacs development discussions.
2020-10-05 6:45 ` Eli Zaretskii
2020-10-08 6:39 ` Jared Finder via Emacs development discussions.
2020-10-08 8:15 ` Eli Zaretskii
2020-10-09 5:17 ` Jared Finder via Emacs development discussions.
2020-10-09 15:02 ` Eli Zaretskii
2020-10-10 5:20 ` Jared Finder via Emacs development discussions.
2020-10-10 7:28 ` Eli Zaretskii
2020-10-12 3:25 ` Jared Finder via Emacs development discussions.
2020-10-12 14:45 ` Eli Zaretskii
2020-10-12 21:30 ` Jared Finder via Emacs development discussions.
2020-10-13 14:33 ` Eli Zaretskii
2020-10-14 1:59 ` Jared Finder via Emacs development discussions.
2020-10-15 13:34 ` Eli Zaretskii
2020-10-16 6:51 ` Eli Zaretskii
2020-10-16 16:18 ` Jared Finder via Emacs development discussions.
2020-10-24 10:31 ` Eli Zaretskii
2020-10-25 0:27 ` Jared Finder via Emacs development discussions.
2020-10-31 8:05 ` Eli Zaretskii
2020-10-24 10:25 ` Eli Zaretskii
2020-10-04 6:22 ` Eli Zaretskii
2020-10-04 6:24 ` Eli Zaretskii
2020-10-04 22:15 ` Jared Finder via Emacs development discussions.
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=0bef298d6a043483afdcea119a330bb9@finder.org \
--to=emacs-devel@gnu.org \
--cc=eliz@gnu.org \
--cc=jared@finder.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.