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

To reply to this bug, email your comments to 43735 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 04:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean Louis <bugs <at> gnu.support>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 01 Oct 2020 04:41:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; eshell: No such directory found via CDPATH environment
 variable
Date: Thu, 01 Oct 2020 07:28:53 +0300

Working directory: /home/data1/protected

Following is invoked as emacs -Q:

M-x eshell

$ cd tmp 

~/tmp $ cd zim-admin
No such directory found via CDPATH environment variable

y~/tmp $ cd ..
/home/data1 $ No such directory found via CDPATH environment variable

If I am in ~/tmp, by "cd .." I should get in /home/data1/protected,
instead I find myself in /home/data1

My $HOME is /home/data1/protected

/home/data1 $ cd protected/
No such directory found via CDPATH environment variable


/home/data1 $ cd protected/
No such directory found via CDPATH environment variable
/home/data1 $ ls -l
total 96
drwxr-xr-x   4 postgres       postgres  4096 2018-06-07  2018 database
drwxr-xr-x 233 admin          admin    94208 2020-10-01 07:22 protected

directory is obviously there

/home/admin is symlink to /home/data1/protected:


/home/data1 $ ls -l
total 96
drwxr-xr-x   4 postgres       postgres  4096 2018-06-07  2018 database
drwxr-xr-x 233 admin          admin    94208 2020-10-01 07:22 protected
/home/data1 $ cd /home/admin
/home/admin $ ls -l
total 3749
-rw-r--r--   1 admin          admin       4206 2020-10-01 07:23 #*message*-20201001-072114#
-rw-------   1 admin          admin     307724 2020-09-26 16:22 A1.pdf
drwxr-xr-x   2 admin          admin       4096 2020-09-29 23:14 Aufnahmen
drwxr-xr-x   3 admin          admin       4096 2020-09-30 02:06 Desktop
drwxr-x---  32 admin          admin       4096 2020-09-06 09:48 Documents
drwx------  22 admin          admin      28672 2020-09-30 21:11 Downloads
drwxr-xr-x   4 admin          admin       4096 2019-11-09  2019 GNUstep
drwx------50488 admin          admin    2359296 2020-09-30 19:24 Maildir
drwxr-x---  13 admin          admin       4096 2020-09-16 02:19 Media
-rw-------   1 admin          admin     705245 2020-09-26 16:34 PLM0208KGR.pdf
drwxr-x---  32 admin          admin       4096 2019-10-06  2019 Programming
drwxr-xr-x   3 admin          admin       4096 2019-08-16  2019 R
drwxr-xr-x  19 admin          admin       4096 2020-07-06 11:09 TO-DO
drwxr-xr-x   4 admin          admin      12288 2020-09-30 20:16 TO-SORT
drwx------  10 admin          admin       4096 2018-06-17  2018 Work
drwxr-xr-x   8 admin          admin      20480 2020-09-30 19:38 bin
-rw-r--r--   1 admin          admin      20255 2020-09-30 19:47 kdeconnect-01.jpg
drwxr-xr-x  14 admin          admin       4096 2018-10-13  2018 lib
drwxr-xr-x 185 admin          admin      12288 2020-05-15 12:06 public_html
drwxrwxrwt  46 admin          admin     327680 2020-10-01 03:07 tmp
/home/admin $

from /home/admin I "cd tmp" it works, if I wish to cd to zim-admin
directory inside: 
No such directory found via CDPATH environment variable

Then I do "cd", it works again:


~/tmp $ cd zim-admin
No such directory found via CDPATH environment variable
~/tmp $ cd
~ $ pwd
/home/data1/protected
~ $

~ $ ls
Text is read-only

If I kill eshell buffer and get into new one:

Welcome to the Emacs shell

/home/data1 $

but my HOME is /home/data1/protected

/home/data1 $ echo $HOME
/home/data1/protected


/home/data1 $ cd
~ $ pwd
/home/data1/protected

there are weird things happening in eshell


