From unknown Fri Jun 20 07:09:01 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#60244 <60244@debbugs.gnu.org> To: bug#60244 <60244@debbugs.gnu.org> Subject: Status: 27.1; term-line-mode works poorly with git progress rewriting Reply-To: bug#60244 <60244@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:09:01 +0000 retitle 60244 27.1; term-line-mode works poorly with git progress rewriting reassign 60244 emacs submitter 60244 "Michael Hoffman" severity 60244 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 21 15:37:29 2022 Received: (at submit) by debbugs.gnu.org; 21 Dec 2022 20:37:29 +0000 Received: from localhost ([127.0.0.1]:53827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p85qC-0004fK-Is for submit@debbugs.gnu.org; Wed, 21 Dec 2022 15:37:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:40978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p85q9-0004fC-Dx for submit@debbugs.gnu.org; Wed, 21 Dec 2022 15:37:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p85q7-0004eQ-Vh for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2022 15:37:25 -0500 Received: from sneak2.sneakemail.com ([64.46.159.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p85q5-0005Hy-At for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2022 15:37:23 -0500 Received: (sneakemail censored 26518-1671655038-943352 #2); 21 Dec 2022 20:37:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=snkmail.com; s=mail; t=1671655039; bh=H765rW2F9NDkcb4HgB6Y01N4WLhBdqoqHR4ZfiT5ypE=; h=Date:From:To:Subject:From; b=zXg1qb9DFUOk2Sa+QSBjox54omymwvxKR+1llPx41tcW9hOSaipkh2h9Hi0hpM5Mu 73TFbIHDov800mrfZohstcDWcLDEQK2YcOQvzT1fusPaxOT0MR/3hp78JjSb+I3sOt pi2dwr1EvQC2zM8b6S2uyq6eXuVgPXUY/kJlXFeeB/zh0FihU8ekqw5AtdftXOyYSE 3efu0vlc9Uc6zig88x/K8j6P5h5cux/T+gV2ECradsaOX7R3NaYb8ruWDb9XC37oTi vGr4vKxxV76j3MudbsAzQULMB6jV6nQafBgZ1IdwwG5eVquQaP8TaAuPU0jeuVClw4 T7tXCmpVhQmtw== Received: (sneakemail censored 26518-1671655038-943352 #1); 21 Dec 2022 20:37:19 -0000 Date: Wed, 21 Dec 2022 20:37:18 +0000 From: "Michael Hoffman" To: bug-gnu-emacs@gnu.org Message-ID: <26518-1671655038-943352@sneakemail.com> Subject: 27.1; term-line-mode works poorly with git progress rewriting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Perl5 Mail::Internet v Received-SPF: pass client-ip=64.46.159.148; envelope-from=emacs-hoffman@snkmail.com; helo=sneak2.sneakemail.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Steps to reproduce:=0D =0D 1. emacs -Q=0D 2. M-x ansi-term RET RET ; run ansi-term with default shell=0D 3. C-c C-j ; term-line-mode=0D 4. git clone https://github.com/github/linguist.git ; needs to be a big e= nough repo for progress rewriting to cause a problem here--very small rep= os don't demonstrate it=0D =0D The output looks like this=0D =0D ```=0D mhoffman@mhoffman2 ~=0D $ git clone https://github.com/github/linguist.git=0D Cloning into 'linguist'...=0D remote: Enumerating objects: 42098, done.=0D remote: Total 42098 (delta 0), reused 0 (delta 0), pack-reused 42098=0D Receiving objects: 100% (42098/42098), 38.14 MiB | 42.50 MiB/s, done.=0D Resolving deltas: 100% (23911/23911), done.=0D =0D mhoffman@mhoffman2 ~=0D $ Resolving deltas: 80% (19129/23911)Resolving deltas: 51% (12195/23911= )Resolving deltas: 50% (11956/23911)Resolving deltas: 49% (11717/23911)= Resolving deltas: 48% (11478/23911)Resolving deltas: 47% (11239/23911)R= esolving deltas: 44% (10521/23911)Resolving deltas: 39% (9326/23911)Res= olving deltas: 30% (7174/23911)Resolving deltas: 18% (4304/23911)Resolv= ing deltas: 11% (2631/23911)Receiving objects: 93% (39152/42098), 14.68= MiB | 29.35 MiB/sReceiving objects: 82% (34521/42098), 14.68 MiB | 29.3= 5 MiB/sReceiving objects: 77% (32416/42098), 14.68 MiB | 29.35 MiB/sRece= iving objects: 70% (29469/42098), 14.68 MiB | 29.35 MiB/sReceiving objec= ts: 54% (22733/42098), 14.68 MiB | 29.35 MiB/sReceiving objects: 46% (1= 9366/42098), 14.68 MiB | 29.35 MiB/sReceiving objects: 45% (18945/42098)= , 14.68 MiB | 29.35 MiB/sReceiving objects: 41% (17261/42098)Receiving o= bjects: 26% (10946/42098)Receiving objects: 22% (9262/42098)Receiving o= bjects: 20% (8420/42098)Receiving objects: 17% (7157/42098)Receiving ob= jects: 16% (6736/42098)Receiving objects: 2% (842/42098)=0D ```=0D =0D Note all the junk that has piled up after the next prompt.=0D =0D Expected final output is more like what occurs in term-char-mode instead:= =0D =0D ```=0D mhoffman@mhoffman2 ~=0D $ git clone https://github.com/github/linguist.git=0D Cloning into 'linguist'...=0D remote: Enumerating objects: 42098, done.=0D remote: Total 42098 (delta 0), reused 0 (delta 0), pack-reused 42098=0D Receiving objects: 100% (42098/42098), 38.12 MiB | 39.04 MiB/s, done.=0D Resolving deltas: 100% (23913/23913), done.=0D =0D mhoffman@mhoffman2 ~=0D $ =0D ```=0D =0D I tried adding the following advice to debug this a bit.=0D =0D ```=0D (defadvice term-emulate-terminal=0D (before dribble-str (proc str) activate)=0D (message "term-emulate-terminal: `%s'" str))=0D =0D (defadvice term-handle-ansi-escape=0D (before dribble-str (proc params char) activate)=0D (message "term-handle-ansi-escape(%s): `%s'" params char))=0D =0D (defadvice term-erase-in-line=0D (before dribble-str (kind) activate)=0D (message "term-erase-in-line: %s" kind))=0D ``=0D =0D Results are below (I have replaced ^M and ^[ characters with the two-char= acter strings):=0D =0D ```=0D term-emulate-terminal: =E2=80=98git clone https://github.com/github/lingu= ist.git^M=0D ^[[?2004l^M=E2=80=99=0D term-handle-ansi-escape((0)): =E2=80=98108=E2=80=99=0D term-emulate-terminal: =E2=80=98Cloning into 'linguist'...^M=0D =E2=80=99=0D term-emulate-terminal: =E2=80=98remote: Enumerating objects: 42098, done.= ^[[K^M=0D =E2=80=99=0D term-handle-ansi-escape((0)): =E2=80=9875=E2=80=99=0D term-erase-in-line: 0=0D term-emulate-terminal: =E2=80=98Receiving objects: 0% (1/42098)^MReceiv= ing objects: 1% (421/42098)^MReceiving objects: 2% (842/42098)^M=E2=80= =99=0D term-emulate-terminal: =E2=80=98Receiving objects: 3% (1263/42098)^MRec= eiving objects: 4% (1684/42098)^MReceiving objects: 5% (2105/42098)^M= Receiving objects: 6% (2526/42098)^MReceiving objects: 7% (2947/42098= )^MReceiving objects: 8% (3368/42098)^MReceiving objects: 9% (3789/42= 098)^MReceiving objects: 10% (4210/42098)^MReceiving objects: 11% (4631= /42098)^MReceiving objects: 12% (5052/42098)^MReceiving objects: 13% (5= 473/42098)^MReceiving objects: 14% (5894/42098)^MReceiving objects: 15%= (6315/42098)^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 16% (6736/42098)^MRec= eiving objects: 17% (7157/42098)^MReceiving objects: 18% (7578/42098)^M= =E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 19% (7999/42098)^M=E2= =80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 20% (8420/42098)^M=E2= =80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 21% (8841/42098)^MRec= eiving objects: 22% (9262/42098)^MReceiving objects: 23% (9683/42098)^M= =E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 24% (10104/42098)^MRe= ceiving objects: 25% (10525/42098)^MReceiving objects: 26% (10946/42098= )^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 27% (11367/42098)^MRe= ceiving objects: 28% (11788/42098)^MReceiving objects: 29% (12209/42098= )^MReceiving objects: 30% (12630/42098)^MReceiving objects: 31% (13051/= 42098)^MReceiving objects: 32% (13472/42098)^MReceiving objects: 33% (1= 3893/42098)^MReceiving objects: 34% (14314/42098)^MReceiving objects: 3= 5% (14735/42098)^MReceiving objects: 36% (15156/42098)^MReceiving object= s: 37% (15577/42098)^MReceiving objects: 38% (15998/42098)^MReceiving o= bjects: 39% (16419/42098)^MReceiving objects: 40% (16840/42098)^MReceiv= ing objects: 41% (17261/42098)^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 42% (17682/42098)^MRe= ceiving objects: 43% (18103/42098)^MReceiving objects: 44% (18524/42098= )^MReceiving objects: 45% (18945/42098), 13.85 MiB | 27.68 MiB/s^M=E2=80= =99=0D term-emulate-terminal: =E2=80=98Receiving objects: 46% (19366/42098), 13= .85 MiB | 27.68 MiB/s^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 47% (19787/42098), 13= .85 MiB | 27.68 MiB/s^MReceiving objects: 48% (20208/42098), 13.85 MiB |= 27.68 MiB/s^MReceiving objects: 49% (20629/42098), 13.85 MiB | 27.68 Mi= B/s^MReceiving objects: 50% (21049/42098), 13.85 MiB | 27.68 MiB/s^MRece= iving objects: 51% (21470/42098), 13.85 MiB | 27.68 MiB/s^MReceiving obj= ects: 52% (21891/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 53= % (22312/42098), 13.85 MiB | 27.68 MiB/s^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 54% (22733/42098), 13= .85 MiB | 27.68 MiB/s^MReceiving objects: 55% (23154/42098), 13.85 MiB |= 27.68 MiB/s^MReceiving objects: 56% (23575/42098), 13.85 MiB | 27.68 Mi= B/s^MReceiving objects: 57% (23996/42098), 13.85 MiB | 27.68 MiB/s^MRece= iving objects: 58% (24417/42098), 13.85 MiB | 27.68 MiB/s^MReceiving obj= ects: 59% (24838/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 60= % (25259/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 61% (25680/= 42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 62% (26101/42098), 1= 3.85 MiB | 27.68 MiB/s^MReceiving objects: 63% (26522/42098), 13.85 MiB = | 27.68 MiB/s^MReceiving objects: 64% (26943/42098), 13.85 MiB | 27.68 M= iB/s^MReceiving objects: 65% (27364/42098), 13.85 MiB | 27.68 MiB/s^MRec= eiving objects: 66% (27785/42098), 13.85 MiB | 27.68 MiB/s^MReceiving ob= jects: 67% (28206/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 6= 8% (28627/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 69% (29048= /42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 70% (29469/42098), = 13.85 MiB | 27.68 MiB/s^MReceiving objects: 71% (29890/42098), 13.85 MiB= | 27.68 MiB/s^MReceiving objects: 72% (30311/42098), 13.85 MiB | 27.68 = MiB/s^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 73% (30732/42098), 13= .85 MiB | 27.68 MiB/s^MReceiving objects: 74% (31153/42098), 13.85 MiB |= 27.68 MiB/s^MReceiving objects: 75% (31574/42098), 13.85 MiB | 27.68 Mi= B/s^MReceiving objects: 76% (31995/42098), 13.85 MiB | 27.68 MiB/s^MRece= iving objects: 77% (32416/42098), 13.85 MiB | 27.68 MiB/s^MReceiving obj= ects: 78% (32837/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 79= % (33258/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 80% (33679/= 42098), 13.85 MiB | 27.68 MiB/s^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 81% (34100/42098), 13= .85 MiB | 27.68 MiB/s^MReceiving objects: 82% (34521/42098), 13.85 MiB |= 27.68 MiB/s^MReceiving objects: 83% (34942/42098), 13.85 MiB | 27.68 Mi= B/s^MReceiving objects: 84% (35363/42098), 13.85 MiB | 27.68 MiB/s^MRece= iving objects: 85% (35784/42098), 13.85 MiB | 27.68 MiB/s^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Receiving objects: 86% (36205/42098), 13= .85 MiB | 27.68 MiB/s^MReceiving objects: 87% (36626/42098), 13.85 MiB |= 27.68 MiB/s^MReceiving objects: 88% (37047/42098), 13.85 MiB | 27.68 Mi= B/s^MReceiving objects: 89% (37468/42098), 13.85 MiB | 27.68 MiB/s^MRece= iving objects: 90% (37889/42098), 13.85 MiB | 27.68 MiB/s^MReceiving obj= ects: 91% (38310/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 92= % (38731/42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 93% (39152/= 42098), 13.85 MiB | 27.68 MiB/s^MReceiving objects: 94% (39573/42098), 1= 3.85 MiB | 27.68 MiB/s^MReceiving objects: 95% (39994/42098), 13.85 MiB = | 27.68 MiB/s^MReceiving objects: 96% (40415/42098), 13.85 MiB | 27.68 M= iB/s^MReceiving objects: 97% (40836/42098), 13.85 MiB | 27.68 MiB/s^MRec= eiving objects: 98% (41257/42098), 13.85 MiB | 27.68 MiB/s^MReceiving ob= jects: 99% (41678/42098), 13.85 MiB | 27.68 MiB/s^Mremote: Total 42098 (= delta 0), reused 0 (delta 0), pack-reused 42098^[[K^M=0D =E2=80=99=0D term-handle-ansi-escape((0)): =E2=80=9875=E2=80=99=0D term-erase-in-line: 0=0D term-emulate-terminal: =E2=80=98Receiving objects: 100% (42098/42098), 13= .85 MiB | 27.68 MiB/s^MReceiving objects: 100% (42098/42098), 38.13 MiB |= 40.67 MiB/s, done.^M=0D Resolving deltas: 0% (0/23915)^MResolving deltas: 1% (240/23915)^MRes= olving deltas: 2% (479/23915)^MResolving deltas: 3% (718/23915)^MReso= lving deltas: 4% (957/23915)^MResolving deltas: 5% (1196/23915)^MReso= lving deltas: 6% (1435/23915)^MResolving deltas: 7% (1675/23915)^MRes= olving deltas: 8% (1914/23915)^MResolving deltas: 9% (2153/23915)^MRe= solving deltas: 10% (2392/23915)^MResolving deltas: 11% (2631/23915)^MR= esolving deltas: 12% (2870/23915)^MResolving deltas: 13% (3109/23915)^M= Resolving deltas: 14% (3349/23915)^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Resolving deltas: 15% (3588/23915)^MReso= lving deltas: 16% (3827/23915)^MResolving deltas: 17% (4066/23915)^MRes= olving deltas: 18% (4305/23915)^MResolving deltas: 19% (4544/23915)^MRe= solving deltas: 20% (4783/23915)^MResolving deltas: 21% (5023/23915)^MR= esolving deltas: 22% (5262/23915)^MResolving deltas: 23% (5501/23915)^M= Resolving deltas: 24% (5740/23915)^MResolving deltas: 25% (5979/23915)^= MResolving deltas: 26% (6218/23915)^MResolving deltas: 27% (6458/23915)= ^MResolving deltas: 28% (6697/23915)^MResolving deltas: 29% (6936/23915= )^MResolving deltas: 30% (7175/23915)^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Resolving deltas: 31% (7414/23915)^MReso= lving deltas: 32% (7653/23915)^MResolving deltas: 33% (7892/23915)^MRes= olving deltas: 34% (8132/23915)^MResolving deltas: 35% (8371/23915)^MRe= solving deltas: 36% (8610/23915)^MResolving deltas: 37% (8849/23915)^MR= esolving deltas: 38% (9088/23915)^MResolving deltas: 39% (9327/23915)^M= Resolving deltas: 40% (9566/23915)^MResolving deltas: 41% (9806/23915)^= MResolving deltas: 42% (10045/23915)^MResolving deltas: 43% (10284/2391= 5)^MResolving deltas: 44% (10523/23915)^MResolving deltas: 45% (10762/2= 3915)^MResolving deltas: 46% (11001/23915)^MResolving deltas: 47% (1124= 1/23915)^MResolving deltas: 48% (11480/23915)^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Resolving deltas: 49% (11719/23915)^M=E2= =80=99=0D term-emulate-terminal: =E2=80=98Resolving deltas: 50% (11958/23915)^M=E2= =80=99=0D term-emulate-terminal: =E2=80=98Resolving deltas: 51% (12197/23915)^M=E2= =80=99=0D term-emulate-terminal: =E2=80=98Resolving deltas: 52% (12436/23915)^MRes= olving deltas: 53% (12675/23915)^MResolving deltas: 54% (12915/23915)^M= Resolving deltas: 55% (13154/23915)^MResolving deltas: 56% (13393/23915= )^MResolving deltas: 57% (13632/23915)^MResolving deltas: 58% (13871/23= 915)^MResolving deltas: 59% (14110/23915)^MResolving deltas: 60% (14349= /23915)^MResolving deltas: 61% (14589/23915)^MResolving deltas: 62% (14= 828/23915)^MResolving deltas: 63% (15067/23915)^MResolving deltas: 64% = (15306/23915)^MResolving deltas: 65% (15545/23915)^MResolving deltas: 6= 6% (15784/23915)^MResolving deltas: 67% (16024/23915)^MResolving deltas:= 68% (16263/23915)^MResolving deltas: 69% (16502/23915)^MResolving delt= as: 70% (16741/23915)^MResolving deltas: 71% (16980/23915)^MResolving d= eltas: 72% (17219/23915)^MResolving deltas: 73% (17458/23915)^MResolvin= g deltas: 74% (17698/23915)^MResolving deltas: 75% (17937/23915)^MResol= ving deltas: 76% (18176/23915)^MResolving deltas: 77% (18415/23915)^MRe= solving deltas: 78% (18654/23915)^MResolving deltas: 79% (18893/23915)^= MResolving deltas: 80% (19132/23915)^M=E2=80=99=0D term-emulate-terminal: =E2=80=98Resolving deltas: 81% (19372/23915)^MRes= olving deltas: 82% (19611/23915)^MResolving deltas: 83% (19850/23915)^M= Resolving deltas: 84% (20089/23915)^MResolving deltas: 85% (20328/23915= )^MResolving deltas: 86% (20567/23915)^MResolving deltas: 87% (20807/23= 915)^MResolving deltas: 88% (21046/23915)^MResolving deltas: 89% (21285= /23915)^MResolving deltas: 90% (21524/23915)^MResolving deltas: 91% (21= 763/23915)^MResolving deltas: 92% (22002/23915)^MResolving deltas: 93% = (22241/23915)^MResolving deltas: 94% (22481/23915)^MResolving deltas: 9= 5% (22720/23915)^MResolving deltas: 96% (22959/23915)^MResolving deltas:= 97% (23198/23915)^MResolving deltas: 98% (23437/23915)^MResolving delt= as: 99% (23676/23915)^MResolving deltas: 100% (23915/23915)^MResolving d= eltas: 100% (23915/23915), done.^M=0D =E2=80=99=0D term-emulate-terminal: =E2=80=98=1A//home/mhoffman^M=0D ^[[?2004h^M^M=0D ^[AnSiTu mhoffman^M=0D ^[AnSiTc ~^M=0D ^[AnSiTh mhoffman2.REDACTED^M=0D ^[[32mmhoffman@mhoffman2 ^[[33m~^[[35m^[[36m^[[0m^M^M=0D $ =E2=80=99=0D term-handle-ansi-escape((0)): =E2=80=98104=E2=80=99=0D term-handle-ansi-escape((32)): =E2=80=98109=E2=80=99=0D term-handle-ansi-escape((33)): =E2=80=98109=E2=80=99=0D term-handle-ansi-escape((35)): =E2=80=98109=E2=80=99=0D term-handle-ansi-escape((36)): =E2=80=98109=E2=80=99=0D term-handle-ansi-escape((0)): =E2=80=98109=E2=80=99=0D Mark set [2 times]=0D ```=0D =0D It looks like the term-termcap-format advertises ^M for the cr capability= which "move[s] the cursor to the beginning of the line it is on" but thi= s doesn't work. https://www.gnu.org/software/termutils/manual/termcap-1.3= /html_mono/termcap.html =0D =0D In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, ca= iro version 1.16.0)=0D of 2022-01-24, modified by Debian built on lgw01-amd64-048=0D Windowing system distributor 'The X.Org Foundation', version 11.0.1210100= 3=0D System Description: Ubuntu 22.04.1 LTS=0D =0D Configured using:=0D 'configure --build x86_64-linux-gnu --prefix=3D/usr=0D --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib=0D --localstatedir=3D/var/lib --infodir=3D/usr/share/info=0D --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes=0D --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/27.1/site-lis= p:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/s= hare/emacs/site-lisp=0D --with-sound=3Dalsa --without-gconf --with-mailutils --build=0D x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib=0D --libexecdir=3D/usr/lib --localstatedir=3D/var/lib=0D --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystem= d=0D --with-pop=3Dyes=0D --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/27.1/site-lis= p:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/s= hare/emacs/site-lisp=0D --with-sound=3Dalsa --without-gconf --with-mailutils --with-cairo=0D --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars=0D 'CFLAGS=3D-g -O2=0D -ffile-prefix-map=3D/build/emacs-NbbgEv/emacs-27.1+1=3D. -fstack-protect= or-strong=0D -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time=0D -D_FORTIFY_SOURCE=3D2' 'LDFLAGS=3D-Wl,-Bsymbolic-functions -Wl,-z,relro'= '=0D =0D Configured features:=0D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY=0D INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF=0D= ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD=0D JSON PDUMPER LCMS2 GMP=0D =0D Important settings:=0D value of $LC_MONETARY: en_US.UTF-8=0D value of $LC_NUMERIC: en_US.UTF-8=0D value of $LC_TIME: en_US.UTF-8=0D value of $LANG: en_US.UTF-8=0D value of $XMODIFIERS: @im=3Dibus=0D locale-coding-system: utf-8-unix=0D =0D Major mode: Term=0D =0D Minor modes in effect:=0D tooltip-mode: t=0D global-eldoc-mode: t=0D electric-indent-mode: t=0D mouse-wheel-mode: t=0D tool-bar-mode: t=0D menu-bar-mode: t=0D file-name-shadow-mode: t=0D global-font-lock-mode: t=0D font-lock-mode: t=0D blink-cursor-mode: t=0D auto-composition-mode: t=0D auto-encryption-mode: t=0D auto-compression-mode: t=0D line-number-mode: t=0D transient-mark-mode: t=0D =0D Load-path shadows:=0D None found.=0D =0D Features:=0D (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs=0D format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config=0D= gnus-util rmail rmail-loaddefs text-property-search seq byte-opt gv=0D bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse=0D rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045=0D ietf-drums mm-util mail-prsvr mail-utils help-mode novice time-date=0D subr-x cl-loaddefs cl-lib term disp-table easymenu comint ansi-color=0D ehelp ring tooltip eldoc electric uniquify ediff-hook vc-hooks=0D lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar=0D= dnd fontset image regexp-opt fringe tabulated-list replace newcomment=0D text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar=0D= rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock=0D syntax facemenu font-core term/tty-colors frame minibuffer cl-generic=0D cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao=0D= korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech=0D european ethiopic indian cyrillic chinese composite charscript charprop=0D= case-table epa-hook jka-cmpr-hook help simple abbrev obarray=0D cl-preloaded nadvice loaddefs button faces cus-face macroexp files=0D text-properties overlay sha1 md5 base64 format env code-pages mule=0D custom widget hashtable-print-readable backquote threads dbusbind=0D inotify lcms2 dynamic-setting system-font-setting font-render-setting=0D cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)=0D= =0D Memory information:=0D ((conses 16 118271 9462)=0D (symbols 48 6851 1)=0D (strings 32 17828 2074)=0D (string-bytes 1 582159)=0D (vectors 16 10720)=0D (vector-slots 8 138689 10086)=0D (floats 8 21 44)=0D (intervals 56 16919 4)=0D (buffers 1000 13))=0D From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 21 16:58:44 2022 Received: (at 60244) by debbugs.gnu.org; 21 Dec 2022 21:58:44 +0000 Received: from localhost ([127.0.0.1]:54171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p876q-0005Xl-AF for submit@debbugs.gnu.org; Wed, 21 Dec 2022 16:58:44 -0500 Received: from sneak2.sneakemail.com ([64.46.159.148]:48692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p876o-0005Xd-6o for 60244@debbugs.gnu.org; Wed, 21 Dec 2022 16:58:42 -0500 Received: (sneakemail censored 26909-1671659920-451215 #2); 21 Dec 2022 21:58:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=snkmail.com; s=mail; t=1671659920; bh=j5aSwJW452KVrXbrPGuaxdC98lBxhTdFCBHj3T0uduY=; h=Date:From:To:Subject:From; b=FCmKgA57GDaLBM2CMxPIoxABvg2kW8uvq+PtcH5q8p7zjHgjJhtYmO063bVVfHoKf z8+FjDFgUFjY1EiRBnd3oyMv+fJTpfIo07u7J1QDxWJyKmLG2zfRxK6WabPqxXSTHZ 6ISA0Pr17w+5RzvpznUtvQuzVDe1NPNS/yF7y0JuhBTGCx5GkAAIz073F4BM/ojCfp u3aSHuR6nwDf+1nIxIrKjsI9p4B9inh7O9fJT438DddFvYB7HF7eGTTxuEnjKzKskV jk6mN0N/cBjnFw27xla8A9b/TJRvG28Gi2P15ut0rqzxmzZivfp7VJyzDWPKZm1MZC sB7z7I/oaGOTg== Received: (sneakemail censored 26909-1671659920-451215 #1); 21 Dec 2022 21:58:40 -0000 Date: Wed, 21 Dec 2022 21:58:40 +0000 From: "Michael Hoffman" To: 60244@debbugs.gnu.org Message-ID: <26909-1671659920-451215@sneakemail.com> Subject: Re: 27.1; term-line-mode works poorly with git progress rewriting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: Perl5 Mail::Internet v X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 60244 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This line of bash is a better minimum example for this that doesn't require going over the network: printf "line %d" 0; for i in {1..500}; do tput cr; printf "line %d" "$i"; done From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 22 01:58:25 2022 Received: (at 60244) by debbugs.gnu.org; 22 Dec 2022 06:58:25 +0000 Received: from localhost ([127.0.0.1]:56524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8FX6-0003DO-Os for submit@debbugs.gnu.org; Thu, 22 Dec 2022 01:58:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8FX4-0003DI-Um for 60244@debbugs.gnu.org; Thu, 22 Dec 2022 01:58:23 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8FWy-0002DB-Cz; Thu, 22 Dec 2022 01:58:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=d+XfyX2QejQYA/nlDgg4yI18J2qixfhxXuNgTkA0dvc=; b=RAlDjht2iSaf QGzFrkV9YMRvYQa9BWGcU/GKs0SBKAUow9D2RmGr0eELfyWTqWqYb9KOOS0EHxk/1V2kWjvkuAXzr ZHIxFhvq+/vE/vlAHKL3mfA6VWdZtFqZES3wYwUlX4WaE4HyVRPA02c01vbKgp2sSnBCUHGLdpmzR BHK0PI/5NJq2YTbAJyh6rlBxN1QB0Pp/bHiPS1OCeibJogy1LAhcRjHkdvMd+yB/04F1jfxSEUz7B 8kRsjBN5xehCgcWclN/agdVUCQCQEF92F2bdaFUKWVXn7nsos5DnfQ2vNVFBXGjy/nE6CbWjieyz2 QOtXoB+1dMbKOb854XtNVA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8FWv-0003Nh-7z; Thu, 22 Dec 2022 01:58:14 -0500 Date: Thu, 22 Dec 2022 08:57:58 +0200 Message-Id: <83cz8c9b7t.fsf@gnu.org> From: Eli Zaretskii To: "Michael Hoffman" , Miha Rihtarsic In-Reply-To: <26909-1671659920-451215@sneakemail.com> (emacs-hoffman@snkmail.com) Subject: Re: bug#60244: 27.1; term-line-mode works poorly with git progress rewriting References: <26518-1671655038-943352@sneakemail.com> <26909-1671659920-451215@sneakemail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60244 Cc: 60244@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 21 Dec 2022 21:58:40 +0000 > From: "Michael Hoffman" > > This line of bash is a better minimum example for this that doesn't require going over the network: > > printf "line %d" 0; for i in {1..500}; do tput cr; printf "line %d" "$i"; done Funny thing is, "M-x term" does produce the expected results, and I cannot find what makes "M-x ansi-term" behave differently, as it's supposed to be almist the same as "M-x term". Miha, could you perhaps look into this issue? From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 24 10:01:41 2022 Received: (at 60244) by debbugs.gnu.org; 24 Dec 2022 15:01:42 +0000 Received: from localhost ([127.0.0.1]:46928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p961t-00065J-HF for submit@debbugs.gnu.org; Sat, 24 Dec 2022 10:01:41 -0500 Received: from kamnitnik.top ([209.250.245.214]:46028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p961r-000657-BR for 60244@debbugs.gnu.org; Sat, 24 Dec 2022 10:01:40 -0500 From: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1671894098; bh=+gX/xT29XTdF6br94JnYmsxOvccTaY9ceciSvoGBbIE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=iEbp9/U3K9qWsFvzel0wDATX1GUHt1buTblI4wdLRkRGfLemeggYVoxbTZdvfjVne sWs2vA7C/qoSpyuuiOhVIrooP1Np0z/2U4sIDrfkjAXAD5/0PjL9OdL/IKvspcSIjH 1LqPyulY5HFhgJ4/QiAxghRWxZf/q+13PGjmt2DOes9tNPCA3aEPGtqxkaHf3qDy2m wxfDabCH4ze6RpXi0a/1ZjlP/yl8NrifPB6lmdTL9Z8bRiCJPem4k1w5jdT8PfoR65 i6V/0e2/ysX2v5p1NLBgV8Got8Dwn9DJ3hQ76l58cma/18dbcQtdRdMCGQ00M5BKDu KqBLJPT+nWW1A== To: Eli Zaretskii , Michael Hoffman Subject: Re: bug#60244: 27.1; term-line-mode works poorly with git progress rewriting In-Reply-To: <83cz8c9b7t.fsf@gnu.org> References: <26518-1671655038-943352@sneakemail.com> <26909-1671659920-451215@sneakemail.com> <83cz8c9b7t.fsf@gnu.org> Date: Sat, 24 Dec 2022 16:02:01 +0100 Message-ID: <87ili07sly.fsf@miha-pc> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60244 Cc: 60244@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> Date: Wed, 21 Dec 2022 21:58:40 +0000 >> From: "Michael Hoffman" >>=20 >> This line of bash is a better minimum example for this that doesn't requ= ire going over the network: >>=20 >> printf "line %d" 0; for i in {1..500}; do tput cr; printf "line %d" "$i"= ; done > > Funny thing is, "M-x term" does produce the expected results, and I > cannot find what makes "M-x ansi-term" behave differently, as it's > supposed to be almist the same as "M-x term". > > Miha, could you perhaps look into this issue? A more reliable example would be this bash line: printf 'foo \015'; sleep 2; printf 'bar' In char mode, it writes foo and overwrites it with bar, which is expected. But in line mode, it pushes foo after the process mark. I could reproduce the issue in both M-x term and M-x ansi-term. The issue happens due this code in function term-emulate-terminal: ;; If the buffer is in line mode, and there is a partial ;; input line, save the line (by narrowing to leave it ;; outside the restriction ) until we're done with output. (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) The idea is to let the user edit his partial input during a long-running command. But term.el assumes that, in line mode, all text after process mark is user input, it doesn't distinguish between actual user input and process output that happens to be behind process mark. This is also the reason why a lot of full-screen TUI programs such as "htop" don't work correctly in line mode even if they do in char mode. Two possible ideas to solve this: =2D Introduce a new marker to separate user input from process output. =2D Use text properties to distinguish user input from process output. This is what comint.el does, it marks process output with 'field' =3D 'output'. Hope this helps. Unfortunately I can't promise to be able work on any solution at the moment. Best regards. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmOnFGkTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP4XyD/sHECWkomlmiIC9ppRbpqfRlmaoPHfl WSuX58D+YvY8loJcS0mdnPpms0G1p7p/4LvZPQXbEf2gh/N7yxZMrihuSCGSaM/n 5vmQfiP5SWjsGlLCGsQrusfR8rmP4Siauuiz1gMh/aQApW04ve/g2OYr0TgmCLGY 0SuTCjwty94W3BisBrYb3HIHtAdWjp42V5U3rAOBAfsmXGhZhPACMgiitR+6wmR2 ZSxLgXovaIMbmTe3lgB6ZWDkeBaIGZ6IbAqf5886Rnr833qEe8chKWoK0eI79+x6 ryf+wSawolwMZjquqMWtSDhZz0o5VWq9gL/RHSWd4VwMYyBccKqCkqGe0fioXOW7 i3A2nd3kJ5IT+jKD5VqFUhfXOpRX4NdEHUxo5hVCwCH/urmwdXpzfuvFFwJi7Unj uYw/Qz/ZeVXTAV72gSI+9sxrutCUgJxKD+zvARIHvG/JfA+pAQ9LPW8SKCoAv4sL xyzosC/TIuJtSnHkJPB+hWVFHtAW2uGnXLY6Z4+aaDM+aoalM+U6n2LHeRboXDVp grUxlihpSlqWe3nNC0agUSNiQnxf9IP8Ze7VgWOnTk8pFuvYAQZlMUnA+k+jAeEu rONPuyq1AIFxQJXpxlu208v/N7Z/smHIR/2Eq+lvpQ2lhoi5pPNSi99V8l2AmIrx MRLB2iO4x1ge8Q== =2lpg -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 24 10:40:52 2022 Received: (at 60244) by debbugs.gnu.org; 24 Dec 2022 15:40:52 +0000 Received: from localhost ([127.0.0.1]:46948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p96dl-0007JW-4d for submit@debbugs.gnu.org; Sat, 24 Dec 2022 10:40:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p96dj-0007JC-Sd for 60244@debbugs.gnu.org; Sat, 24 Dec 2022 10:40:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p96dd-0001Xm-Py; Sat, 24 Dec 2022 10:40:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6jCUXUIeu0GJDEOWn7Kpe+tfsSef033MCTHAyCNr52k=; b=R+Jbh41jU6nM 6IvLpurcznbfuEINGQ3KdpO220WofKDaKOuDmG5e5QrA+KbxEaPcHIoAd6XZwh+Z8X/cYs9W67KUH Ocw+lUkmg6bb1hV8WbPnf5Qu5SEr8lbbZ5cqv8dE0ZdlEyIRaACegUIrx4Y/JL1OKpLQBRT+nUqnv cv3FnAcMSxhorm9/Kxv4V70m1KGTQ5qwVGytSARsxC0PPrTY2PbKb3oHXR4gtzNKeOErFEl6NG1iQ 0oa2xi/c09U1o+d5pe5//SgwSlskmgDRbiPCNWQw/3/GWkiJnsAyNHkCFvkMunanLRDbwJ3qfkdIu GHrqUqWiBEJBuU+cA1ZSPA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p96dd-0003IZ-AG; Sat, 24 Dec 2022 10:40:41 -0500 Date: Sat, 24 Dec 2022 17:40:40 +0200 Message-Id: <8335946c93.fsf@gnu.org> From: Eli Zaretskii To: In-Reply-To: <87ili07sly.fsf@miha-pc> Subject: Re: bug#60244: 27.1; term-line-mode works poorly with git progress rewriting References: <26518-1671655038-943352@sneakemail.com> <26909-1671659920-451215@sneakemail.com> <83cz8c9b7t.fsf@gnu.org> <87ili07sly.fsf@miha-pc> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60244 Cc: emacs-hoffman@snkmail.com, 60244@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: > Cc: 60244@debbugs.gnu.org > Date: Sat, 24 Dec 2022 16:02:01 +0100 > > A more reliable example would be this bash line: > > printf 'foo \015'; sleep 2; printf 'bar' > > In char mode, it writes foo and overwrites it with bar, which is > expected. But in line mode, it pushes foo after the process mark. I > could reproduce the issue in both M-x term and M-x ansi-term. The issue > happens due this code in function term-emulate-terminal: > > ;; If the buffer is in line mode, and there is a partial > ;; input line, save the line (by narrowing to leave it > ;; outside the restriction ) until we're done with output. > (when (and (> (point-max) (process-mark proc)) > (term-in-line-mode)) > (narrow-to-region (point-min) (process-mark proc))) > > The idea is to let the user edit his partial input during a long-running > command. But term.el assumes that, in line mode, all text after process > mark is user input, it doesn't distinguish between actual user input and > process output that happens to be behind process mark. > > This is also the reason why a lot of full-screen TUI programs such as > "htop" don't work correctly in line mode even if they do in char mode. > > Two possible ideas to solve this: > > - Introduce a new marker to separate user input from process output. > > - Use text properties to distinguish user input from process output. > This is what comint.el does, it marks process output with 'field' = > 'output'. > > Hope this helps. Unfortunately I can't promise to be able work on any > solution at the moment. Thanks for the analysis. This is AFAIU an old issue, so fixing it is not urgent. I hope Someone(TM) will implement one of your solutions at some point. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 12:33:50 2023 Received: (at 60244) by debbugs.gnu.org; 9 Jan 2023 17:33:50 +0000 Received: from localhost ([127.0.0.1]:38087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEw1t-0004AX-VP for submit@debbugs.gnu.org; Mon, 09 Jan 2023 12:33:50 -0500 Received: from sneak2.sneakemail.com ([64.46.159.148]:55498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEw1s-0004AQ-Iv for 60244@debbugs.gnu.org; Mon, 09 Jan 2023 12:33:49 -0500 Received: (sneakemail censored 19422-1673285626-849750 #2); 9 Jan 2023 17:33:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=snkmail.com; s=mail; t=1673285627; bh=HpUND+N6q+KNtzqIMN1CY3ettY6sDs8VeqFQtRoqCEk=; h=References:In-Reply-To:From:Date:Subject:To:From; b=X2W6WSPlwA/kF06V2Y3pK9P8VGw1LPowbiOlq33Jz4lwvE0Hi7bcOui8Yis9jcKb1 LIyZvqNderktYOUTbruTnOel3iQP1EmzEvdcE7dQxxPHVFTgIiuInGSfwj9ol0r754 EnXmGwPOJ/a7aAoLrUfn135ojfO14kWAbiMD9wI94Y9hLNW0nIVZaZJaUf6HpQMRlY kLjWWu6cZLDtGTNsIDvfVKdmWnZIkMXpd7U7WFDaNnSIOcfpfKq2N0gQkABBueNa5I 0QBfD+uBSfkfPDZvQ8l7MPLAxCfRlN4RTDvg2D/YF74iVaTz2HHFkbLATGZ41rdJe1 /pegJeFVOQ9Vw== Received: (sneakemail censored 19422-1673285626-849750 #1); 9 Jan 2023 17:33:47 -0000 MIME-Version: 1.0 References: <26518-1671655038-943352@sneakemail.com> <26909-1671659920-451215@sneakemail.com> <83cz8c9b7t.fsf@gnu.org> <87ili07sly.fsf@miha-pc> In-Reply-To: <87ili07sly.fsf@miha-pc> From: "Michael Hoffman" Date: Mon, 9 Jan 2023 12:33:34 -0500 Message-ID: <19422-1673285626-849750@sneakemail.com> Subject: Re: bug#60244: 27.1; term-line-mode works poorly with git progress rewriting To: 60244@debbugs.gnu.org Content-Type: multipart/alternative; boundary="00000000000053ff2b05f1d82b7b" X-Mailer: Perl5 Mail::Internet v X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 60244 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --00000000000053ff2b05f1d82b7b Content-Type: text/plain; charset="UTF-8" Thanks so much for looking into this. On Sat, Dec 24, 2022 at 10:01 AM miha wrote: > Two possible ideas to solve this: > > - Introduce a new marker to separate user input from process output. > > - Use text properties to distinguish user input from process output. > This is what comint.el does, it marks process output with 'field' = > 'output'. > Is one of these options preferred? The second idea sounds more robust, and also it is nice that the example of comint.el exists for it. But perhaps I am naive about what they require. --00000000000053ff2b05f1d82b7b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks so much for looking into this.

