unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
@ 2020-10-01  4:28 Jean Louis
  2020-10-01 16:56 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 21+ messages in thread
From: Jean Louis @ 2020-10-01  4:28 UTC (permalink / raw)
  To: 43735



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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01  4:28 bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable Jean Louis
@ 2020-10-01 16:56 ` Lars Ingebrigtsen
  2020-10-01 17:30   ` Eli Zaretskii
  2020-10-01 19:00   ` bug#43735: 28.0.50; M-x shell: " Jean Louis
  0 siblings, 2 replies; 21+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-01 16:56 UTC (permalink / raw)
  To: Jean Louis; +Cc: 43735

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 16:56 ` Lars Ingebrigtsen
@ 2020-10-01 17:30   ` Eli Zaretskii
  2020-10-01 19:19     ` Jean Louis
  2020-10-01 19:00   ` bug#43735: 28.0.50; M-x shell: " Jean Louis
  1 sibling, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2020-10-01 17:30 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735, bugs

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 01 Oct 2020 18:56:53 +0200
> Cc: 43735@debbugs.gnu.org
> 
> Jean Louis <bugs@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.





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; M-x shell: No such directory found via CDPATH environment variable
  2020-10-01 16:56 ` Lars Ingebrigtsen
  2020-10-01 17:30   ` Eli Zaretskii
@ 2020-10-01 19:00   ` Jean Louis
  2020-10-01 19:07     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 21+ messages in thread
From: Jean Louis @ 2020-10-01 19:00 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735

Sorry, I had to say: M-x shell

That is where it happens.

Eshell has other problems, I reported.

* Lars Ingebrigtsen <larsi@gnus.org> [2020-10-01 19:57]:
> Jean Louis <bugs@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 ..
> ~ $ 





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; M-x shell: No such directory found via CDPATH environment variable
  2020-10-01 19:00   ` bug#43735: 28.0.50; M-x shell: " Jean Louis
@ 2020-10-01 19:07     ` Lars Ingebrigtsen
  2020-10-01 19:25       ` bug#43735: 28.0.50; M-x eshell: " Jean Louis
  0 siblings, 1 reply; 21+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-01 19:07 UTC (permalink / raw)
  To: Jean Louis; +Cc: 43735

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 17:30   ` Eli Zaretskii
@ 2020-10-01 19:19     ` Jean Louis
  2020-10-01 19:22       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 21+ messages in thread
From: Jean Louis @ 2020-10-01 19:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, 43735

* Eli Zaretskii <eliz@gnu.org> [2020-10-01 20:31]:
> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Date: Thu, 01 Oct 2020 18:56:53 +0200
> > Cc: 43735@debbugs.gnu.org
> > 
> > Jean Louis <bugs@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.





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 19:19     ` Jean Louis
@ 2020-10-01 19:22       ` Lars Ingebrigtsen
  2020-10-01 19:26         ` Jean Louis
  0 siblings, 1 reply; 21+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-01 19:22 UTC (permalink / raw)
  To: Jean Louis; +Cc: 43735

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; M-x eshell: No such directory found via CDPATH environment variable
  2020-10-01 19:07     ` Lars Ingebrigtsen
@ 2020-10-01 19:25       ` Jean Louis
  0 siblings, 0 replies; 21+ messages in thread
From: Jean Louis @ 2020-10-01 19:25 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735

* Lars Ingebrigtsen <larsi@gnus.org> [2020-10-01 22:07]:
> Jean Louis <bugs@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.





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 19:22       ` Lars Ingebrigtsen
@ 2020-10-01 19:26         ` Jean Louis
  2020-10-01 19:55           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 21+ messages in thread
From: Jean Louis @ 2020-10-01 19:26 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735

* Lars Ingebrigtsen <larsi@gnus.org> [2020-10-01 22:23]:
> Jean Louis <bugs@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.





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 19:26         ` Jean Louis
@ 2020-10-01 19:55           ` Lars Ingebrigtsen
  2020-10-01 20:07             ` Lars Ingebrigtsen
                               ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-01 19:55 UTC (permalink / raw)
  To: Jean Louis; +Cc: 43735

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 19:55           ` Lars Ingebrigtsen
@ 2020-10-01 20:07             ` Lars Ingebrigtsen
  2020-10-01 21:42               ` Jean Louis
  2020-10-02 20:43             ` Jean Louis
  2021-03-08 15:23             ` Stefan Kangas
  2 siblings, 1 reply; 21+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-01 20:07 UTC (permalink / raw)
  To: Jean Louis; +Cc: 43735

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 20:07             ` Lars Ingebrigtsen
@ 2020-10-01 21:42               ` Jean Louis
  2020-10-01 21:55                 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 21+ messages in thread