In GNU Emacs 28.0.50 (build 15, x86_64-pc-linux-gnu, X toolkit, cairo version 1.14.8, Xaw3d scroll bars)
 of 2020-09-24 built on protected.rcdrun.com
Repository revision: de54cd6f0edb3619777c17fe75560c5c84fed8a4
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11907000
System Description: Hyperbola GNU/Linux-libre

Configured using:
 'configure --prefix=/package/text/emacs-2020-09-24
 --with-x-toolkit=lucid --with-modules --without-gpm
 PKG_CONFIG_PATH=/home/data1/protected/GNUstep/Library/Libraries/pkgconfig:/usr/lib/pkgconfig'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS JSON PDUMPER
LCMS2

Important settings:
  value of $LC_ALL: de_DE.UTF-8
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=exwm-xim
  locale-coding-system: utf-8-unix

Major mode: Eshell

Minor modes in effect:
  eshell-prompt-mode: t
  eshell-hist-mode: t
  eshell-pred-mode: t
  eshell-cmpl-mode: t
  eshell-proc-mode: t
  eshell-arg-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort hashcash mail-extr emacsbug message rmc puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util
rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils pcmpl-unix
em-unix em-term term disp-table easymenu ehelp em-script em-prompt em-ls
cl-loaddefs cl-lib em-hist em-pred em-glob em-dirs esh-var em-cmpl
pcomplete comint ansi-color ring em-basic em-banner em-alias esh-mode
eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-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 tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer 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
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window 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
cairo x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 72220 5021)
 (symbols 48 8946 1)
 (strings 32 25490 2689)
 (string-bytes 1 840241)
 (vectors 16 15547)
 (vector-slots 8 205830 10455)
 (floats 8 31 41)
 (intervals 56 484 203)
 (buffers 992 13))

-- 
Thanks,
Jean Louis




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 16:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Thu, 01 Oct 2020 18:56:53 +0200
Jean Louis <bugs <at> gnu.support> writes:

> Following is invoked as emacs -Q:
>
> M-x eshell
>
> $ cd tmp 
>
> ~/tmp $ cd zim-admin
> No such directory found via CDPATH environment variable
>
> y~/tmp $ cd ..
> /home/data1 $ No such directory found via CDPATH environment variable

I'm unable to reproduce the bug.

M-x eshell

~ $ cd tmp
~/tmp $ cd zim-admin
No such directory found via CDPATH environment variable
~/tmp $ cd ..
~ $ 


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 17:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43735 <at> debbugs.gnu.org, bugs <at> gnu.support
Subject: Re: bug#43735: 28.0.50;
 eshell: No such directory found via CDPATH environment variable
Date: Thu, 01 Oct 2020 20:30:20 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Thu, 01 Oct 2020 18:56:53 +0200
> Cc: 43735 <at> debbugs.gnu.org
> 
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > Following is invoked as emacs -Q:
> >
> > M-x eshell
> >
> > $ cd tmp 
> >
> > ~/tmp $ cd zim-admin
> > No such directory found via CDPATH environment variable
> >
> > y~/tmp $ cd ..
> > /home/data1 $ No such directory found via CDPATH environment variable
> 
> I'm unable to reproduce the bug.

This is probably related to the symlinks Jean has there, or to some
other local issue.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 19:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; M-x shell: No such directory found via
 CDPATH environment variable
Date: Thu, 1 Oct 2020 22:00:07 +0300
Sorry, I had to say: M-x shell

That is where it happens.

Eshell has other problems, I reported.

* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-10-01 19:57]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > Following is invoked as emacs -Q:
> >
> > M-x eshell
> >
> > $ cd tmp 
> >
> > ~/tmp $ cd zim-admin
> > No such directory found via CDPATH environment variable
> >
> > y~/tmp $ cd ..
> > /home/data1 $ No such directory found via CDPATH environment variable
> 
> I'm unable to reproduce the bug.
> 
> M-x eshell
> 
> ~ $ cd tmp
> ~/tmp $ cd zim-admin
> No such directory found via CDPATH environment variable
> ~/tmp $ cd ..
> ~ $ 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 19:08:02 GMT) Full text and rfc822 format available.

