From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: trentbuck@gmail.com (Trent W. Buck) Newsgroups: gmane.emacs.bugs Subject: bug#18805: 24.3; tramp adds /dev/null, breaks M-x grep Date: Thu, 23 Oct 2014 18:43:16 +1100 Message-ID: <87d29j6xkb.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414050336 9455 80.91.229.3 (23 Oct 2014 07:45:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2014 07:45:36 +0000 (UTC) To: 18805@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 23 09:45:29 2014 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 1XhD5K-0004c6-Jb for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Oct 2014 09:45:26 +0200 Original-Received: from localhost ([::1]:35779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhD5K-0000CC-8j for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Oct 2014 03:45:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhD56-0000BG-E0 for bug-gnu-emacs@gnu.org; Thu, 23 Oct 2014 03:45:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhD4x-0005nv-BP for bug-gnu-emacs@gnu.org; Thu, 23 Oct 2014 03:45:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhD4w-0005na-UR for bug-gnu-emacs@gnu.org; Thu, 23 Oct 2014 03:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XhD4w-0002ZZ-CV for bug-gnu-emacs@gnu.org; Thu, 23 Oct 2014 03:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: trentbuck@gmail.com (Trent W. Buck) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Oct 2014 07:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18805 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14140502429734 (code B ref -1); Thu, 23 Oct 2014 07:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Oct 2014 07:44:02 +0000 Original-Received: from localhost ([127.0.0.1]:60536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XhD3x-0002Wi-3F for submit@debbugs.gnu.org; Thu, 23 Oct 2014 03:44:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42103) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XhD3u-0002WM-93 for submit@debbugs.gnu.org; Thu, 23 Oct 2014 03:43:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhD3g-0005ZY-1s for submit@debbugs.gnu.org; Thu, 23 Oct 2014 03:43:53 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:51159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhD3f-0005ZU-Vc for submit@debbugs.gnu.org; Thu, 23 Oct 2014 03:43:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhD3W-0008PU-Nn for bug-gnu-emacs@gnu.org; Thu, 23 Oct 2014 03:43:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhD3N-0005Wr-Le for bug-gnu-emacs@gnu.org; Thu, 23 Oct 2014 03:43:34 -0400 Original-Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]:56035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhD3N-0005Vu-AU for bug-gnu-emacs@gnu.org; Thu, 23 Oct 2014 03:43:25 -0400 Original-Received: by mail-pa0-f53.google.com with SMTP id kx10so581603pab.40 for ; Thu, 23 Oct 2014 00:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=WXEJ8J7jR4yjMVCmPWxVtdmvlgn2WmxDv666cPIelN8=; b=FPrz2CcspmJghr8KN1upTBXpZCUZpr3H7U7kcMwQUCwi9YetS+hTa6hQ+dDGhv4COy +chEVA0s+nwFR6xoT6cFfqN02pNcrxh0xbw6kA9CFxXou4ijb64AqgqTJd4kzmwIvZ57 saFiH1mBWMrzMMFRR+szEu1G3/Xaxw+yHDZSjFRNcLxoM30QNTe26Rwgxr8GuzepScRV t/DruuhYapziFxe3a2oHDVv77bV7ar+TpuquhtY4ly8ucfmuWitzMbkaiPxo6DnJdy4c 88hdPLO9zgUH9Pt6Ukp+G+RJykj5z6GkhVqHq87gzPedrfjYMAHwsvTle13puOj4MrO4 zBcg== X-Received: by 10.68.213.170 with SMTP id nt10mr179260pbc.149.1414050203372; Thu, 23 Oct 2014 00:43:23 -0700 (PDT) Original-Received: from localhost ([203.7.155.96]) by mx.google.com with ESMTPSA id i2sm917512pat.3.2014.10.23.00.43.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Oct 2014 00:43:22 -0700 (PDT) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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:94973 I routinely do M-x grep, but don't always run grep itself. For example, I might type in find /usr/share/emacs/24.3/lisp/ -name \*.el.gz -exec zgrep -nH -e /dev/null {} + like I did to investigate this issue. The problem I'm having is when *in tramp* I do M-x grep RET git grep -nH foo tramp helpfully appends " /dev/null" to the command, breaking it: fatal: '/dev/null' is outside repository If I change it to M-x grep RET git grep -nH foo # then I get the behaviour I want. This issue *DOES NOT* occur in local directories, only over tramp. IMO it's daft of tramp to assume appending /dev/null will DTRT, since that only holds for trivial commands. If TRAMP is running each command in a sh -c '...' (IIRC it doesn't), prepending "exec