GNU bug report logs - #43735
28.0.50; eshell: No such directory found via CDPATH environment variable

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Thu, 1 Oct 2020 04:41:01 UTC

Severity: minor

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 43735 <at> debbugs.gnu.org, Jean Louis <bugs <at> gnu.support>
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 <at> gnus.org> writes:

> Stefan Kangas <stefan <at> 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




This bug report was last modified 4 years and 98 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.