GNU bug report logs - #23009
25.0.92; xterm-mouse-mode should not assume UTF-8 coordinates

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Mon, 14 Mar 2016 12:58:01 UTC

Severity: normal

Found in version 25.0.92

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

Bug is archived. No further changes may be made.

Full log


Message #11 received at 23009 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23009 <at> debbugs.gnu.org
Subject: Re: bug#23009: 25.0.92;
 xterm-mouse-mode should not assume UTF-8 coordinates
Date: Mon, 14 Mar 2016 17:24:57 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> schrieb am Mo., 14. März 2016 um 17:43 Uhr:

> > From: Philipp Stephani <p.stephani2 <at> gmail.com>
> > Date: Mon, 14 Mar 2016 13:56:41 +0100
> >
> > I'd suggest the following (and will happily provide patches if
> > accepted):
> >
> > - Don't enable UTF-8 coordinates at all.  It is too hard to figure out
> >   whether they are enabled.  Rather, err on the safe side and only use
> >   single-byte coordinates.  (The superior SGR mode, which doesn't suffer
> >   from this problem, should remain enabled.)
>
> How about providing a user option, off by default, to enable that?  A
> user who knows that this works on her machine will then be able to use
> the feature.
>

I considered that, but then it would be impossible to have different
terminals with and without the option. Might still be a good idea, if it's
off by default.


>
> > - In `xterm-mouse--read-number-from-terminal', specify a very short
> >   timeout.  The terminal will always write the entire escape sequence as
> >   a unit, so waiting only increases the chance to accidentially read
> >   unrelated events.
>
> Won't this break when working on a remote machine via a slow link?
>

Maybe, haven't tried.


>
> > - As an optimization, provide a `read-byte' function written in C that
> >   reads a single byte without taking the current terminal encoding into
> >   account.
>
> You should be able to achieve the same effect by binding
> keyboard-coding-system to no-conversion, no?
>

Yes, but that feels kind of like an abstraction inversion. Still probably
good enough. As said, this is only an optimization.
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 41 days ago.

Previous Next


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