From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?=E3=83=8C=E3=82=A8=E3=83=AB=E3=83=A2=E3=83=AA=E3=83=8E?= Newsgroups: gmane.emacs.bugs Subject: bug#28615: 25.3; rgrep, grep-read-files confusingly completes file names Date: Wed, 27 Sep 2017 00:01:56 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1506495806 6054 195.159.176.226 (27 Sep 2017 07:03:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Sep 2017 07:03:26 +0000 (UTC) To: 28615@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 27 09:03:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx6NE-0000ir-Md for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Sep 2017 09:03:12 +0200 Original-Received: from localhost ([::1]:52513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dx6NM-0003La-4G for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Sep 2017 03:03:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dx6N5-0003Ga-9c for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 03:03:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dx6N4-0000qz-DG for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 03:03:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53648) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dx6N4-0000qs-9T for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 03:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dx6N3-00022R-VZ for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 03:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E3=83=8C=E3=82=A8=E3=83=AB=E3=83=A2=E3=83=AA=E3=83=8E?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Sep 2017 07:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28615 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.15064957427784 (code B ref -1); Wed, 27 Sep 2017 07:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Sep 2017 07:02:22 +0000 Original-Received: from localhost ([127.0.0.1]:34096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx6MQ-00021U-3s for submit@debbugs.gnu.org; Wed, 27 Sep 2017 03:02:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx6MM-00021F-Pw for submit@debbugs.gnu.org; Wed, 27 Sep 2017 03:02:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dx6MD-0000Rt-Cw for submit@debbugs.gnu.org; Wed, 27 Sep 2017 03:02:10 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48551) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dx6MD-0000RR-9V for submit@debbugs.gnu.org; Wed, 27 Sep 2017 03:02:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dx6M7-0002b8-Uf for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 03:02:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dx6M3-0000O4-Rx for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 03:02:03 -0400 Original-Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]:52124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dx6M3-0000NU-O6 for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 03:01:59 -0400 Original-Received: by mail-qt0-x235.google.com with SMTP id q4so12692586qtq.8 for ; Wed, 27 Sep 2017 00:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=lVbitRGV5XPLBm463J5JMlw26tmEvC5CSg9isVjNh40=; b=h20fBcF1JOBVZaaIAInHpr2NrJBsZthNw21KPmvRTa9MZDzZ1hzPiQjq26IKOhsqLj pHulhlsZoOfAOOq1xleKyLc70jSQivfPqkZuHW4ckJX1UMuFp1LaYKRgMRHM7VOlmdFS srwTskeTLI2Dr7Dave4cs3CSAjgLXiQ/AszGBLhbf5JmY9XW/69nf3FSJGNqYkjYCKwQ UF8c4CQTOhLGHp8u6HfzXVhzvla4AcdpnoDvWL7wJ9uQ1tOdiFFCxudwlTg03Gsh69AU 84RteS6hAXFh8mtSM+abgJLkIdW5QL3m2PNCEuTqx6BE7Dc/7l5nw7EmSkXvGPzQ6y9+ mj9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=lVbitRGV5XPLBm463J5JMlw26tmEvC5CSg9isVjNh40=; b=qAtfvHPImx/Cb6CYk71PiaklHJl+Kko504Y+qSTdvrVS4q3xiwdOZPXpz5JAY/qbG3 HCGF1ZBLS895N/P8/LJxTEAaVdLlzWzBWDR9CDYICqpUCBNTV1lrPynGopGoZLN1Yspp EzjMtzXpqu1Gk3htTeAg5pbFloZMzf3XnhmScpKMhawzvXHjNPSwGzskHIZrdF8G/or/ IBVkf4W2D0pzLO72lbsae/Xh34oVL2gQiwKNmR7T8M6F7Pmf13NaBEhfwFaurb/tYRRw MsKRuTNQYQYPfg4y5RAZ23OgYEHjZjU6P8HLDa9/34IucL5vLgrY22+RDxqY+PsA6sdM ym7Q== X-Gm-Message-State: AHPjjUh/ZZAXPLVnRBkrzCO5oQ9CpfM3Ak2MRYqRLIUZcrnVW6giJBCy BYZTCwMMEVa2xnxm9dJ5UOqD8lZCcnWqwiJ/yF5qlf+F X-Google-Smtp-Source: AOwi7QBEosJvl93U2vXof1tR0vRtTdmwg2GcqENv/IC8cSn9pWyeV/S2gMWlHXeXkon/Ybbf/VAGj7Dxzu0Dn65J8o4= X-Received: by 10.200.57.83 with SMTP id t19mr520141qtb.150.1506495717477; Wed, 27 Sep 2017 00:01:57 -0700 (PDT) Original-Received: by 10.200.49.212 with HTTP; Wed, 27 Sep 2017 00:01:56 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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" Xref: news.gmane.org gmane.emacs.bugs:137483 Archived-At: rgrep uses grep-read-files to read a filename as the second argument. However, rgrep cannot actually accept a filename as the second argument. For example, this is a normal rgrep call (rgrep "foo" "*.el" "/some/dir/" nil) "*.el" is read with grep-read-files, which uses filename completion. However, actually entering a filename doesn=E2=80=99t really work (rgrep "foo" "foo/*.el" "/some/dir/" nil) (rgrep "foo" "foo/bar.el" "/some/dir/" nil) The second argument is passed to the find program as an -iname argument as a glob, which matches against strictly the filename (e.g., like file-name-nondirectory) and not the path. There are a few points that could be improved here. 1. The grep-read-files prompt is confusing. The prompt is: "Search for \"foo\" in files: ". It is not clear that this is asking for a filename glob. 2. grep-read-files uses filename completion, which suggests that the user should enter a filename. This is very misleading as most paths will fail to work, passing a filename without a slash will likely not work as the user would expect, and almost certainly a glob would be the desired input. In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.19) of 2017-09-16 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.11903000 Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft --with-modules 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protector-str= ong -fno-plt' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'