From: Dmitry Gutov Date: Tue, 13 Aug 2024 12:14:18 +0000 (+0300) Subject: (project-find-regexp): Fix the temporary value of DEFAULT-DIRECTORY X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~565 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4589f51c21df3a07e1c5b46897608c344df73e68;p=emacs.git (project-find-regexp): Fix the temporary value of DEFAULT-DIRECTORY * lisp/progmodes/project.el (project-find-regexp): Make sure the assigned value of DEFAULT-DIRECTORY ends with a slash. read-directory-name returns the name without it in certain cases. --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index b7c1698f50b..c38d3f0048a 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1001,7 +1001,7 @@ requires quoting, e.g. `\\[quoted-insert]'." (project-files pr) (let* ((dir (read-directory-name "Base directory: " caller-dir nil t))) - (setq default-directory dir) + (setq default-directory (file-name-as-directory dir)) (project--files-in-directory dir nil (grep-read-files regexp))))))