From unknown Fri Aug 15 20:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16120: grep and tramp Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Dec 2013 11:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16120 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 16120@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.138684834131979 (code B ref -1); Thu, 12 Dec 2013 11:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Dec 2013 11:39:01 +0000 Received: from localhost ([127.0.0.1]:44826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr4bc-0008Ji-PO for submit@debbugs.gnu.org; Thu, 12 Dec 2013 06:39:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55484) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr4bY-0008JX-Px for submit@debbugs.gnu.org; Thu, 12 Dec 2013 06:38:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr4bU-0002cj-0I for submit@debbugs.gnu.org; Thu, 12 Dec 2013 06:38:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr4bT-0002cf-TP for submit@debbugs.gnu.org; Thu, 12 Dec 2013 06:38:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr4bP-0002Kr-4L for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2013 06:38:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr4bK-0002bp-Bx for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2013 06:38:47 -0500 Received: from mail-oa0-x231.google.com ([2607:f8b0:4003:c02::231]:61406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr4bK-0002bl-6d for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2013 06:38:42 -0500 Received: by mail-oa0-f49.google.com with SMTP id i4so268625oah.8 for ; Thu, 12 Dec 2013 03:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=U26bEUQr0B5xIveKwNt6peum5oz1U9Hr/HnVDWkz568=; b=m8XFnUJOQyvDFWge4ojBzMsSFxrdWHF9FLGOj9hH5K56LHcIzIw4B8dwgBFF9NQbJO XiyHCXP9Cy+Hp7mopiuCk4ebVPfXcwR5CYoB8MoVlXpKrsTVDOKvEiYoD8WIn5rKoU81 48w47tZTyeQarMHQVpRmC+nhdyxuDsC3uQ1qRumGtFmkJZC4V/J6ao1kGeS1bTQB5AZZ kdNT7bkr9Kuelzih7HVoHKbGGqcYIQE5gv8WRgf1R9yEwx3WvY+8+t6JKaU9teMaoerk gQot/oiVal2eIO0z4YBSiC/5YRIeDk9Dq+PEopaifbwbc10ehg4Hs+tkddak7PHLAs/v 0rKA== MIME-Version: 1.0 X-Received: by 10.182.135.165 with SMTP id pt5mr117159obb.66.1386848321231; Thu, 12 Dec 2013 03:38:41 -0800 (PST) Received: by 10.182.200.163 with HTTP; Thu, 12 Dec 2013 03:38:41 -0800 (PST) Date: Thu, 12 Dec 2013 14:38:41 +0300 Message-ID: From: Paul Pogonyshev Content-Type: multipart/alternative; boundary=089e0112cb9e8b665a04ed54c90a X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) --089e0112cb9e8b665a04ed54c90a Content-Type: text/plain; charset=UTF-8 Grep over tramp fails to insert header in its output buffer. (I remember reporting this bug, but I didn't notice it was about tramp then; I tried with 'emacs -q' now). For example, run from *scratch*, as 'M-x grep RET grep -nH -e xxx xxx RET': -*- mode: grep; default-directory: "~/" -*- Grep started at Thu Dec 12 14:33:28 grep -nH -e xxx xxx grep: xxx: No such file or directory Grep exited abnormally with code 2 at Thu Dec 12 14:33:28 But when run from a "tramped" buffer ('/sudo:root@localhost', but apparently true for any other case too) in the same way: grep: xxx: No such file or directory Grep exited abnormally with code 2 at Thu Dec 12 14:35:53 Version: GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6) of 2013-12-04 on gonzo.localdomain Paul --089e0112cb9e8b665a04ed54c90a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Grep over tramp fails to insert header in i= ts output buffer. (I remember reporting this bug, but I didn't notice i= t was about tramp then; I tried with 'emacs -q' now).

For example, run from *scratch*, as 'M-x grep RET grep -nH -e xxx xxx R= ET':

=C2=A0=C2=A0=C2=A0 -*- mode: grep; default-directory: "= ;~/" -*-
=C2=A0=C2=A0=C2=A0 Grep started at Thu Dec 12 14:33:28
= =C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0 grep -nH -e xxx xxx
=C2=A0=C2=A0=C2=A0 grep: xxx: No such file or directory

=C2=A0=C2=A0= =C2=A0 Grep exited abnormally with code 2 at Thu Dec 12 14:33:28

But when run from a "tramped" buffer ('/sudo:root@localhos= t', but apparently true for any other case too) in the same way:

=C2=A0=C2=A0=C2=A0 grep: xxx: No such file or directory
=C2=A0=C2=A0= =C2=A0
=C2=A0=C2=A0=C2=A0 Grep exited abnormally with code 2 at Thu Dec= 12 14:35:53

Version: GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu,= GTK+ Version 3.8.6) of 2013-12-04 on gonzo.localdomain

