From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.bugs Subject: bug#42136: 26.1.90; rgrep uses a directory that was not actually given Date: Fri, 03 Jul 2020 16:10:54 +0200 Message-ID: <87h7uo7kpd.fsf@turtle-trading.net> References: <877dvo25nt.fsf@riefenstahl-thinkpad.mecom.de> <2b267ca4-7265-9018-1429-c422ced10823@yandex.ru> <87k0zobtsh.fsf@riefenstahl-linux.mecom.de> <87pn9edi3l.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33807"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: Dmitry Gutov , Benjamin Riefenstahl , Stefan Monnier , 42136@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 03 16:12:11 2020 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 1jrMQE-0008fy-9d for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 16:12:10 +0200 Original-Received: from localhost ([::1]:53712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrMQC-0000Gi-OJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 10:12:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrMQ6-0000GP-BE for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 10:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45812) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrMQ6-00044W-26 for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 10:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrMQ5-00074I-TB for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 10:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Benjamin Riefenstahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 14:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42136 X-GNU-PR-Package: emacs Original-Received: via spool by 42136-submit@debbugs.gnu.org id=B42136.159378547527111 (code B ref 42136); Fri, 03 Jul 2020 14:12:01 +0000 Original-Received: (at 42136) by debbugs.gnu.org; 3 Jul 2020 14:11:15 +0000 Original-Received: from localhost ([127.0.0.1]:57358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrMPL-00073D-66 for submit@debbugs.gnu.org; Fri, 03 Jul 2020 10:11:15 -0400 Original-Received: from odoacer.turtle-trading.net ([93.241.193.16]:43287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrMPH-00072x-Rv for 42136@debbugs.gnu.org; Fri, 03 Jul 2020 10:11:14 -0400 Original-Received: from justinian.turtle-trading.net ([192.168.2.118]) by odoacer.turtle-trading.net with esmtp (Exim 4.80) (envelope-from ) id 1jrMP0-0000sx-Hk; Fri, 03 Jul 2020 16:10:54 +0200 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.92) (envelope-from ) id 1jrMP0-0007Ne-ES; Fri, 03 Jul 2020 16:10:54 +0200 In-Reply-To: <87pn9edi3l.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 02 Jul 2020 00:46:06 +0300") 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" Xref: news.gmane.io gmane.emacs.bugs:182665 Archived-At: Hi Juri, Juri Linkov writes: > (advice-add 'read-directory-name :around > (lambda (orig-fun prompt &optional dir default-dirname > mustmatch initial) > (cond > ((equal prompt "Base directory: ") > (funcall orig-fun prompt dir default-dirname > nil initial)) > (t > (funcall orig-fun prompt dir default-dirname > mustmatch initial)))) > '((name . read-directory-name-no-mustmatch))) > > It overrides the MUSTMATCH argument of read-directory-name in rgrep. Thanks for the suggestion. Sadly this seems to make things worse: * emacs -Q (in ~) * Eval your advice. * M-x make-directory RET /tmp/test RET * M-x rgrep RET [...] /tmp/te RET * Result: No confirmation, the search runs in "~" (!) I tried read-directory-name with all variations of MUSTMATCH, and I believe none of them helps me here. I guess I want an additional mode, like 'confirm-automatic-completion, which handles TAB as before, but with RET it would require confirmation before changing the result. benny