From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#23009: 25.0.92; xterm-mouse-mode should not assume UTF-8 coordinates Date: Mon, 14 Mar 2016 17:24:57 +0000 Message-ID: References: <83y49lc8o8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1140c8ece2b948052e058f8f X-Trace: ger.gmane.org 1457976385 26717 80.91.229.3 (14 Mar 2016 17:26:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2016 17:26:25 +0000 (UTC) Cc: 23009@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 14 18:26:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1afWG0-0006hW-4m for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Mar 2016 18:26:16 +0100 Original-Received: from localhost ([::1]:42704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWFz-0005MP-ME for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Mar 2016 13:26:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWFu-0005Ip-69 for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2016 13:26:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afWFm-00058T-LO for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2016 13:26:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWFm-00058N-IM for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2016 13:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1afWFm-0004kK-BW for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2016 13:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Mar 2016 17:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23009 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23009-submit@debbugs.gnu.org id=B23009.145797631518184 (code B ref 23009); Mon, 14 Mar 2016 17:26:02 +0000 Original-Received: (at 23009) by debbugs.gnu.org; 14 Mar 2016 17:25:15 +0000 Original-Received: from localhost ([127.0.0.1]:48111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1afWF0-0004jE-Pf for submit@debbugs.gnu.org; Mon, 14 Mar 2016 13:25:15 -0400 Original-Received: from mail-lb0-f177.google.com ([209.85.217.177]:36220) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1afWEz-0004j2-7Q for 23009@debbugs.gnu.org; Mon, 14 Mar 2016 13:25:13 -0400 Original-Received: by mail-lb0-f177.google.com with SMTP id x1so248778441lbj.3 for <23009@debbugs.gnu.org>; Mon, 14 Mar 2016 10:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SCOEDzH92cHTAN+LcOpXva0fiiohWmjXZYp84ELJ9lM=; b=SSCsFhCnCICOSeNUQekwif6nTXOsu5682nHYNAWaT90evJUlNL21QMIKl7k+jJheJ+ x7DLe9qNxlO90iQ9YuGY5MUPOUHnRnRikfD5fHuJAtaxCErYLjgF3u5hr910B6PCoiqA Py90+4kWmWCmtWeUUvzoTArayRCFBz6DYGKDDlClPFJqZv3PWdJch4P5Phlgvf6S+QCm 92XQokpaimWni2U2hHFsus0wMWOsw8lC8bteUQPJt7wGzPRt4ycaH1DMZy+6WLXAafUJ rpivPQ2eKB39HnbMJYosIqSYC76XgJykqRf+KBOejkZKGlbEhI0Cib1ZQWUnxOCYLoYZ WNuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SCOEDzH92cHTAN+LcOpXva0fiiohWmjXZYp84ELJ9lM=; b=eXBTiybegxM3t9qZbVfyTG9qGY+4Uh4xve93+oLxDRUxtVl3Z5wkizOkcVQgG67JmU xQvFDxC9+StJAErS8zJ7l0Hja58aFxOUA+ecWKkpl7o4FG7tKKGsGUlGvfGQj5v0mmhx JDzE+6JtUC7LEJBidXBd95nNbiAyLpNB4ZHTB3acR5B3QAFqVkyx4t7HjnYDLxmUQ3pa SbzOfDUqVtqjpU4kcA/H7rEeEHSJOdP0zE1MbzdCXhSGzd78NdReMWZqP4eUjVwLssSA 4f62zU0VK+mQ+p/BP1rjEdbvfzRa/gNyaM2OVKrTvn+/HQskFUJAFhzoFsinu+yiGSr0 wyRg== X-Gm-Message-State: AD7BkJLNymZW6toYRfNbljDy80soveWHHWrfWWy+XBeJ85DhAOVBhhROQxWDPSlQZNHXZG1icxjHc6J81AOFIA== X-Received: by 10.25.212.213 with SMTP id l204mr8405729lfg.118.1457976307265; Mon, 14 Mar 2016 10:25:07 -0700 (PDT) In-Reply-To: <83y49lc8o8.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114897 Archived-At: --001a1140c8ece2b948052e058f8f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii schrieb am Mo., 14. M=C3=A4rz 2016 um 17:43 Uh= r: > > From: Philipp Stephani > > 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 suffe= r > > 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 a= s > > 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. --001a1140c8ece2b948052e058f8f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Mo., 14. M=C3=A4rz 2016 um 17:43=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@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.=C2=A0 It is too hard to f= igure out
>=C2=A0 =C2=A0whether they are enabled.=C2=A0 Rather, err on the safe si= de and only use
>=C2=A0 =C2=A0single-byte coordinates.=C2=A0 (The superior SGR mode, whi= ch doesn't suffer
>=C2=A0 =C2=A0from this problem, should remain enabled.)

How about providing a user option, off by default, to enable that?=C2=A0 A<= br> user who knows that this works on her machine will then be able to use
the feature.

I considered that, but the= n it would be impossible to have different terminals with and without the o= ption. Might still be a good idea, if it's off by default.
= =C2=A0

> - In `xterm-mouse--read-number-from-terminal', specify a very shor= t
>=C2=A0 =C2=A0timeout.=C2=A0 The terminal will always write the entire e= scape sequence as
>=C2=A0 =C2=A0a unit, so waiting only increases the chance to accidentia= lly read
>=C2=A0 =C2=A0unrelated events.

Won't this break when working on a remote machine via a slow link?
<= /blockquote>

Maybe, haven't tried.
=C2=A0<= /div>

> - As an optimization, provide a `read-byte' function written in C = that
>=C2=A0 =C2=A0reads a single byte without taking the current terminal en= coding into
>=C2=A0 =C2=A0account.

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 prob= ably good enough. As said, this is only an optimization.=C2=A0
<= /div> --001a1140c8ece2b948052e058f8f--