bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43735: 28.0.50; eshell: No such directory found via CDPATH environme


From: Stefan Kangas
Subject: bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
Date: Wed, 10 Mar 2021 06:13:57 -0800

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stefan Kangas <stefan@marxist.se> writes:
>
>> BTW, the error message here should really not be talking about CDPATH in
>> this case, it is just confusing:
>>
>>     Welcome to the Emacs shell
>>
>>     ~/org/notes $ cd ~/wip/non-existent
>>     No such directory found via CDPATH environment variable
>>     ~/org/notes $ cd ~/wip/emacs
>>     ~/wip/emacs $
>>
>> But (getenv "CDPATH") => nil
>
> Yes, I agree completely.

I installed the following on master, but we still have to fix the bug in
this report:

diff --git a/lisp/files.el b/lisp/files.el
index e5fa1d8b22..2868be77f2 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -823,7 +823,9 @@ cd
          (expand-file-name dir))
     (locate-file dir cd-path nil
                  (lambda (f) (and (file-directory-p f) 'dir-ok)))
-    (error "No such directory found via CDPATH environment variable"))))
+    (if (getenv "CDPATH")
+        (error "No such directory found via CDPATH environment
variable: %s" dir)
+      (error "No such directory: %s" dir)))))

 (defun directory-files-recursively (dir regexp
                                         &optional include-directories predicate





reply via email to

[Prev in Thread] Current Thread [Next in Thread]