Message #17 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; M-x shell: No such directory found via
 CDPATH environment variable
Date: Thu, 01 Oct 2020 21:07:16 +0200
Jean Louis <bugs <at> gnu.support> writes:

> Sorry, I had to say: M-x shell
>
> That is where it happens.
>
> Eshell has other problems, I reported.

[...]

> > Following is invoked as emacs -Q:
> >
> > M-x eshell

[...]

>> I'm unable to reproduce the bug.
>> 
>> M-x eshell
>> 
>> ~ $ cd tmp
>> ~/tmp $ cd zim-admin
>> No such directory found via CDPATH environment variable
>> ~/tmp $ cd ..
>> ~ $ 

You've reported one bug about eshell, and one about shell.  The one I
responded to was the one about eshell.  (But I see you're saying "shell"
in the subject.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 19:20:01 GMT) Full text and rfc822 format available.

Message #20 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Thu, 1 Oct 2020 22:19:14 +0300
* Eli Zaretskii <eliz <at> gnu.org> [2020-10-01 20:31]:
> > From: Lars Ingebrigtsen <larsi <at> gnus.org>
> > Date: Thu, 01 Oct 2020 18:56:53 +0200
> > Cc: 43735 <at> debbugs.gnu.org
> > 
> > Jean Louis <bugs <at> gnu.support> writes:
> > 
> > > Following is invoked as emacs -Q:
> > >
> > > M-x eshell
> > >
> > > $ cd tmp 
> > >
> > > ~/tmp $ cd zim-admin
> > > No such directory found via CDPATH environment variable
> > >
> > > y~/tmp $ cd ..
> > > /home/data1 $ No such directory found via CDPATH environment variable
> > 
> > I'm unable to reproduce the bug.
> 
> This is probably related to the symlinks Jean has there, or to some
> other local issue.

I think it is related also to CDPATH. Now when I remove CDPATH from
.bashrc, then it works.

If I have CDPATH, it does not work.

Other bug is similar to this one, but is related to M-x shell

In both cases, Emacs is not handling well the CDPATH variable.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 19:24:02 GMT) Full text and rfc822 format available.

Message #23 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Thu, 01 Oct 2020 21:22:42 +0200
Jean Louis <bugs <at> gnu.support> writes:

> I think it is related also to CDPATH. Now when I remove CDPATH from
> .bashrc, then it works.

What's your CDPATH variable?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 19:27:02 GMT) Full text and rfc822 format available.

Message #26 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; M-x eshell: No such directory found via
 CDPATH environment variable
Date: Thu, 1 Oct 2020 22:25:48 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-10-01 22:07]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > Sorry, I had to say: M-x shell
> >
> > That is where it happens.
> >
> > Eshell has other problems, I reported.
> 
> [...]
> 
> > > Following is invoked as emacs -Q:
> > >
> > > M-x eshell
> 
> [...]
> 
> >> I'm unable to reproduce the bug.
> >> 
> >> M-x eshell
> >> 
> >> ~ $ cd tmp
> >> ~/tmp $ cd zim-admin
> >> No such directory found via CDPATH environment variable
> >> ~/tmp $ cd ..
> >> ~ $ 
> 
> You've reported one bug about eshell, and one about shell.  The one I
> responded to was the one about eshell.  (But I see you're saying "shell"
> in the subject.)

Eh, sorry, even me I am confused now, but now I see I did report it
well for M-x eshell, not for M-x shell, but in both bugs,
incidentally, there is same problem, it happens if CDPATH variable is
there.

Let me correct the subject, back to eshell.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 19:28:02 GMT) Full text and rfc822 format available.

Message #29 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Thu, 1 Oct 2020 22:26:55 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-10-01 22:23]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > I think it is related also to CDPATH. Now when I remove CDPATH from
> > .bashrc, then it works.
> 
> What's your CDPATH variable?

export CDPATH="./:~:/home/data1/protected/Work/3rd-Dynamic/Corporation/Division_4/Dept_10/Company Formation"

