From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: bug#71078: rgrep accepts wildcard, then throws it away Date: Mon, 20 May 2024 19:48:53 +0800 Message-ID: <877cfowvoa.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24858"; mail-complaints-to="usenet@ciao.gmane.io" To: 71078@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 20 13:50:21 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 1s91X3-0006Fu-1F for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 May 2024 13:50:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s91Wi-0004cE-1N; Mon, 20 May 2024 07:50:00 -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 1s91Wg-0004bo-79 for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 07:49:58 -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 1s91Wf-0007cr-UR for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 07:49:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s91Wk-0003hV-7Q for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 07:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 May 2024 11:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71078 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171620575314190 (code B ref -1); Mon, 20 May 2024 11:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 May 2024 11:49:13 +0000 Original-Received: from localhost ([127.0.0.1]:42245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s91Vx-0003go-BW for submit@debbugs.gnu.org; Mon, 20 May 2024 07:49:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s91Vt-0003gi-2S for submit@debbugs.gnu.org; Mon, 20 May 2024 07:49:11 -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 1s91Vn-0004WG-Bf for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 07:49:03 -0400 Original-Received: from poodle.tulip.relay.mailchannels.net ([23.83.218.249]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s91Vl-0007Y0-L6 for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 07:49:03 -0400 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B4DB0940FB5 for ; Mon, 20 May 2024 11:48:57 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a235.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 594AF9424FC for ; Mon, 20 May 2024 11:48:57 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1716205737; a=rsa-sha256; cv=none; b=Fw3jYukF8orIIDEltBgEZ/XnKW15HWfDHh3Lp3rylyhb3XTm2X0rNDnq+Der8hn2Ygjze3 3PW17+Ik/B61+Wt0Kj8O5Ema0njBRv2HgSo34k3QGC4TAumIKDyPdkaDahtZl/eVsuUwHL J1qkFo6hNci7p/hVK7tWZC6BYzxgnGcSuROPvFqkuU/7FKbae1Elr0dxxjJHV/wyQbi0Wc o9Lsxykn9kziUKFB82Z6M40ab++NA8xe9Ue1Lqwrw09m7wTthK2y6OOv6BKCfSyUhS2pqM yd4WihnboNGEiOfu3j7EmRDnOCWH+P6r987c+95BG9rG1+M+Bcc65xsIqOvlQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1716205737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=MVDrDiqS9FN2KBBVFW5zlK9odCQXR1I7yaa/UglA6uM=; b=WAypORI+FS0+GXEiowezNpUtAHaMmO2dhb2a3KEcLhd3M5vmOVt8kE2AS3KtU409e8GOzJ eJFr2CIisgJ2k3TKWx3YDL8gX/2hy3odKGJo7ctpOSZK0lLKLjW0xdcyTF2DDAKAhMf1HA pa54DgiMgb/ucocjWM3CuNxm0lJognaYrgzCY5f/+H47PfXUEwmz9qINWAUml1iYF5Isyn 7FZy/XdbWMYQMafsdlHfb0Zz+5vxrDgJ4CJF48346rRcqzNkRuGsNV/LS69zpc07ZFmbsa /r0NrbHwdDGmPAAKhwVHzyWAlnWWMcoumy3Or2+dNR9ZKjuBgC3GpRQLJBQlug== ARC-Authentication-Results: i=1; rspamd-5d55749bb4-pwdvj; auth=pass smtp.auth=dreamhost smtp.mailfrom=jidanni@jidanni.org X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Spot-Decisive: 6703ce30201239d4_1716205737580_1764310000 X-MC-Loop-Signature: 1716205737579:3673119419 X-MC-Ingress-Time: 1716205737579 Original-Received: from pdx1-sub0-mail-a235.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.97.253.158 (trex/6.9.2); Mon, 20 May 2024 11:48:57 +0000 Original-Received: from jidanni.org (1-165-194-175.dynamic-ip.hinet.net [1.165.194.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a235.dreamhost.com (Postfix) with ESMTPSA id 4VjbST1j0ZzLZ for ; Mon, 20 May 2024 04:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jidanni.org; s=dreamhost; t=1716205737; bh=MVDrDiqS9FN2KBBVFW5zlK9odCQXR1I7yaa/UglA6uM=; h=From:To:Subject:Date:Content-Type; b=ppprpteqOLwvzWSA+oEfltH503TE2s8ikhhPDA8dtaIt4oFhoJlnH86rnzaRHgGct 6oealRi+VmbIsVq4HkNKyxGekK01epuJPO78Sx89x+qUBGtmuS57/h7oiIyr+0142m HXZaa8NUYxlMsdygBbDp5D5BegX1Sic8NlYDjGnVhUQb7uo5zh/V28RH87pjDnvw06 lh7yxMkFwpEnAgX0n6NrerISiOh4xEltgzdyLs7E/7gXj+Jz+JaDp7eoera7pVS1DG mUeq3olWfz8h/p93GtVU0JKBQyXFfu/Kch5XfQDwz+wYALia3DeNL/J12dU5bRtE/3 bHH9olRWz1ReA== Original-Received: from jidanni by jidanni.org with local (Exim 4.97) (envelope-from ) id 1s91Ve-000000003uC-2lfk for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 19:48:54 +0800 Received-SPF: pass client-ip=23.83.218.249; envelope-from=jidanni@jidanni.org; helo=poodle.tulip.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:285474 Archived-At: When rgrep asks for the Base directory, and the user gives a wildcard, Base directory: /usr/share/doc/exim4* it is thrown away, and this instead gets run: (rgrep "minimaldns" "* .*" "/usr/share/doc/exim4") In fact this is a very special case, as there happens to be a directory with just that name, /usr/share/doc: wildcard exim4* drwxr-xr-x 2 4096 04-13 07:09 exim4-daemon-light drwxr-xr-x 3 4096 04-13 07:09 exim4-base drwxr-xr-x 3 4096 04-13 07:09 exim4-config drwxr-xr-x 2 4096 2023-11-07 exim4-doc-info drwxr-xr-x 3 4096 2023-11-07 exim4-doc-html lrwxrwxrwx 1 10 2016-12-08 exim4 -> exim4-base Normally rgrep won't let the user even proceed if e.g., the user just gave Base directory: /usr/share/doc/exi* but in the case where there is in fact a directory that matches exim4, the "*" gets thrown away! In fact if we do add the * here, (rgrep "minimaldns" "* .*" "/usr/share/doc/exim4*") and do ^X^E, we end up searching ~/ ! emacs-version "29.3"