On Sat, Dec 24= , 2022 at 10:01 AM miha wrote:
Two possible ideas to solve this:

- Introduce a new marker to separate user input from process output.

- Use text properties to distinguish user input from process output.
=C2=A0 This is what comint.el does, it marks process output with 'field= ' =3D
=C2=A0 'output'.

Is one of thes= e options preferred? The second idea sounds more robust, and also it is nic= e that the example of comint.el exists for it. But perhaps I am naive about= what they require.
--00000000000053ff2b05f1d82b7b-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 13:24:32 2023 Received: (at 60244) by debbugs.gnu.org; 9 Jan 2023 18:24:32 +0000 Received: from localhost ([127.0.0.1]:38141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEwoy-0005TC-9u for submit@debbugs.gnu.org; Mon, 09 Jan 2023 13:24:32 -0500 Received: from kamnitnik.top ([209.250.245.214]:44494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEwov-0005T1-Td for 60244@debbugs.gnu.org; Mon, 09 Jan 2023 13:24:30 -0500 From: miha@kamnitnik.top DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1673288665; bh=Asj/v0UYS/LIpPkAksMnZuERLXKvv5JhBHHWzqk/xn0=; h=From:To:Subject:In-Reply-To:References:Date:From; b=cTxivVueO4xH2bW0nefenCk8SowVNAkqozcqMzxpVKUJtUa2II+sl1dwhN/tACopb qtxQxjSZ1dMPUJHhWEyxmAPXoqXn9ljRJcOHd6Cik8wSAgG+HIF04olXBRnEcMYF6d 4luVxokzRgM/PXD7HQ34yQ3djQmTzLC+Ci9dG0utHe1zJzzRW6OvIHuSsPi/4N/Bwo XNBxG6u+UIYIHGqXHzw/ZwmxXjLzzmKargSgfOGzuaFYWabFq1D/hl8biGMXUhNEHo bU845II0vY1qOTJptjQnfLmjabRRKAIRukaSUgAnFc+PWkpDUFQ/sXzdOcWvW++89K 594hvY7WpBBTA== To: Michael Hoffman , 60244@debbugs.gnu.org Subject: Re: bug#60244: 27.1; term-line-mode works poorly with git progress rewriting In-Reply-To: <19422-1673285626-849750@sneakemail.com> References: <26518-1671655038-943352@sneakemail.com> <26909-1671659920-451215@sneakemail.com> <83cz8c9b7t.fsf@gnu.org> <87ili07sly.fsf@miha-pc> <19422-1673285626-849750@sneakemail.com> Date: Mon, 09 Jan 2023 19:27:05 +0100 Message-ID: <87eds3a7ie.fsf@miha-pc> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60244 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain "Michael Hoffman" writes: > Thanks so much for looking into this. > > On Sat, Dec 24, 2022 at 10:01 AM miha wrote: > > Two possible ideas to solve this: > > - Introduce a new marker to separate user input from process output. > > - Use text properties to distinguish user input from process output. > This is what comint.el does, it marks process output with 'field' = > 'output'. > > Is one of these options preferred? The second idea sounds more robust, and also it is nice that the example of comint.el > exists for it. But perhaps I am naive about what they require. I prefer the second option. While it is probably more work to implement than the first one, it opens up possibilities of more robust input navigation and multi-line input editing in term-line-mode, just like in comint.el with 'comint-use-prompt-regexp' = nil. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmO8XHkTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP2ghD/0c62prW59vZhAxoogm+hycTDaGcEuI tCDS90VQzBRwzE8AnLWh4bRQrBXJp+dLQBSmUbSwtDuWIIMvC3XAT9e+3mdgHSFP futu3tG+ppPITYG8Ya2n/HEs4DfQhNZoC79VQ60fpNzanSmM00M+JUmsySjJQVuU p0hV3urQbwWqumFCxJwmLZXnRxo6NA7E739hs4qn6YwxnueQjx0KPQ/yTmZaO6D8 ZN0a5MxU4MrKx+D7CUGJSUebFnl65X+dZkTBSckKVkhaJMvvUIt03O/tK8FSmzxK zir8zFqRgQgV8VO9pYaHzZyFAx93qUKXJJMRcU+qd/8uHPQNkp4seSciwjeMRMT/ xxn0kWo7q6ZfH8HqJ9RIpeQtNgYDazDnVfCqNRjdAbkKyE1zwAjkdgcrGf2U9p9j 6ulaJmGL/z2iVM+/P6de9i0WyvRD93NNsV/9c8vHfeKfdPq1erU4su076IwVfbw/ 2117RpdXqxK3yq68I5FlmUrj8vrPJq+v5GyGBWai/wKoej6ZboAZ9GSaNUHATwV5 1gMFuTpvOm2LKzG64ORLkdRjGSD3w5wR0p/ohXSa+YAoHrbT+Xb7hwmA9VujQHlH YS8LBfWfZ8jt0Wr2FZsbnL/zgsBOz/G3M0TE+bW411hjmZpD5cK/Iy/W8X4XCfD6 oiDzK20SrrfMwA== =0ASX -----END PGP SIGNATURE----- --=-=-=--