From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Han Boetes Newsgroups: gmane.emacs.bugs Subject: bug#35180: 27.0.50; emacs daemon and =?UTF-8?Q?=E2=80=9Cpackage=E2=80=9D?= often inserts [I when opening file Date: Sat, 27 Apr 2019 22:35:39 +0200 Message-ID: References: <87d0l720xi.fsf@igel.home> <87lfzvy7xw.fsf@tcd.ie> <83lfzvv8kx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000378a72058788ff67" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="253898"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "Basil L. Contovounesios" , 35180@debbugs.gnu.org, Andreas Schwab To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 27 22:45:33 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKUCS-0013vk-Lu for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2019 22:45:32 +0200 Original-Received: from localhost ([127.0.0.1]:36158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKUCR-000581-Ny for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2019 16:45:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKUBt-0004gu-Dz for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 16:44:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKU3H-0004vo-6u for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 16:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hKU3G-0004tt-HT for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 16:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hKU3G-0003UA-Ao for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 16:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Han Boetes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2019 20:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35180 X-GNU-PR-Package: emacs Original-Received: via spool by 35180-submit@debbugs.gnu.org id=B35180.155639735813389 (code B ref 35180); Sat, 27 Apr 2019 20:36:02 +0000 Original-Received: (at 35180) by debbugs.gnu.org; 27 Apr 2019 20:35:58 +0000 Original-Received: from localhost ([127.0.0.1]:36093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKU3C-0003Ts-8p for submit@debbugs.gnu.org; Sat, 27 Apr 2019 16:35:58 -0400 Original-Received: from mail-vs1-f44.google.com ([209.85.217.44]:39534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKU3A-0003Tf-JL for 35180@debbugs.gnu.org; Sat, 27 Apr 2019 16:35:57 -0400 Original-Received: by mail-vs1-f44.google.com with SMTP id g127so3864450vsd.6 for <35180@debbugs.gnu.org>; Sat, 27 Apr 2019 13:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6ozFOSIAxNDx6j0lvpDsRVxxulbjzx13fOOyl5bRbyQ=; b=Ok6kEj/nzLZIUlzl6JwCJSzdz5K+l41qjSDOFmfWomh5dQ91ITP9pCgDwtQ1xHXGN2 qcWJzm8w8Vlck2DJfME2H99j12gPCsJGgPdfRn/fd5oo4oWf2WMWQip+ubPg5uF6ETIM XQd2t6M9lPzCDKkMw9vnsUXoQUJp1cSzogVp5NpgSPHFYoqe+T2yhHbx80QMV0+GK7KY VC3oB5CiWSeRwY1y2CgOG6mgwyKtI0hEcNQZ0RwMkGUDAeBuFdcrd0h2SrDmvR+KOUOP S9XenEYDeKqnfQjGqzHllWAdmICtznm+veWoRvZrVQKW+T3JXiqLiV1NwevP1v6+89QN iV8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6ozFOSIAxNDx6j0lvpDsRVxxulbjzx13fOOyl5bRbyQ=; b=LJEPOWU0tMybeWCPnCe+P85cwQILVUHAMt23bazq5x73OAeXR45Qc3cZKPSiT76sK5 T+4Xez5BQPuyQ/STGv/xMSdh+l8DwcuiGUPCUG6VWE4DP1BYFXePUWtxAxUVO4glL/Xp 8xZOG3dHDUtM98BazpNnSOoRTx1glxtBHJIgrjSAIrVP4D+vcSlEL2oHkmvTiTI/7Nbd Y8DSNX5gw3gaQUOtJMuXOT0qxrkvA2YyvR0bpCxvRC0T7Q5HWuQr+GkwNHnbzYEbw2Ri JKAbNsFvGEX3D27Zxs8E7Vfdcam8fR0jxXzkhTsYwxvFW6dBK8/hljOv68+287DnW9ae oZOA== X-Gm-Message-State: APjAAAWnZqBOJ47h3lx968GlTtTLjxLfpLIfyo3PQcEIM1LBISzIpJm6 wQMElFhiHMEs4KOouXzkVT/sT1j0BfpT1/gBy7I= X-Google-Smtp-Source: APXvYqyHKw8N52m0BiTnSSl4rKhSGQIiHvhcIl59990xbULfY1L5/ezanDS1ByLQZQQ8A7L8/bY/dhUK//xs5oMntGI= X-Received: by 2002:a67:ce89:: with SMTP id c9mr430811vse.211.1556397350684; Sat, 27 Apr 2019 13:35:50 -0700 (PDT) In-Reply-To: <83lfzvv8kx.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: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:158376 Archived-At: --000000000000378a72058788ff67 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I was wondering if this is a bug in emacs, or in gnome-terminal/terminator, since this doesn=E2=80=99t happen with xterm. And do I think this is a bug = in emacs because while reading the strace output, the write line which causes the bug: =E2=80=9C\33[45d\33[K\33[2d\33[?25l[I\33[44;7H\33[30m=E2=80=9D should contain: =E2=80=9C\33[I=E2=80=9D where in the output it shows: =E2=80=9C[I=E2=80=9D missing the =E2=80=9C\33=E2=80=9D Here I grepped for =E2=80=98write(8,=E2=80=99 in the strace output. What I = did was: rm file2 ; pkill emacs ; strace -f -o file2 /usr/local/bin/emacs -Q =E2=80=93daemon And then from another terminal: emacsclient -t =E2=80=98.emacs/init.el=E2=80=99 Then: x-c x-k And after that run emacsclient -t =E2=80=98.emacs/init.el=E2=80=99 again, knowing this time = the buffer would have focus and won=E2=80=99t get the =E2=80=98[I=E2=80=99 inserted. I=E2=80= =99ve indented the 2 most important lines. han@janis ~ % grep 'write\(8,' file2 16051 write(8, "\33[?1049h\33[22;0;0t\33[?12;25h\33[?1h\33"..., 33) =3D 33 16051 write(8, "\33[>0c", 5) =3D 5 16051 write(8, "\33[?2004h", 8) =3D 8 16051 write(8, "\33[?1004h", 8) =3D 8 16051 write(8, "\33[H\33[2J", 7) =3D 7 16051 write(8, "\33[44d\33[?25l\33[30m\33[48;5;250m-UU-:"..., 207) =3D 207 16051 write(8, "\33[45d\33[?25lWhen done with a buff"..., 164) =3D 164 16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 68) =3D 68 16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 68) =3D 68 16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 229) =3D 229 16051 write(8, =E2=80=9C\33[45d\33[K\33[2d\33[?25l[I\33[44;7H\33[30m=E2= =80=9D=E2=80=A6, 80) =3D 80 16051 write(8, "\33[45;1H\33[?25l\33[38;5;20mKill buff"..., 105) =3D 105 16051 write(8, "\33[45;32H\33[?12l\33[?25h\33[?12;25h", 29) =3D 29 16051 write(8, "\r", 1) =3D 1 16051 write(8, "\33[?25l\33[38;5;20mBuffer init.el m"..., 74) =3D 74 16051 write(8, "\33[?12l\33[?25h\33[?12;25h", 21) =3D 21 16051 write(8, "\33[?25ly\33[?12l\33[?25h\33[?12;25h", 28) =3D 28 16051 write(8, "\r", 1) =3D 1 16051 write(8, "\7", 1) =3D 1 16051 write(8, "\33[?25lPlease answer yes or no.\33["..., 60) =3D 60 16051 write(8, "\33[45;1H\33[?25l\33[38;5;20mBuffer in"..., 81) =3D 81 16051 write(8, "\33[?12l\33[?25h\33[?12;25h", 21) =3D 21 16051 write(8, "\33[?25ly\33[?12l\33[?25h\33[?12;25h", 28) =3D 28 16051 write(8, "\33[?25le\33[?12l\33[?25h\33[?12;25h", 28) =3D 28 16051 write(8, "\33[?25ls\33[?12l\33[?25h\33[?12;25h", 28) =3D 28 16051 write(8, "\r", 1) =3D 1 16051 write(8, "\33[K", 3) =3D 3 16051 write(8, "\33[?1004l\33[?2004l\33[?1l\33>\33[?12l\33[?"..., 61) =3D 6= 1 16051 write(8, "\33[?1049h\33[22;0;0t\33[?12;25h\33[?1h\33"..., 33) =3D 33 16051 write(8, "\33[>0c", 5) =3D 5 16051 write(8, "\33[?2004h", 8) =3D 8 16051 write(8, "\33[?1004h", 8) =3D 8 16051 write(8, "\33[H\33[2J", 7) =3D 7 16051 write(8, "\33[45d\33[?25lWhen done with a buff"..., 74) =3D 74 16051 write(8, "\33[45d\33[?25lWhen done with a buff"..., 164) =3D 164 16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 68) =3D 68 16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 68) =3D 68 16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 229) =3D 229 16051 write(8, =E2=80=9C\33[45d\33[K\33[2d=E2=80=9D, 12) =3D 12 16051 write(8, "\33[45d\33[?25l\33[38;5;20mKill buffer"..., 103) =3D 103 16051 write(8, "\33[45;32H\33[?12l\33[?25h\33[?12;25h", 29) =3D 29 16051 write(8, "\r", 1) =3D 1 16051 write(8, "\33[K", 3) =3D 3 16051 write(8, =E2=80=9C\33[?1004l\33[?2004l\33[?1l\33>\33[?12l\33[?=E2=80= =9D=E2=80=A6, 61) =3D 61 --000000000000378a72058788ff67 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I was wondering if this is a bug in emacs, or in gnome-terminal/termi= nator, since this doesn=E2=80=99t happen with xterm. And do I think this is= a bug in emacs because while reading the strace output, the write line whi= ch causes the bug:
=C2=A0 =C2=A0=E2=80=9C\33[45d\33[K\33[2d\33[?25l[I\33[4= 4;7H\33[30m=E2=80=9D
should contain: =E2=80=9C\33[I=E2=80=9D
where in the= output it shows: =E2=80=9C[I=E2=80=9D
missing the =E2=80=9C\33=E2=80=9D
=
Here I grepped for =E2=80=98write(8,=E2=80=99 in the strace output. W= hat I did was:
=C2=A0=C2=A0rm file2 ; pkill emacs ; strace -f -o file2 /us= r/local/bin/emacs -Q =E2=80=93daemon
And then from another terminal:
=
=C2= =A0 emacsclient -t =E2=80=98.emacs/init.el=E2=80=99
Then: x-c x-k
And aft= er that run
=C2=A0 emacsclient -t =E2=80=98.emacs/init.el=E2=80=99 again, = knowing this time the buffer would have focus and won=E2=80=99t get the =E2= =80=98[I=E2=80=99 inserted. I=E2=80=99ve indented the 2 most important line= s.

han@janis ~ % grep 'write\(8,= 9; file2=C2=A0 =C2=A0=C2=A0
16051 write(8= , "\33[?1049h\33[22;0;0t\33[?12;25h\33[?1h\33"..., 33) =3D 33
16051 write(8, "\33[>0c", 5)=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 5
16051 write(8, "\33[?2004h", 8)=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=3D 8
16051 write(8, "\33[?100= 4h", 8)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D 8
16051 write(8, "\33[H\33[2J", 7)=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =3D 7
16051 write(8, "\33[44d= \33[?25l\33[30m\33[48;5;250m-UU-:"..., 207) =3D 207
16051 write(8, "\33[45d\33[?25lWhen done with a buff&q= uot;..., 164) =3D 164
16051 write(8, &quo= t;\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 68) = =3D 68
16051 write(8, "\n\33[K\n\33[= K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 68) =3D 68
16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\n= \33[K\n\33[K\n\33[K\n\33[K"..., 229) =3D 229
=C2=A0 16051 write(8, =E2=80=9C\33[45d\33[K\33[2d\33[?25l[I\33[44;= 7H\33[30m=E2=80=9D=E2=80=A6, 80) =3D 80
1= 6051 write(8, "\33[45;1H\33[?25l\33[38;5;20mKill buff"..., 105) = =3D 105
16051 write(8, "\33[45;32H\3= 3[?12l\33[?25h\33[?12;25h", 29) =3D 29
16051 write(8, "\r", 1)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0=3D 1
16051 write= (8, "\33[?25l\33[38;5;20mBuffer init.el m"..., 74) =3D 74
16051 write(8, "\33[?12l\33[?25h\33[?12;25h= ", 21) =3D 21
16051 write(8, "\= 33[?25ly\33[?12l\33[?25h\33[?12;25h", 28) =3D 28
16051 write(8, "\r", 1)=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D 1
1= 6051 write(8, "\7", 1)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0=3D 1
16051 write(8, = "\33[?25lPlease answer yes or no.\33["..., 60) =3D 60
16051 write(8, "\33[45;1H\33[?25l\33[38;5;20mBu= ffer in"..., 81) =3D 81
16051 write(= 8, "\33[?12l\33[?25h\33[?12;25h", 21) =3D 21
16051 write(8, "\33[?25ly\33[?12l\33[?25h\33[?12;25h&quo= t;, 28) =3D 28
16051 write(8, "\33[?= 25le\33[?12l\33[?25h\33[?12;25h", 28) =3D 28
16051 write(8, "\33[?25ls\33[?12l\33[?25h\33[?12;25h", 2= 8) =3D 28
16051 write(8, "\r", = 1)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D 1
=
16051 write(8, "\33[K", 3)=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 3
16051 write(8, "\33[?1004l\33[?2004l\33[?1l\33>\33[?12l\33[?&qu= ot;..., 61) =3D 61
16051 write(8, "\= 33[?1049h\33[22;0;0t\33[?12;25h\33[?1h\33"..., 33) =3D 33
16051 write(8, "\33[>0c", 5)=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 5
160= 51 write(8, "\33[?2004h", 8)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D= 8
16051 write(8, "\33[?1004h",= 8)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D 8
16051 write(8, "\33[H\33[2J", 7)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D= 7
16051 write(8, "\33[45d\33[?25lWh= en done with a buff"..., 74) =3D 74
= 16051 write(8, "\33[45d\33[?25lWhen done with a buff"..., 164) = =3D 164
16051 write(8, "\n\33[K\n\33= [K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 68) =3D 68
16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\= n\33[K\n\33[K\n\33[K\n\33[K"..., 68) =3D 68
16051 write(8, "\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\33[K\n\3= 3[K\n\33[K"..., 229) =3D 229
=C2=A0 = 16051 write(8, =E2=80=9C\33[45d\33[K\33[2d=E2=80=9D, 12) =3D 12
16051 write(8, "\33[45d\33[?25l\33[38;5;20mKill= buffer"..., 103) =3D 103
16051 writ= e(8, "\33[45;32H\33[?12l\33[?25h\33[?12;25h", 29) =3D 29
16051 write(8, "\r", 1)=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D 1
16051 write(8, "\33[K", 3)=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =3D 3
16051 writ= e(8, =E2=80=9C\33[?1004l\33[?2004l\33[?1l\33>\33[?12l\33[?=E2=80=9D=E2= =80=A6, 61) =3D 61

=
--000000000000378a72058788ff67--