And inside there, there are directories like:

Accounting
Agency Agreement
Australia

and many others. Nothing special, that is how it is.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 19:57:02 GMT) Full text and rfc822 format available.

Message #32 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Thu, 01 Oct 2020 21:55:56 +0200
Jean Louis <bugs <at> gnu.support> writes:

>> > I think it is related also to CDPATH. Now when I remove CDPATH from
>> > .bashrc, then it works.
>> 
>> What's your CDPATH variable?
>
> export
> CDPATH="./:~:/home/data1/protected/Work/3rd-Dynamic/Corporation/Division_4/Dept_10/Company
> Formation"

I can reproduce this bug:

M-x eshell
$ export CDPATH="/var"
$ cd tmp
No such directory found via CDPATH environment variable

(tmp does exist.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 20:09:02 GMT) Full text and rfc822 format available.

Message #35 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Thu, 01 Oct 2020 22:07:54 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I can reproduce this bug:
>
> M-x eshell
> $ export CDPATH="/var"
> $ cd tmp
> No such directory found via CDPATH environment variable
>
> (tmp does exist.)

And now...  I'm no longer able to reproduce this problem.  Uhm...  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 21:44:01 GMT) Full text and rfc822 format available.

Message #38 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50;
 eshell: No such directory found via CDPATH environment variable
Date: Thu, 01 Oct 2020 21:42:39 +0000
If you change within shell or eshell maybe no, I change it in .bashrc before launching and can reproduce reliably

Am October 1, 2020 8:07:54 PM UTC schrieb Lars Ingebrigtsen <larsi <at> gnus.org>:
>Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> I can reproduce this bug:
>>
>> M-x eshell
>> $ export CDPATH="/var"
>> $ cd tmp
>> No such directory found via CDPATH environment variable
>>
>> (tmp does exist.)
>
>And now...  I'm no longer able to reproduce this problem.  Uhm...  




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Thu, 01 Oct 2020 21:56:02 GMT) Full text and rfc822 format available.

Message #41 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Thu, 01 Oct 2020 23:55:38 +0200
Jean Louis <bugs <at> gnu.support> writes:

> If you change within shell or eshell maybe no, I change it in .bashrc
> before launching and can reproduce reliably

My test case is

CDPATH="/var" emacs -Q
M-x eshell
$ cd tmp
/var/tmp $

So CDPATH works as advertised in eshell, as far as I can tell.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Fri, 02 Oct 2020 07:41:01 GMT) Full text and rfc822 format available.

Message #44 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Colin Baxter <m43cap <at> yandex.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#43735: 28.0.50;
 eshell: No such directory found via CDPATH environment variable
Date: Fri, 02 Oct 2020 08:39:53 +0100
>>>>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:

    > Jean Louis <bugs <at> gnu.support> writes:
    >> If you change within shell or eshell maybe no, I change it in
    >> .bashrc before launching and can reproduce reliably

    > My test case is

    > CDPATH="/var" emacs -Q M-x eshell $ cd tmp /var/tmp $

    > So CDPATH works as advertised in eshell, as far as I can tell.

I can confirm CDPATH works in shell and eshell.

cd $HOME <RET>
mkdir hop <RET>
mkdir $HOME/hop/hip <RET>
mkdir $HOME/hop/hip/hap <RET>
export CDPATH=".:/home/<USERNAME>/hop/hip/" <RET>
cd <RET>
emacs -q <RET>
M-x shell <RET>

In shell:
cd <RET>
cd hap <RET>
pwd <RET> --> /home/<USERNAME>/hop/hip/hap


I used emacs-28.0.50. CDPATH is always tricky to set correctly. I never
use it myself, for that reason.

Best wishes,
 
Colin Baxter





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Fri, 02 Oct 2020 20:44:02 GMT) Full text and rfc822 format available.