Paul
--089e0112cb9e8b665a04ed54c90a-- From unknown Fri Aug 15 20:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16120: grep and tramp In-Reply-To: Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Dec 2013 14:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16120 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Pogonyshev Cc: 16120@debbugs.gnu.org Received: via spool by 16120-submit@debbugs.gnu.org id=B16120.138685801120067 (code B ref 16120); Thu, 12 Dec 2013 14:21:01 +0000 Received: (at 16120) by debbugs.gnu.org; 12 Dec 2013 14:20:11 +0000 Received: from localhost ([127.0.0.1]:45090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr77a-0005DZ-Qt for submit@debbugs.gnu.org; Thu, 12 Dec 2013 09:20:11 -0500 Received: from mout.gmx.net ([212.227.15.19]:49485) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr77X-0005DQ-RT for 16120@debbugs.gnu.org; Thu, 12 Dec 2013 09:20:08 -0500 Received: from detlef.gmx.de ([87.146.35.48]) by mail.gmx.com (mrgmx102) with ESMTPS (Nemesis) id 0MDn8s-1VmDZg0p5y-00H6GF for <16120@debbugs.gnu.org>; Thu, 12 Dec 2013 15:20:06 +0100 From: Michael Albinus References: Date: Thu, 12 Dec 2013 15:20:03 +0100 Message-ID: <87y53qjgmk.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:8/mloWBuqSFgg89tsHXkYb26gAU2oecTg5NWb8zey+6y9qovgmT L/5mZAN71ObrWQ9673AU0ijtz4YUq6jGCplVGoToFrWvpojtLvZ+DSNzdmtIsr2rkcyVV9U rMnOLE86Lkuwahrsrnd8iitWMvuYsXToF0/gHQMACdhUG20dn4jBQ4cug7tBvcyhxDdNbjK deotkFTh/uc4KuNXe4/zg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) Paul Pogonyshev writes: Hi Paul. > Grep over tramp fails to insert header in its output buffer. (I > remember reporting this bug, but I didn't notice it was about tramp > then; I tried with 'emacs -q' now). I know that behaviour. The reason is, that the current implementation would also include a prompt from the remote machine after that header; it's not easy to suppress it. That's why Tramp hides everything before the grep output. I will take this bug report as encouragement to find a proper solution :-) > Paul Best regards, Michael. From unknown Fri Aug 15 20:28:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Paul Pogonyshev Subject: bug#16120: closed (Re: bug#16120: grep and tramp) Message-ID: References: <871tzdwwp4.fsf@gmx.de> X-Gnu-PR-Message: they-closed 16120 X-Gnu-PR-Package: emacs Reply-To: 16120@debbugs.gnu.org Date: Sat, 08 Feb 2014 13:40:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1391866803-21648-1" This is a multi-part message in MIME format... ------------=_1391866803-21648-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #16120: grep and tramp which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 16120@debbugs.gnu.org. --=20 16120: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16120 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1391866803-21648-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 16120-done) by debbugs.gnu.org; 8 Feb 2014 13:39:15 +0000 Received: from localhost ([127.0.0.1]:56745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WC87m-0005bp-Pv for submit@debbugs.gnu.org; Sat, 08 Feb 2014 08:39:15 -0500 Received: from mout.gmx.net ([212.227.17.21]:49217) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WC87j-0005bf-48 for 16120-done@debbugs.gnu.org; Sat, 08 Feb 2014 08:39:11 -0500 Received: from detlef.gmx.de ([93.209.80.113]) by mail.gmx.com (mrgmx002) with ESMTPS (Nemesis) id 0LdYxu-1VTgUB2za6-00ik2h for <16120-done@debbugs.gnu.org>; Sat, 08 Feb 2014 14:39:10 +0100 From: Michael Albinus To: Paul Pogonyshev Subject: Re: bug#16120: grep and tramp References: <87y53qjgmk.fsf@gmx.de> Date: Sat, 08 Feb 2014 14:39:03 +0100 In-Reply-To: <87y53qjgmk.fsf@gmx.de> (Michael Albinus's message of "Thu, 12 Dec 2013 15:20:03 +0100") Message-ID: <871tzdwwp4.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:aTDI7xiAwEfaJMP6e3GJtkla2Hj8VM/S5A5YgLFqDZpyQPe8kxF rbRhB45mSv8C+V4xX/F4I76eusz/wxaXfHuNR/lKraKDFBlaQ1jWjKXy4jm581Aw30zl9eQ QtrJLvN1/LCFcB3jCZZXBSj2Boq5sdYkLJCr46NHGXpfMika/k7LtHND5b4YZjKtLxOfzLF ZnDlkez+cGjzW/xmwDyGQ== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16120-done Cc: 16120-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) Michael Albinus writes: > Paul Pogonyshev writes: Hi Paul, >> Grep over tramp fails to insert header in its output buffer. (I >> remember reporting this bug, but I didn't notice it was about tramp >> then; I tried with 'emacs -q' now). > > I know that behaviour. The reason is, that the current implementation > would also include a prompt from the remote machine after that header; > it's not easy to suppress it. That's why Tramp hides everything before > the grep output. > > I will take this bug report as encouragement to find a proper solution :-) I've fixed this now, changes committed to the repositories. Closing the bug. >> Paul Best regards, Michael. ------------=_1391866803-21648-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Dec 2013 11:39:01 +0000 Received: from localhost ([127.0.0.1]:44826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr4bc-0008Ji-PO for submit@debbugs.gnu.org; Thu, 12 Dec 2013 06:39:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55484) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr4bY-0008JX-Px for submit@debbugs.gnu.org; Thu, 12 Dec 2013 06:38:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr4bU-0002cj-0I for submit@debbugs.gnu.org; Thu, 12 Dec 2013 06:38:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr4bT-0002cf-TP for submit@debbugs.gnu.org; Thu, 12 Dec 2013 06:38:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr4bP-0002Kr-4L for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2013 06:38:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr4bK-0002bp-Bx for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2013 06:38:47 -0500 Received: from mail-oa0-x231.google.com ([2607:f8b0:4003:c02::231]:61406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr4bK-0002bl-6d for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2013 06:38:42 -0500 Received: by mail-oa0-f49.google.com with SMTP id i4so268625oah.8 for ; Thu, 12 Dec 2013 03:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=U26bEUQr0B5xIveKwNt6peum5oz1U9Hr/HnVDWkz568=; b=m8XFnUJOQyvDFWge4ojBzMsSFxrdWHF9FLGOj9hH5K56LHcIzIw4B8dwgBFF9NQbJO XiyHCXP9Cy+Hp7mopiuCk4ebVPfXcwR5CYoB8MoVlXpKrsTVDOKvEiYoD8WIn5rKoU81 48w47tZTyeQarMHQVpRmC+nhdyxuDsC3uQ1qRumGtFmkJZC4V/J6ao1kGeS1bTQB5AZZ kdNT7bkr9Kuelzih7HVoHKbGGqcYIQE5gv8WRgf1R9yEwx3WvY+8+t6JKaU9teMaoerk gQot/oiVal2eIO0z4YBSiC/5YRIeDk9Dq+PEopaifbwbc10ehg4Hs+tkddak7PHLAs/v 0rKA== MIME-Version: 1.0 X-Received: by 10.182.135.165 with SMTP id pt5mr117159obb.66.1386848321231; Thu, 12 Dec 2013 03:38:41 -0800 (PST) Received: by 10.182.200.163 with HTTP; Thu, 12 Dec 2013 03:38:41 -0800 (PST) Date: Thu, 12 Dec 2013 14:38:41 +0300 Message-ID: Subject: grep and tramp From: Paul Pogonyshev To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=089e0112cb9e8b665a04ed54c90a X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) --089e0112cb9e8b665a04ed54c90a Content-Type: text/plain; charset=UTF-8 Grep over tramp fails to insert header in its output buffer. (I remember reporting this bug, but I didn't notice it was about tramp then; I tried with 'emacs -q' now). For example, run from *scratch*, as 'M-x grep RET grep -nH -e xxx xxx RET': -*- mode: grep; default-directory: "~/" -*- Grep started at Thu Dec 12 14:33:28 grep -nH -e xxx xxx grep: xxx: No such file or directory Grep exited abnormally with code 2 at Thu Dec 12 14:33:28 But when run from a "tramped" buffer ('/sudo:root@localhost', but apparently true for any other case too) in the same way: grep: xxx: No such file or directory Grep exited abnormally with code 2 at Thu Dec 12 14:35:53 Version: GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6) of 2013-12-04 on gonzo.localdomain Paul --089e0112cb9e8b665a04ed54c90a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Grep over tramp fails to insert header in i= ts output buffer. (I remember reporting this bug, but I didn't notice i= t was about tramp then; I tried with 'emacs -q' now).

For example, run from *scratch*, as 'M-x grep RET grep -nH -e xxx xxx R= ET':

=C2=A0=C2=A0=C2=A0 -*- mode: grep; default-directory: "= ;~/" -*-
=C2=A0=C2=A0=C2=A0 Grep started at Thu Dec 12 14:33:28
= =C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0 grep -nH -e xxx xxx
=C2=A0=C2=A0=C2=A0 grep: xxx: No such file or directory

=C2=A0=C2=A0= =C2=A0 Grep exited abnormally with code 2 at Thu Dec 12 14:33:28

But when run from a "tramped" buffer ('/sudo:root@localhos= t', but apparently true for any other case too) in the same way:

=C2=A0=C2=A0=C2=A0 grep: xxx: No such file or directory
=C2=A0=C2=A0= =C2=A0
=C2=A0=C2=A0=C2=A0 Grep exited abnormally with code 2 at Thu Dec= 12 14:35:53

Version: GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu,= GTK+ Version 3.8.6) of 2013-12-04 on gonzo.localdomain

Paul
--089e0112cb9e8b665a04ed54c90a-- ------------=_1391866803-21648-1--