From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 27 03:02:22 2017 Received: (at submit) by debbugs.gnu.org; 27 Sep 2017 07:02:22 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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 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) MIME-Version: 1.0 Received: by 10.200.49.212 with HTTP; Wed, 27 Sep 2017 00:01:56 -0700 (PDT) From: =?UTF-8?B?44OM44Ko44Or44Oi44Oq44OO?= Date: Wed, 27 Sep 2017 00:01:56 -0700 Message-ID: Subject: 25.3; rgrep, grep-read-files confusingly completes file names To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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-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.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: -4.0 (----) 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' From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 00:15:41 2017 Received: (at 28615) by debbugs.gnu.org; 5 Oct 2017 04:15:41 +0000 Received: from localhost ([127.0.0.1]:49558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzxZV-0000XE-5i for submit@debbugs.gnu.org; Thu, 05 Oct 2017 00:15:41 -0400 Received: from mail-qk0-f174.google.com ([209.85.220.174]:53261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzxZS-0000X0-F9 for 28615@debbugs.gnu.org; Thu, 05 Oct 2017 00:15:40 -0400 Received: by mail-qk0-f174.google.com with SMTP id w63so13575968qkd.10 for <28615@debbugs.gnu.org>; Wed, 04 Oct 2017 21:15:38 -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; bh=azBcd++t+CNO14q+4eoFFSNTfbkrX1STI8jfrtAmNQU=; b=QxB42yITMvuG9SihPhu3HM+37k5Yppcz577MnZJ38wV1qAWapNjp/fRQeHsVnuYoIA 7Jo38aZDRTJGQWoix9YIOQ3MrlwcFF5jVKFkHmf8ooBuEGa8fRipCvwZVDE8eC0p/I+x nssnRKSY9yN6bXWXvjGlX3OTY3uUOAZaLi00Qkq2XgsbIBWdE3Ce+I51NjxToEn0Uwsj NW7XorV5gqcpU/gsHs+oEsapWLgoXz9g2+4MEN3rwrQ1U26H9vwBu2jIxtb0+RX4lzIX jsZfrlMBzYY0kw6s+IDBo7mhQmbp+b/x5kal7gyz9NyMqaYgfkcTxbxml9ovHCga+Au/ sVng== 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; bh=azBcd++t+CNO14q+4eoFFSNTfbkrX1STI8jfrtAmNQU=; b=CjM5WQbmthsckGH7Mokk2UJLj520CbqIcLLb9q+wuAWYFDPjX8iqB70w8haKWIfzx2 n9bOiSO7cbVVaV1rJZQD1YRZg1TB681anvp7EZAklpM8as4ZU0+ANOhLPDBkMGLygbFt dEmwEb5exqewcMSHn5xpXSDevX50yUk0vRRZL7KStRrgQynZUHqIyom99pGJw9aifiZy 5enaiPmjrKWjsnLPxOx1jeXT4X6MMDa6BYg8DkTfcEBIyAyc18ZWUovrScYufMLOD0m0 wP69W0ZOII9hScSaWP9gKDbG0j1MWKHhl3nsu2As4mIJzyd2b8pbc0f1yoxAUsBLzgJi nGSA== X-Gm-Message-State: AMCzsaWy6XcuGzdpCa9lrIFT6kHRFWgLDL0fGjme1b5u54Myg19x0sfO xvDDOnffEJMVKBRSJHL3sj490YsYbvZ/caNSe27U7DuE X-Google-Smtp-Source: AOwi7QCTqBfsiyIjAwXye91KhFqgJfd7rnPGmXo8jUwTeJEj2oZBedvyw0zfS0iQwY78T2s62ZS2l1eLLiPxhfwtBi8= X-Received: by 10.55.77.76 with SMTP id a73mr27485982qkb.196.1507176932724; Wed, 04 Oct 2017 21:15:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.18.195 with HTTP; Wed, 4 Oct 2017 21:15:32 -0700 (PDT) From: Allen Li Date: Wed, 4 Oct 2017 21:15:32 -0700 Message-ID: Subject: [PATCH] Clarify what grep-read-files wants To: 28615@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28615 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.5 (/) grep-read-files wants a filename glob, not a filename/path. * lisp/progmodes/grep.el (grep-read-files): Clarify docstring. Use file aliases for completion. Clarify completing-read prompt. --- lisp/progmodes/grep.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 01bdb04714..0537c76d30 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -903,7 +903,7 @@ grep-read-regexp (read-regexp "Search for" 'grep-tag-default 'grep-regexp-history)) (defun grep-read-files (regexp) - "Read files arg for interactive grep." + "Read filename glob arg for interactive grep." (let* ((bn (or (buffer-file-name) (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name)))) (fn (and bn @@ -936,10 +936,10 @@ grep-read-files (car (car grep-files-aliases)))) (files (completing-read (concat "Search for \"" regexp - "\" in files" + "\" in files matching glob" (if default (concat " (default " default ")")) ": ") - 'read-file-name-internal + grep-files-aliases nil nil nil 'grep-files-history (delete-dups (delq nil (append (list default default-alias default-extension) -- 2.14.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 09:41:49 2017 Received: (at 28615-done) by debbugs.gnu.org; 9 Oct 2017 13:41:49 +0000 Received: from localhost ([127.0.0.1]:57331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1YJZ-0002wV-BP for submit@debbugs.gnu.org; Mon, 09 Oct 2017 09:41:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1YJY-0002wF-0v for 28615-done@debbugs.gnu.org; Mon, 09 Oct 2017 09:41:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1YJO-0007o2-Iw for 28615-done@debbugs.gnu.org; Mon, 09 Oct 2017 09:41:42 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1YJO-0007nk-Fv; Mon, 09 Oct 2017 09:41:38 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4964 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1YJN-0002Rg-R6; Mon, 09 Oct 2017 09:41:38 -0400 Date: Mon, 09 Oct 2017 16:41:23 +0300 Message-Id: <83wp44qvzw.fsf@gnu.org> From: Eli Zaretskii To: Allen Li In-reply-to: (message from Allen Li on Wed, 4 Oct 2017 21:15:32 -0700) Subject: Re: bug#28615: [PATCH] Clarify what grep-read-files wants References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28615-done Cc: 28615-done@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Allen Li > Date: Wed, 4 Oct 2017 21:15:32 -0700 > > grep-read-files wants a filename glob, not a filename/path. > > * lisp/progmodes/grep.el (grep-read-files): Clarify docstring. > Use file aliases for completion. > Clarify completing-read prompt. Thanks, I installed a slightly different change for the first 2 parts, but didn't change the function we pass to completing-read. With that, I'm closing the bug report. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 00:44:09 2017 Received: (at 28615-done) by debbugs.gnu.org; 10 Oct 2017 04:44:09 +0000 Received: from localhost ([127.0.0.1]:58947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1mOn-00014U-3r for submit@debbugs.gnu.org; Tue, 10 Oct 2017 00:44:09 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:36478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1mOj-00013p-Qo for 28615-done@debbugs.gnu.org; Tue, 10 Oct 2017 00:44:06 -0400 Received: by mail-qt0-f193.google.com with SMTP id 24so3642407qts.3 for <28615-done@debbugs.gnu.org>; Mon, 09 Oct 2017 21:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=y4YI/K7cFGMCXToqKdZY8XppmJ6n9WUYXGrqRcjLWpI=; b=AKqB4fKpI8BIBiH7ONzzWRbRQ8MbPxUBTEVMMjI0JZ64Da88JvAUofHZSBN17tyG6n txH8pYDwHTDQ0JaLU8Rv2GaSkpbE4a4BEcg5UWh43gMEiUR0AyGmTN/7Du8L+LJ3L7pX 85x4xlYVoXWvmL3BSAUrlhzqoAhLEO1f3+hM4lTOomx2EP1fjutpl1saX/mZxDX8OUar ju/AIZHKt8sQ//9pqVUSSjXALo6S8k9AG8TUN/0WPBzkB1i+9wJUYe2sZ9C1AH0XThCA 6DpuWGtV9u/ISo8DPNnPjvGOt/AKHJarMVuvO/TX4jwvvwgqEeLDoQnKy1mcmoIT+f9O Ghug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=y4YI/K7cFGMCXToqKdZY8XppmJ6n9WUYXGrqRcjLWpI=; b=GvQnmUGTj02bicTpIdcRciYZNpa9wRZMvpUqj6Kg35OO8ZdqRNHmcTcK9Z0rWP5UNI X84LtUFXllA5jmK0lUV8UM58M+g9HPHBfVTFtqmEdd8jzBvTHK69qNlmXO207k26SL3C 4FAEgp6BWafbWdkda/NRhFTMDpdNy1r0Lenzj1JvxYVfG5xuLHzFfPYtxOBnjLhl1ccc tMXQReciXxC16GrvlfX82uyY+YD5FObaAecAmm34NgGMjXGM88aTVMYnMRSJohh9nDR9 iGICXlj1rxwaUIkICnQyEIL65yyyUFUE6rj3tDMXRzbiVlUl+00l5qKVrca2ZgIaHIes qS8g== X-Gm-Message-State: AMCzsaWnz0MNb8T+fdSIAueJ4/kDALs19769vyU6TyKzyxSQ4Gxc4tek gjGS5vss3m4Z0bjAgOZKgK9X+jZcrWI0k5nzJuM= X-Google-Smtp-Source: AOwi7QAjAMBbARLeldkUrjdV15Kex+M1Y5SEH48ZnS5nX4UFN8Bl2Nu76aGCQIqV0Cq/aimHTZGiwnMYIUz3ilD64AI= X-Received: by 10.55.77.214 with SMTP id a205mr7991546qkb.196.1507610640254; Mon, 09 Oct 2017 21:44:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.18.134 with HTTP; Mon, 9 Oct 2017 21:43:59 -0700 (PDT) In-Reply-To: <83wp44qvzw.fsf@gnu.org> References: <83wp44qvzw.fsf@gnu.org> From: Allen Li Date: Mon, 9 Oct 2017 21:43:59 -0700 Message-ID: Subject: Re: bug#28615: [PATCH] Clarify what grep-read-files wants To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28615-done Cc: 28615-done@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.5 (/) On Mon, Oct 9, 2017 at 6:41 AM, Eli Zaretskii wrote: > > Thanks, I installed a slightly different change for the first 2 parts, > but didn't change the function we pass to completing-read. > > With that, I'm closing the bug report. Why did you not change the collection function? As I noted in the bug, most of the completions that would be provided by read-file-name-internal don't work, and the ones that do work result in running rgrep against a single file. grep-files-aliases seems like a much better choice than read-file-name-internal, given that grep-files-aliases is intended to provide aliases for this very purpose. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 01:55:55 2017 Received: (at 28615) by debbugs.gnu.org; 10 Oct 2017 05:55:55 +0000 Received: from localhost ([127.0.0.1]:58974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1nWF-000334-9K for submit@debbugs.gnu.org; Tue, 10 Oct 2017 01:55:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1nWD-00032r-C5 for 28615@debbugs.gnu.org; Tue, 10 Oct 2017 01:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1nW3-0000J5-Es for 28615@debbugs.gnu.org; Tue, 10 Oct 2017 01:55:48 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1nW3-0000Iz-As; Tue, 10 Oct 2017 01:55:43 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1613 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1nW2-0002Uw-KK; Tue, 10 Oct 2017 01:55:43 -0400 Date: Tue, 10 Oct 2017 08:55:26 +0300 Message-Id: <83k203r1gx.fsf@gnu.org> From: Eli Zaretskii To: Allen Li In-reply-to: (message from Allen Li on Mon, 9 Oct 2017 21:43:59 -0700) Subject: Re: bug#28615: [PATCH] Clarify what grep-read-files wants References: <83wp44qvzw.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28615 Cc: 28615@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Allen Li > Date: Mon, 9 Oct 2017 21:43:59 -0700 > Cc: 28615-done@debbugs.gnu.org > > Why did you not change the collection function? Because there could be a file called literally like one of the shorthands in grep-files-aliases, or whose name includes those shorthands as a substring. > As I noted in the bug, most of the completions that would be > provided by read-file-name-internal don't work IMO, that's okay, because wildcards cannot be meaningfully completed on. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 02:51:57 2017 Received: (at 28615) by debbugs.gnu.org; 10 Oct 2017 06:51:58 +0000 Received: from localhost ([127.0.0.1]:59021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1oOR-0004YX-GM for submit@debbugs.gnu.org; Tue, 10 Oct 2017 02:51:57 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:52788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1oOP-0004YE-Fg for 28615@debbugs.gnu.org; Tue, 10 Oct 2017 02:51:53 -0400 Received: by mail-qt0-f195.google.com with SMTP id o52so48361622qtc.9 for <28615@debbugs.gnu.org>; Mon, 09 Oct 2017 23:51:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KTu7OEm4d2vUyKvqb41edxJv8vzy4MCvAh6EhwXLmz0=; b=ZwU3BBHk7A6IMmdEhYE0+thDl/DuuHntgFK0WkAuYQP4C3upB92tMgGZpe4BcicTKT L4Ak1xO+sp6RjAIU6FQLACeeOV1IWsIOj8aIorvCbG9ncFwr63BsCgTGUNy3zonlsCyC lcob2bLDk6JKPXXjZhdHlXlT65F0CnAUsyNSjWc1iJeFFlo0DUmjUIDjgiXhN4mznQWh Lf4mHqq2oAobvB07MK7Eeg/kkZMEeDweAF/tGe56OcCsWRBiTYSwUVf+4qoMo3O5o12q jZLlEhib6Hotx1AOxPEn+1w+9y3i1STHWOGt1PLADHI9ndQw/Gv5/+zDcKTDv1ZdvnqG cNmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=KTu7OEm4d2vUyKvqb41edxJv8vzy4MCvAh6EhwXLmz0=; b=G9ORz5aWVKipCqdeCXmO1bw+DNYBpo9T4DstClaijtPohl75whi9WeL0GptMqN9rPk wzMc6MkWLQB3AaHMDqJ1V1QdQB1OiOkeA9o8p2qzy6ksJnWW5N0D2C16rh6CzTG1s78F VCD1TjrT+uvCPEfWIAjjVxZiuR7ot9aTiEsGNmtO2mAc/a44COWJWT8hu6Qn4YwFWkul +N/L/nANeExyrC/rDzEosLavgYFZMr7LpPYdNLr6Lt9QvNiOAtPbOcjWjb/xCl4Ry2z3 Y0ibSIbV7IX72YUuWi+Rk/1LzEoJDCa+P84BRUARbzKFFHNE9fejpi1LwG1jrVaKbn8q Gc/A== X-Gm-Message-State: AMCzsaWAREiZoPd8tYMxE89LPVef+IFpRECi7bHpUUy4Mh5IcGuvQYxk B5TXKqfGeYclDllQNkHPEchvVzoQtO+JuPr09hY= X-Google-Smtp-Source: AOwi7QCJPyrVabFzXx7U9q/uMb2N1q9OS+DRouCTQzXxoXY8cktG+PHwxlTaDBB72VDb8X92YpsPOkDiGg7jMqPNFvw= X-Received: by 10.200.2.175 with SMTP id p47mr3674655qtg.242.1507618307999; Mon, 09 Oct 2017 23:51:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.18.134 with HTTP; Mon, 9 Oct 2017 23:51:47 -0700 (PDT) In-Reply-To: <83k203r1gx.fsf@gnu.org> References: <83wp44qvzw.fsf@gnu.org> <83k203r1gx.fsf@gnu.org> From: Allen Li Date: Mon, 9 Oct 2017 23:51:47 -0700 Message-ID: Subject: Re: bug#28615: [PATCH] Clarify what grep-read-files wants To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28615 Cc: 28615@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.5 (/) On Mon, Oct 9, 2017 at 10:55 PM, Eli Zaretskii wrote: >> From: Allen Li >> Date: Mon, 9 Oct 2017 21:43:59 -0700 >> Cc: 28615-done@debbugs.gnu.org >> >> Why did you not change the collection function? > > Because there could be a file called literally like one of the > shorthands in grep-files-aliases, or whose name includes those > shorthands as a substring. Not sure what you mean. There is no use case for completing a file name. Are you saying that a user might mistake the completion on grep-files-aliases as completion on file name? I believe that with the new prompt change, that is unlikely. > >> As I noted in the bug, most of the completions that would be >> provided by read-file-name-internal don't work > > IMO, that's okay, because wildcards cannot be meaningfully completed > on. But the aliases from grep-files-aliases can be meaningfully completed. I don't see why we shouldn't provide meaningful completion if the user defines a lot of aliases, seeing as how the current file name completion is useless. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 03:52:27 2017 Received: (at 28615) by debbugs.gnu.org; 10 Oct 2017 07:52:28 +0000 Received: from localhost ([127.0.0.1]:59067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1pL1-00064N-OM for submit@debbugs.gnu.org; Tue, 10 Oct 2017 03:52:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1pKz-000646-Cx for 28615@debbugs.gnu.org; Tue, 10 Oct 2017 03:52:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1pKq-0004At-Sv for 28615@debbugs.gnu.org; Tue, 10 Oct 2017 03:52:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1pKq-0004Ai-PQ; Tue, 10 Oct 2017 03:52:16 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1800 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1pKp-0000av-S7; Tue, 10 Oct 2017 03:52:16 -0400 Date: Tue, 10 Oct 2017 10:52:01 +0300 Message-Id: <83bmlfqw2m.fsf@gnu.org> From: Eli Zaretskii To: Allen Li In-reply-to: (message from Allen Li on Mon, 9 Oct 2017 23:51:47 -0700) Subject: Re: bug#28615: [PATCH] Clarify what grep-read-files wants References: <83wp44qvzw.fsf@gnu.org> <83k203r1gx.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28615 Cc: 28615@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Allen Li > Date: Mon, 9 Oct 2017 23:51:47 -0700 > Cc: 28615@debbugs.gnu.org > > Are you saying that a user might mistake the completion on > grep-files-aliases as completion on file name? Something like that, yes. In general, I don't think completing on wildcards is useful. > I believe that with the new prompt change, that is unlikely. People don't always read the prompt paying attention to every word of it, and "all" is a valid wildcard anyway. > >> As I noted in the bug, most of the completions that would be > >> provided by read-file-name-internal don't work > > > > IMO, that's okay, because wildcards cannot be meaningfully completed > > on. > > But the aliases from grep-files-aliases can be meaningfully > completed. I don't see why we shouldn't provide meaningful > completion if the user defines a lot of aliases, seeing as how > the current file name completion is useless. I didn't think allowing it to complete on 2 non-file values is important enough to justify the possible confusion. From unknown Sat Jun 21 10:28:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 07 Nov 2017 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator