From unknown Tue Jun 17 01:27:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#42136 <42136@debbugs.gnu.org> To: bug#42136 <42136@debbugs.gnu.org> Subject: Status: 26.1.90; rgrep uses a directory that was not actually given Reply-To: bug#42136 <42136@debbugs.gnu.org> Date: Tue, 17 Jun 2025 08:27:35 +0000 retitle 42136 26.1.90; rgrep uses a directory that was not actually given reassign 42136 emacs submitter 42136 Benjamin Riefenstahl severity 42136 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 30 07:07:51 2020 Received: (at submit) by debbugs.gnu.org; 30 Jun 2020 11:07:51 +0000 Received: from localhost ([127.0.0.1]:50317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqE7C-0004Au-TZ for submit@debbugs.gnu.org; Tue, 30 Jun 2020 07:07:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:35788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqE7A-0004Am-MQ for submit@debbugs.gnu.org; Tue, 30 Jun 2020 07:07:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqE7A-0003fd-IK for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 07:07:48 -0400 Received: from smtp-dmz2.mecom.de ([194.213.98.85]:41739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqE77-0006qK-BG for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 07:07:47 -0400 Received: from [192.168.226.245] (helo=exchange-cas2.mecom.de) by smtp-dmz2.mecom.de with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jqDln-0003TF-On for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 12:45:43 +0200 Received: from riefenstahl-thinkpad.mecom.de.mecom.de (192.168.227.249) by EXCHANGE-CAS.mecom.de (192.168.226.243) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 12:45:39 +0200 From: Benjamin Riefenstahl To: Subject: 26.1.90; rgrep uses a directory that was not actually given Date: Tue, 30 Jun 2020 12:45:42 +0200 Message-ID: <877dvo25nt.fsf@riefenstahl-thinkpad.mecom.de> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.227.249] Received-SPF: pass client-ip=194.213.98.85; envelope-from=Riefenstahl@mecom.de; helo=smtp-dmz2.mecom.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/30 06:45:44 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.4 (-) 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: -2.4 (--) Receipe: * M-x make-directory RET "/tmp/cds_config" RET * rgrep RET abc RET * RET /tmp/cds_c RET Observed: rgrep searches in "/tmp/cds_config". Expected: Error message that the directory "/tmp/cds_c" does not exist. Alternatively a comfirmation question about the completion. ---- Long form of the use case: I have two projects with similar names "cds_c" and "cds_config". On some of my machines both are checked out side-by-side, on some only one of them is. Today I called rgrep and gave ".../cds_c" as input for the directory. rgrep actually searched in ".../cds_config". I only later discovered that that was what happened, initially I thought my pattern was just not found in my project "cds_c". I would have expected that rgrep would complain that the directory does not exist, either during input or later, instead of silently completing the directory name. The directory name that was searched is of course in the grep buffer, but the grep buffer looks like this: --------- -*- mode: grep; default-directory: "/tmp/cds_config/" -*- Grep started at Tue Jun 30 12:25:32 find . -type d \( -path \*/CVS -o -path \*/.svn -o -path \*/\{arch\} -o -path \*/.hg -o -path \*/_darcs -o -path \*/.git -o -path \*/.bzr -o -path \*/.metadata -o -path \*/.metadata.old -o -path \*/maven-targets -o -path \*/build -o -path \*/target -o -path \*/projekktor -o -path \*/node_modules \) -prune -o \! -type d \( -name .\#\* -o -name \*.cmti -o -name \*.cmt -o -name \*.annot -o -name \*.cmi -o -name \*.cmxa -o -name \*.cma -o -name \*.cmx -o -name \*.cmo -o -name \*.o -o -name \*\~ -o -name \*.bin -o -name \*.lbin -o -name \*.so -o -name \*.a -o -name \*.ln -o -name \*.blg -o -name \*.bbl -o -name \*.elc -o -name \*.lof -o -name \*.glo -o -name \*.idx -o -name \*.lot -o -name \*.fmt -o -name \*.tfm -o -name \*.class -o -name \*.fas -o -name \*.lib -o -name \*.mem -o -name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name \*.pfsl -o -name \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name \*.lx32fsl -o -name \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl -o -name \*.fx32fsl -o -name \*.sx64fsl -o -name \*.sx32fsl -o -name \*.wx64fsl -o -name \*.wx32fsl -o -name \*.fasl -o -name \*.ufsl -o -name \*.fsl -o -name \*.dxl -o -name \*.lo -o -name \*.la -o -name \*.gmo -o -name \*.mo -o -name \*.toc -o -name \*.aux -o -name \*.cp -o -name \*.fn -o -name \*.ky -o -name \*.pg -o -name \*.tp -o -name \*.vr -o -name \*.cps -o -name \*.fns -o -name \*.kys -o -name \*.pgs -o -name \*.tps -o -name \*.vrs -o -name \*.pyc -o -name \*.pyo \) -prune -o -type f ! -name '*[~#]*' ! -name TAGS ! -name '*.patch' ! -name '*.jpg' ! -name '*.log' ! -name '*.log.*' \( -name \* \) -print0 | xargs -0 -e grep --color -i -nH -e abc Grep finished with no matches found at Tue Jun 30 12:25:32 --------- And of course I was concentrating on the bottom where it says "no matches", not at all on the top of the buffer to confirm that rgrep actually did what I just told it to do. I tried to find if the behaviour was somehow customizable, but it seems not. ---- In GNU Emacs 26.1.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-11-22 built on riefenstahl-thinkpad Repository revision: 93242b14769ed40ae58e89d0ea45df8872f59869 Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 16.04.6 LTS Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LCMS2 Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: global-magit-file-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t desktop-save-mode: t display-time-mode: t diff-auto-refine-mode: t delete-selection-mode: t shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail pulse xref project cl-print debug eieio-opt speedbar sb-image ezimage dframe find-func help-fns markdown-mode color noutline outline sql view conf-mode yaml-mode magit-find-file find-dired calculator dirtrack log-view vc vc-dispatcher json-mode json-reformat json-snatcher js sgml-mode dom json map thingatpt misearch multi-isearch sh-script smie executable dired-aux bug-reference edmacro kmacro magit-extras magit-submodule magit-obsolete magit-popup magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode transient git-commit magit-git magit-section magit-utils crm log-edit message-x message rmc puny rfc822 mml mml-sec epa epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor cl-extra help-mode async-bytecomp async subr-x dash files-x elec-pair desktop frameset highline ange-ftp generic-x cl autoinsert ps-print ps-print-loaddefs ps-def lpr dired dired-loaddefs benny-x-clipboard disp-table mm-util mail-prsvr time server protbuf solar cal-dst cal-islam cal-hebrew holidays hol-loaddefs vc-git diff-mode easy-mmode benny-mtff-mode diary-lib diary-loaddefs cal-menu calendar cal-loaddefs which-func imenu jka-compr grep compile delsel cus-start cus-load tty-format generic benny-calendar-cfg derived browse-url cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs benny-file-cache filecache tramp-sh docker-tramp tramp-cache tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete comint ansi-color ring parse-time format-spec advice benny-unicode .loaddefs benny-tools autoload radix-tree lisp-mnt finder-inf gh-common marshal eieio-compat rx info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 702186 71703) (symbols 48 40155 2) (miscs 40 7447 2586) (strings 32 108374 9705) (string-bytes 1 3586419) (vectors 16 71858) (vector-slots 8 1930070 196080) (floats 8 913 803) (intervals 56 43045 2395) (buffers 992 98) (heap 1024 68850 3631)) From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 30 08:27:10 2020 Received: (at 42136) by debbugs.gnu.org; 30 Jun 2020 12:27:10 +0000 Received: from localhost ([127.0.0.1]:50397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqFLy-0008Ef-JM for submit@debbugs.gnu.org; Tue, 30 Jun 2020 08:27:10 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:46781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqFLw-0008ER-G6 for 42136@debbugs.gnu.org; Tue, 30 Jun 2020 08:27:09 -0400 Received: by mail-wr1-f46.google.com with SMTP id r12so19865719wrj.13 for <42136@debbugs.gnu.org>; Tue, 30 Jun 2020 05:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=npg2xFll3CART4CLESvKg/c9KZJiezkRG4j1f0QqHoM=; b=qomQJIgXlwwveslin859rgiF3HE74GA06Aiq49psY1oz15DSisqZHeAic0INF/Qbak 3g5kzVSUmnAC/YKAFBGt0G+6pC+LoI2bitalQr+2OMXi/vhEf5WD2L7RjHPDpRm1ODAI RF/nteDUdcquV/Y3GgUxCPcox/gxnAdgtf6g8qBNHjM8k7Ious0WR8HqwuoEiCueXAvA fN2X3kEQ/iajzcM0CMLculv0JPA8398O23UchkSabTrQaFSin4ZHURai2onthfd3sRfO +w2H1lh1lC0l3rO2us+en5SugM0/WlqOncI76zmk1XfGW2eWCsQuh4zhSWIYcC2wPl+w eiAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:cc:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=npg2xFll3CART4CLESvKg/c9KZJiezkRG4j1f0QqHoM=; b=eKph5XThktxKM1unSUDubeLNlgKoi8SXIZMgvFgI43bgafo29RJkoxV9VzoK9+yURZ V3cBnDIrdbm40jWV3/oY1eE7PypquznaLnrzMT1xhwHmMbAUQ3/3CAVaod9viUcXK0zR JYRGAsSFUPGJIhsOJSbFisPYjQlti0eIacmzQHxim7tCu35SKHGHE4j5sXMSHIozl031 MB8gS1p6y12qCvZ7R0Bo9Fk7vJJ0QXyx9mPzlHPyIVtXmoOgqiukh/H4k6dmp8j2M3DY KTbCdO+Q1lAgEH5i8b/hCjXlnicsL9Hyr/QWcAT/rUo02pT0LC5/WRTxJ2/GdeKNpUxM 5p7g== X-Gm-Message-State: AOAM532ZKTSM35NI4/nv01jAkp5fMAeBjeWejRr4sAPB4SiOOnYOCtj0 rcQ/7tWdpr930RILl2qut88= X-Google-Smtp-Source: ABdhPJy9vxVG2rn42Wn3l0DIJrxvUaCFraRT7D1T8M4e7u/TBFwbM5VlHIq+7M5eJqZccWzgvrK4Wg== X-Received: by 2002:adf:edc8:: with SMTP id v8mr21198636wro.125.1593520022690; Tue, 30 Jun 2020 05:27:02 -0700 (PDT) Received: from [192.168.0.134] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id r1sm3344886wrt.73.2020.06.30.05.27.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 05:27:01 -0700 (PDT) Subject: Re: bug#42136: 26.1.90; rgrep uses a directory that was not actually given To: Benjamin Riefenstahl , 42136@debbugs.gnu.org References: <877dvo25nt.fsf@riefenstahl-thinkpad.mecom.de> From: Dmitry Gutov Message-ID: <2b267ca4-7265-9018-1429-c422ced10823@yandex.ru> Date: Tue, 30 Jun 2020 15:26:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <877dvo25nt.fsf@riefenstahl-thinkpad.mecom.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42136 Cc: Stefan Monnier 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: -1.0 (-) Hi! On 30.06.2020 13:45, Benjamin Riefenstahl wrote: > Receipe: > > * M-x make-directory RET "/tmp/cds_config" RET > * rgrep RET abc RET * RET /tmp/cds_c RET > > Observed: rgrep searches in "/tmp/cds_config". > > Expected: Error message that the directory "/tmp/cds_c" does not exist. > Alternatively a comfirmation question about the completion. RET is bound to minibuffer-complete-and-exit. So the result seems expected. Did this scenario behave differently in some recent version of Emacs? To be fair, the docstring of this command says it behaves differently with different values of minibuffer-completion-confirm. But that variable doesn't seem to be customizable by the user. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 30 08:52:08 2020 Received: (at 42136) by debbugs.gnu.org; 30 Jun 2020 12:52:08 +0000 Received: from localhost ([127.0.0.1]:50411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqFk8-0000Pn-78 for submit@debbugs.gnu.org; Tue, 30 Jun 2020 08:52:08 -0400 Received: from smtp-dmz1.mecom.de ([194.213.98.84]:55021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqFk6-0000PH-Gm for 42136@debbugs.gnu.org; Tue, 30 Jun 2020 08:52:07 -0400 Received: from [192.168.226.74] (helo=riefenstahl-linux.mecom.de.mecom.de) by smtp-dmz1.mecom.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqFjy-0005YL-SY; Tue, 30 Jun 2020 14:51:58 +0200 From: Benjamin Riefenstahl To: Dmitry Gutov Subject: Re: bug#42136: 26.1.90; rgrep uses a directory that was not actually given References: <877dvo25nt.fsf@riefenstahl-thinkpad.mecom.de> <2b267ca4-7265-9018-1429-c422ced10823@yandex.ru> Date: Tue, 30 Jun 2020 14:51:58 +0200 In-Reply-To: <2b267ca4-7265-9018-1429-c422ced10823@yandex.ru> (Dmitry Gutov's message of "Tue, 30 Jun 2020 15:26:58 +0300") Message-ID: <87k0zobtsh.fsf@riefenstahl-linux.mecom.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42136 Cc: Stefan Monnier , 42136@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: -3.3 (---) Hi Dimitry, Thanks for taking a look. Dmitry Gutov writes: > RET is bound to minibuffer-complete-and-exit. So the result seems > expected. The result seems as designed. I expected something different. > Did this scenario behave differently in some recent version of Emacs? Probably not. > To be fair, the docstring of this command says it behaves differently > with different values of minibuffer-completion-confirm. The variations here seem be the same as the MUSTMATCH parameter to read-file-name. I had tested those and none of those seem to do what I want. It's not like I do not like completion in general, but for me and in this situation I want it only on-demand (with TAB), not automatic and with almost no feedback about the choice that was actually made. I may just learn my lesson here for now, but I'm not sure this is good. Also I wanted to hear if anybody has a tip about some customization that I was missing. benny From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 18:10:34 2020 Received: (at 42136) by debbugs.gnu.org; 1 Jul 2020 22:10:34 +0000 Received: from localhost ([127.0.0.1]:53863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqkw6-0005l2-Ap for submit@debbugs.gnu.org; Wed, 01 Jul 2020 18:10:34 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:45615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqkw4-0005kc-59 for 42136@debbugs.gnu.org; Wed, 01 Jul 2020 18:10:33 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 666A840002; Wed, 1 Jul 2020 22:10:23 +0000 (UTC) From: Juri Linkov To: Benjamin Riefenstahl Subject: Re: bug#42136: 26.1.90; rgrep uses a directory that was not actually given Organization: LINKOV.NET References: <877dvo25nt.fsf@riefenstahl-thinkpad.mecom.de> <2b267ca4-7265-9018-1429-c422ced10823@yandex.ru> <87k0zobtsh.fsf@riefenstahl-linux.mecom.de> Date: Thu, 02 Jul 2020 00:46:06 +0300 In-Reply-To: <87k0zobtsh.fsf@riefenstahl-linux.mecom.de> (Benjamin Riefenstahl's message of "Tue, 30 Jun 2020 14:51:58 +0200") Message-ID: <87pn9edi3l.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42136 Cc: 42136@debbugs.gnu.org, Stefan Monnier , Dmitry Gutov 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: -1.7 (-) > Also I wanted to hear if anybody has a tip about some customization that > I was missing. Maybe some advice might help you: (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. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 10:11:15 2020 Received: (at 42136) by debbugs.gnu.org; 3 Jul 2020 14:11:15 +0000 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 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 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 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 From: Benjamin Riefenstahl To: Juri Linkov Subject: Re: bug#42136: 26.1.90; rgrep uses a directory that was not actually given 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> Date: 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") Message-ID: <87h7uo7kpd.fsf@turtle-trading.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42136 Cc: 42136@debbugs.gnu.org, Benjamin Riefenstahl , Stefan Monnier , Dmitry Gutov 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: -1.0 (-) 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