Message #47 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Fri, 2 Oct 2020 23:43:29 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-10-01 22:56]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> >> > I think it is related also to CDPATH. Now when I remove CDPATH from
> >> > .bashrc, then it works.
> >> 
> >> What's your CDPATH variable?
> >
> > export
> > CDPATH="./:~:/home/data1/protected/Work/3rd-Dynamic/Corporation/Division_4/Dept_10/Company
> > Formation"
> 
> I can reproduce this bug:
> 
> M-x eshell
> $ export CDPATH="/var"
> $ cd tmp
> No such directory found via CDPATH environment variable
> 
> (tmp does exist.)

It is reproducible, but I am starting from login with CDPATH in my
.bashrc, before starting Emacs. I am not chaning CDPATH within Emacs
inside, I did not test that.

If I start with CDPATH in .bashrc, as environment, that is where
problem starts.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Sat, 03 Oct 2020 07:38:02 GMT) Full text and rfc822 format available.

Message #50 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Colin Baxter <m43cap <at> yandex.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#43735: 28.0.50;
 eshell: No such directory found via CDPATH environment variable
Date: Sat, 03 Oct 2020 08:37:05 +0100
>>>>> Jean Louis <bugs <at> gnu.support> writes:

    > * Lars Ingebrigtsen <larsi <at> gnus.org> [2020-10-01 22:56]:
    >> Jean Louis <bugs <at> gnu.support> writes:
    >> 
    >> >> > I think it is related also to CDPATH. Now when I remove
    >> CDPATH from >> > .bashrc, then it works.
    >> >> 
    >> >> What's your CDPATH variable?
    >> >
    >> > export >
    >> CDPATH="./:~:/home/data1/protected/Work/3rd-Dynamic/Corporation/Division_4/Dept_10/Company
    >> > Formation"
    >> 
    >> I can reproduce this bug:
    >> 
    >> M-x eshell $ export CDPATH="/var" $ cd tmp No such directory
    >> found via CDPATH environment variable
    >> 
    >> (tmp does exist.)

    > It is reproducible, but I am starting from login with CDPATH in my
    > .bashrc, before starting Emacs. I am not chaning CDPATH within
    > Emacs inside, I did not test that.

    > If I start with CDPATH in .bashrc, as environment, that is where
    > problem starts.

Sorry, but it works for me even if I set the CDPATH in ~/.bashrc

In ~/.bashrc
# CDPATH
CDPATH=.:/home/<USERNAME>/1/2/
export CDPATH

Open xterm
echo $CDPATH --> .:/home/<USERNAME>/1/2/
emacs -q <RET>
M-x shell <RET>
In shell
cd <RET>
echo $CDPATH --> .:/home/<USERNAME>/1/2/
cd 3 <RET>
pwd -- > /home/<USERNAME>/1/2/3


Ditto for eshell.

However in eshell the sequence of commands
cd <RET>
cd 3 <RET>
cd ../ <RET>
ls --> /HOME
cd ../ <RET>
ls --> /<USERNAME>
cd <RET>
ls --> all files and directories in $HOME are listed as normal

The odd behaviour of eshell does not occur in shell.

Again, I'm using emacs-28.0.50

Best wishes,

Colin.


Colin Baxter
URL: http://www.Colin-Baxter.com





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Wed, 07 Oct 2020 10:00:01 GMT) Full text and rfc822 format available.

Message #53 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Wed, 7 Oct 2020 12:59:49 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-10-02 00:56]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > If you change within shell or eshell maybe no, I change it in .bashrc
> > before launching and can reproduce reliably
> 
> My test case is
> 
> CDPATH="/var" emacs -Q
> M-x eshell
> $ cd tmp
> /var/tmp $
> 
> So CDPATH works as advertised in eshell, as far as I can tell.

I have CDPATH defined in .bashrc

It is
":~:/home/data1/protected/Work/3rd-Dynamic/Corporation/Division_4/Dept_10/Company Formation"

Then I start: emacs -q

then: cd tmTAB it works, it expands to tmp and I enter tmp

Initially I am in directory /home/data1/protected

if I am in tmp, after cd .. I come back to /home/data1 instead of
/home/data1/protected

then after cd .. if I wish to come back to home I can do cd ~ which
works.

