From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71078: rgrep accepts wildcard, then throws it away Date: Tue, 21 May 2024 11:30:59 -0400 Message-ID: References: <877cfowvoa.5.fsf@jidanni.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37346"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Stefan Monnier , 71078@debbugs.gnu.org, Dan Jacobson To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 21 17:32:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s9RTQ-0009T9-9j for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 May 2024 17:32:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9RT9-0008PH-2w; Tue, 21 May 2024 11:32:03 -0400 Original-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 1s9RT3-0008OG-Cx for bug-gnu-emacs@gnu.org; Tue, 21 May 2024 11:31:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9RT3-0004AS-5N for bug-gnu-emacs@gnu.org; Tue, 21 May 2024 11:31:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s9RT8-0008MC-7n for bug-gnu-emacs@gnu.org; Tue, 21 May 2024 11:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 May 2024 15:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71078 X-GNU-PR-Package: emacs Original-Received: via spool by 71078-submit@debbugs.gnu.org id=B71078.171630548731995 (code B ref 71078); Tue, 21 May 2024 15:32:02 +0000 Original-Received: (at 71078) by debbugs.gnu.org; 21 May 2024 15:31:27 +0000 Original-Received: from localhost ([127.0.0.1]:49683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9RSZ-0008Jx-0L for submit@debbugs.gnu.org; Tue, 21 May 2024 11:31:27 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9RSW-0008JR-2k for 71078@debbugs.gnu.org; Tue, 21 May 2024 11:31:25 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 953EC444185; Tue, 21 May 2024 11:31:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1716305471; bh=SMF2VtOHqJ2qDm6wvCo3Ff3cBNPPP07g+FWLyYgSZf0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Qlm2Xf7n+eEnqbgNuGHc8r2P4niYE5jrwSZe9iopJeeIBNIh+GLajbfwOOjddMgwj IZ8DqRE41DLhIc4OSfI/d0F7PL75iIDUS2QgE5n2yexL+iUnPjGYRpkgOHL7HyonJt XtbLxjipvHVzjQ1WU6Ee59Ix6E95p2NxttlXIy34DHOuUil1ll3HhYSqPmTR+bcZhk AnGTz/iFVr3oGyfCWBkGac8FUkfs6DRnTG1a1UQNeZa6D7EOPicHFFu/dFId/hj08G OxvEJ2LdKQNbHtp7d7EXRnG3++NtCiiYz5+QJN+CbFTwaR8MCTLAdarfhp+vQ7r6ie /7R40W+2i/qfQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1E504441FFC; Tue, 21 May 2024 11:31:11 -0400 (EDT) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0CB0F12034F; Tue, 21 May 2024 11:31:11 -0400 (EDT) In-Reply-To: (Stefan Kangas's message of "Mon, 20 May 2024 17:26:08 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285539 Archived-At: > (read-directory-name "Base directory: " > nil default-directory t) > > If I give an input like "/tmp* RET" at the prompt, it returns "/tmp/". > > What's confusing to me is this part in the docstring of > `read-directory-name': > > Fourth arg MUSTMATCH non-nil means require existing directory=E2=80= =99s name. > Non-nil and non-t means also require confirmation after completion. > > I think "require existing directory=E2=80=99s name" should be clarified t= o say: > "require the user to input an existing directory's name", if that is > indeed the intention here. That's indeed the intention (and the way I read it, that's what it says). > That it removes the "*" character seems to be undocumented, but if > that's the intended behaviour perhaps it should be clarified too. Hmm. It does not remove the *. What you're seeing is the effect of completion (and `partial-completion` treats the * as a wildcard for completion purposes) so you can also just type `/tm` and it should return the same thing (provided `/tmp/` is the sole completion). > I think this is expected, and not a bug, due to this part in grep.el: > > (unless (and dir (file-accessible-directory-p dir)) > (setq dir default-directory)) > > I'd rather it would signal an error in this case, to be honest, because Agreed. The above can only make sense when `dir` doesn't matter. Stefan