From: Jean Louis @ 2020-10-01 21:42 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735

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@gnus.org>:
>Lars Ingebrigtsen <larsi@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...  





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 21:42               ` Jean Louis
@ 2020-10-01 21:55                 ` Lars Ingebrigtsen
  2020-10-02  7:39                   ` Colin Baxter
  2020-10-07  9:59                   ` Jean Louis
  0 siblings, 2 replies; 21+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-01 21:55 UTC (permalink / raw)
  To: Jean Louis; +Cc: 43735

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 21:55                 ` Lars Ingebrigtsen
@ 2020-10-02  7:39                   ` Colin Baxter
  2020-10-07  9:59                   ` Jean Louis
  1 sibling, 0 replies; 21+ messages in thread
From: Colin Baxter @ 2020-10-02  7:39 UTC (permalink / raw)
  To: 43735

>>>>> Lars Ingebrigtsen <larsi@gnus.org> writes:

    > Jean Louis <bugs@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






^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 19:55           ` Lars Ingebrigtsen
  2020-10-01 20:07             ` Lars Ingebrigtsen
@ 2020-10-02 20:43             ` Jean Louis
  2020-10-03  7:37               ` Colin Baxter
  2021-03-08 15:23             ` Stefan Kangas
  2 siblings, 1 reply; 21+ messages in thread
From: Jean Louis @ 2020-10-02 20:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735

* Lars Ingebrigtsen <larsi@gnus.org> [2020-10-01 22:56]:
> Jean Louis <bugs@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.





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-02 20:43             ` Jean Louis
@ 2020-10-03  7:37               ` Colin Baxter
  0 siblings, 0 replies; 21+ messages in thread
From: Colin Baxter @ 2020-10-03  7:37 UTC (permalink / raw)
  To: 43735

>>>>> Jean Louis <bugs@gnu.support> writes:

    > * Lars Ingebrigtsen <larsi@gnus.org> [2020-10-01 22:56]:
    >> Jean Louis <bugs@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






^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 21:55                 ` Lars Ingebrigtsen
  2020-10-02  7:39                   ` Colin Baxter
@ 2020-10-07  9:59                   ` Jean Louis
  2020-11-14  7:16                     ` Jean Louis
  1 sibling, 1 reply; 21+ messages in thread
From: Jean Louis @ 2020-10-07  9:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735

* Lars Ingebrigtsen <larsi@gnus.org> [2020-10-02 00:56]:
> Jean Louis <bugs@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.







^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-07  9:59                   ` Jean Louis
@ 2020-11-14  7:16                     ` Jean Louis
  0 siblings, 0 replies; 21+ messages in thread
From: Jean Louis @ 2020-11-14  7:16 UTC (permalink / raw)
  To: Jean Louis; +Cc: Lars Ingebrigtsen, 43735

* Jean Louis <bugs@gnu.support> [2020-11-14 02:14]:
> * Lars Ingebrigtsen <larsi@gnus.org> [2020-10-02 00:56]:
> > Jean Louis <bugs@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






^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2020-10-01 19:55           ` Lars Ingebrigtsen
  2020-10-01 20:07             ` Lars Ingebrigtsen
  2020-10-02 20:43             ` Jean Louis
@ 2021-03-08 15:23             ` Stefan Kangas
  2021-03-08 19:30               ` Lars Ingebrigtsen
  2 siblings, 1 reply; 21+ messages in thread
From: Stefan Kangas @ 2021-03-08 15:23 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735, Jean Louis

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2021-03-08 15:23             ` Stefan Kangas
@ 2021-03-08 19:30               ` Lars Ingebrigtsen
  2021-03-10 14:13                 ` Stefan Kangas
  0 siblings, 1 reply; 21+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-08 19:30 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 43735, Jean Louis

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.

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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable
  2021-03-08 19:30               ` Lars Ingebrigtsen
@ 2021-03-10 14:13                 ` Stefan Kangas
  0 siblings, 0 replies; 21+ messages in thread
From: Stefan Kangas @ 2021-03-10 14:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43735, Jean Louis

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





^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-03-10 14:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01  4:28 bug#43735: 28.0.50; eshell: No such directory found via CDPATH environment variable Jean Louis
2020-10-01 16:56 ` Lars Ingebrigtsen
2020-10-01 17:30   ` Eli Zaretskii
2020-10-01 19:19     ` Jean Louis
2020-10-01 19:22       ` Lars Ingebrigtsen
2020-10-01 19:26         ` Jean Louis
2020-10-01 19:55           ` Lars Ingebrigtsen
2020-10-01 20:07             ` Lars Ingebrigtsen
2020-10-01 21:42               ` Jean Louis
2020-10-01 21:55                 ` Lars Ingebrigtsen
2020-10-02  7:39                   ` Colin Baxter
2020-10-07  9:59                   ` Jean Louis
2020-11-14  7:16                     ` Jean Louis
2020-10-02 20:43             ` Jean Louis
2020-10-03  7:37               ` Colin Baxter
2021-03-08 15:23             ` Stefan Kangas
2021-03-08 19:30               ` Lars Ingebrigtsen
2021-03-10 14:13                 ` Stefan Kangas
2020-10-01 19:00   ` bug#43735: 28.0.50; M-x shell: " Jean Louis
2020-10-01 19:07     ` Lars Ingebrigtsen
2020-10-01 19:25       ` bug#43735: 28.0.50; M-x eshell: " Jean Louis

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).