But then if I wish to cd tmTAB this expansion does not work anymore.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Sat, 14 Nov 2020 07:54:02 GMT) Full text and rfc822 format available.

Message #56 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Jean Louis <bugs <at> gnu.support>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 43735 <at> debbugs.gnu.org
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Sat, 14 Nov 2020 10:16:57 +0300
* Jean Louis <bugs <at> gnu.support> [2020-11-14 02:14]:
> * Lars Ingebrigtsen <larsi <at> gnus.org> [2020-10-02 00:56]:
> > Jean Louis <bugs <at> gnu.support> writes:
> > 
> > > If you change within shell or eshell maybe no, I change it in .bashrc
> > > before launching and can reproduce reliably
> > 
> > My test case is
> > 
> > CDPATH="/var" emacs -Q
> > M-x eshell
> > $ cd tmp
> > /var/tmp $
> > 
> > So CDPATH works as advertised in eshell, as far as I can tell.
> 
> I have CDPATH defined in .bashrc
> 
> It is
> ":~:/home/data1/protected/Work/3rd-Dynamic/Corporation/Division_4/Dept_10/Company Formation"
> 
> Then I start: emacs -q
> 
> then: cd tmTAB it works, it expands to tmp and I enter tmp
> 
> Initially I am in directory /home/data1/protected
> 
> if I am in tmp, after cd .. I come back to /home/data1 instead of
> /home/data1/protected
> 
> then after cd .. if I wish to come back to home I can do cd ~ which
> works.

Another attempt to use Emacs shell where CDPATH is colliding with
eshell. Directory Software/ is there, it even expands by using TAB to
add the slash / on the end of word Software. So if it expands it does
find the directory, but then collides something with CDPATH

Welcome to the Emacs shell

~ $ cd Programming/
~/Programming $ cd Software/emacs/
No such directory found via CDPATH environment variable
~/Programming $ git pull
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
~/Programming $ echo $CDPATH
./:~:/home/data1/protected/Work/3rd-Dynamic/Corporation/Division_4/Dept_10/Company Formation
~/Programming $ cd Software/
No such directory found via CDPATH environment variable
~/Programming $ ls 
BASIC      Gold     Perl6    RCDRUN                 TeX    emacs-lisp  hexadecimal   perl5
Documents  Haskell  Phone    Scheme                 c      git         languages     services
Forth      Lisp     Privacy  Software               clisp  groff       love          templeos
GNU        Perl     R        System Administration  dict   guile       peg-markdown  
~/Programming $
~/Programming $ unset CDPATH
~/Programming $ cd Software/
No such directory found via CDPATH environment variable
~/Programming $ 
~/Programming $ file Software/
Software/: directory





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Mon, 08 Mar 2021 15:24:02 GMT) Full text and rfc822 format available.

Message #59 received at 43735 <at> debbugs.gnu.org (full text, mbox):

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: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Mon, 8 Mar 2021 07:23:33 -0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Jean Louis <bugs <at> gnu.support> writes:
>
>>> > I think it is related also to CDPATH. Now when I remove CDPATH from
>>> > .bashrc, then it works.
>>>
>>> What's your CDPATH variable?
>>
>> export
>> CDPATH="./:~:/home/data1/protected/Work/3rd-Dynamic/Corporation/Division_4/Dept_10/Company
>> Formation"
>
> I can reproduce this bug:
>
> M-x eshell
> $ export CDPATH="/var"
> $ cd tmp
> No such directory found via CDPATH environment variable
>
> (tmp does exist.)

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Mon, 08 Mar 2021 19:31:02 GMT) Full text and rfc822 format available.

Message #62 received at 43735 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 43735 <at> debbugs.gnu.org,
 Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#43735: 28.0.50; eshell: No such directory found via CDPATH
 environment variable
Date: Mon, 08 Mar 2021 20:30:16 +0100
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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43735; Package emacs. (Wed, 10 Mar 2021 14:15:01 GMT) Full text and rfc822 format available.

Message #65 received at 43735 <at> debbugs.gnu.org (full text, mbox):

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: Re: 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.