GNU bug report logs - #24787
25.1; eshell cd not changing directory on remote path (windows-nt)

Previous Next

Package: emacs;

Reported by: "Gary O'Sullivan" <gary5000 <at> gmail.com>

Date: Mon, 24 Oct 2016 23:13:02 UTC

Severity: minor

Merged with 33791

Found in versions 25.1, 26.1

Fixed in version 26.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24787 in the body.
You can then email your comments to 24787 AT debbugs.gnu.org in the normal way.

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#24787; Package emacs. (Mon, 24 Oct 2016 23:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Gary O'Sullivan" <gary5000 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 24 Oct 2016 23:13:02 GMT) Full text and rfc822 format available.

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

From: "Gary O'Sullivan" <gary5000 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; eshell cd not changing directory on remote path (windows-nt)
Date: Tue, 25 Oct 2016 00:03:28 +0100
On Windows I can change remote directories in eshell via absolute paths

but using relative paths return an error message "No such directory

found via CDPATH environment variable".


Run runemacs.exe -Q

M-x eshell

Welcome to the Emacs shell


c:/software/emacs/bin $ cd /plink:mysrv:/

/plink:mysrv:/home/gary/ $ cd etc

No such directory found via CDPATH environment variable

/plink:mysrv:/home/gary/ $ cd /plink:mysrv:/etc

/plink:mysrv:/etc $


If I M-x toggle-debug-on-error I get the following backtrace:


Debugger entered--Lisp error: (error "No such directory found via
CDPATH environment variable")

  signal(error ("No such directory found via CDPATH environment variable"))

  error("No such directory found via CDPATH environment variable")

  cd("etc")

  eshell/cd("etc")

  apply(eshell/cd "etc")

  eshell-exec-lisp(eshell-print eshell-error eshell/cd ("etc") nil)

  eshell-lisp-command(eshell/cd ("etc"))

  eshell-plain-command("cd" ("etc"))

  eshell-named-command("cd" ("etc"))

  (prog1 (eshell-named-command "cd" (list "etc")) (run-hooks (quote
eshell-this-command-hook)))

  (condition-case err (prog1 (eshell-named-command "cd" (list "etc"))
(run-hooks (quote eshell-this-command-hook))) ((debug error)
(run-hooks (quote eshell-this-command-hook)) (eshell-errorn
(error-message-string err)) (eshell-close-handles 1)))

  (condition-case-unless-debug err (prog1 (eshell-named-command "cd"
(list "etc")) (run-hooks (quote eshell-this-command-hook))) (error
(run-hooks (quote eshell-this-command-hook)) (eshell-errorn
(error-message-string err)) (eshell-close-handles 1)))

  (eshell-condition-case err (prog1 (eshell-named-command "cd" (list
"etc")) (run-hooks (quote eshell-this-command-hook))) (error
(run-hooks (quote eshell-this-command-hook)) (eshell-errorn
(error-message-string err)) (eshell-close-handles 1)))

  (let ((eshell-this-command-hook (quote (ignore))))
(eshell-condition-case err (prog1 (eshell-named-command "cd" (list
"etc")) (run-hooks (quote eshell-this-command-hook))) (error
(run-hooks (quote eshell-this-command-hook)) (eshell-errorn
(error-message-string err)) (eshell-close-handles 1))))

  (eshell-trap-errors (eshell-named-command "cd" (list "etc")))

  (progn (eshell-trap-errors (eshell-named-command "cd" (list "etc"))))

  (catch (quote top-level) (progn (eshell-trap-errors
(eshell-named-command "cd" (list "etc")))))

  (progn (run-hooks (quote eshell-pre-command-hook)) (catch (quote
top-level) (progn (eshell-trap-errors (eshell-named-command "cd" (list
"etc"))))) (run-hooks (quote eshell-post-command-hook)))

  (let ((eshell-current-handles (eshell-create-handles t (quote
append))) eshell-current-subjob-p) (progn (run-hooks (quote
eshell-pre-command-hook)) (catch (quote top-level) (progn
(eshell-trap-errors (eshell-named-command "cd" (list "etc")))))
(run-hooks (quote eshell-post-command-hook))))

  (eshell-commands (progn (run-hooks (quote eshell-pre-command-hook))
(catch (quote top-level) (progn (eshell-trap-errors
(eshell-named-command "cd" (list "etc"))))) (run-hooks (quote
eshell-post-command-hook))))

  eval((eshell-commands (progn (run-hooks (quote
eshell-pre-command-hook)) (catch (quote top-level) (progn
(eshell-trap-errors (eshell-named-command "cd" (list "etc")))))
(run-hooks (quote eshell-post-command-hook)))))

  eshell-send-input(nil)

  funcall-interactively(eshell-send-input nil)

  call-interactively(eshell-send-input nil nil)

  command-execute(eshell-send-input)


I get the same error message if I try the following from the *scratch*

buffer:


(cd "/plink:mysrv:/") ; --> "/plink:mysrv:/"

(cd "etc") ; --> (error "No such directory found via CDPATH
environment variable")

(getenv "CDPATH") ; --> nil


If I change the error message in the cd function (files.el) to look like

the following


(error "No such directory '%s' found via CDPATH environment variable
'%s'" dir cd-path)


then it returns


No such directory ’etc’ found via CDPATH environment variable ’(./)’"


expand-file-name returns a path beginning with "c:" if the second arg

is "./" .


default-directory ; --> "/plink:mysrv:/"

(expand-file-name "etc") ; --> "/plink:mysrv:/etc"

(expand-file-name "etc" default-directory) ; --> "/plink:mysrv:/etc"

(expand-file-name "etc" "./") ; --> "c:/plink:mysrv:/etc"


Regards,

Gary O'Sullivan


In GNU Emacs 25.1.1 (i686-w64-mingw32)

 of 2016-09-17 built on LAPHROAIG

Windowing system distributor 'Microsoft Corp.', version 6.1.7601

Configured using:

 'configure --host=i686-w64-mingw32 --without-dbus

 --without-compress-install CFLAGS=-static'


Configured features:

XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB

TOOLKIT_SCROLL_BARS


Important settings:

  value of $LANG: ENI

  locale-coding-system: cp1252


Major mode: EShell


Minor modes in effect:

  shell-dirtrack-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


Recent messages:

Checking for load-path shadows...done

You can run the command ‘report-emacs-bug’ with M-x r-em RET

Checking for load-path shadows...done

Auto-saving...

previous-line: Beginning of buffer [4 times]

Quit

Making completion list...

Type "q" in help window to restore its previous buffer, C-M-v to scroll help.

previous-line: Beginning of buffer [7 times]

Auto-saving...done

previous-line: Beginning of buffer


Load-path shadows:

None found.


Features:

(pp shadow sort mail-extr emacsbug message dired rfc822 mml mml-sec epg

epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev

gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils

eieio-opt speedbar sb-image ezimage dframe find-func debug browse-url

misearch multi-isearch goto-addr thingatpt noutline outline easy-mmode

view info tramp-cache tramp-sh tramp tramp-compat auth-source cl-seq

eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core cl-macs

gv gnus-util mm-util help-fns help-mode mail-prsvr password-cache

tramp-loaddefs trampver ucs-normalize shell format-spec advice em-unix

em-term term easymenu ehelp em-script em-prompt em-ls cl-loaddefs pcase

cl-lib em-hist em-pred em-glob em-dirs em-cmpl em-basic em-banner

em-alias pcomplete comint ansi-color ring esh-var esh-io esh-cmd esh-opt

esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util

time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks

lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars

term/common-win tool-bar dnd fontset image regexp-opt fringe

tabulated-list newcomment elisp-mode lisp-mode prog-mode register page

menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock

syntax facemenu font-core frame 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 charscript case-table epa-hook jka-cmpr-hook help

simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces

cus-face macroexp files text-properties overlay sha1 md5 base64 format

env code-pages mule custom widget hashtable-print-readable backquote

w32notify w32 multi-tty make-network-process emacs)


Memory information:

((conses 8 284646 29342)

 (symbols 32 25672 0)

 (miscs 32 136 657)

 (strings 16 40747 7070)

 (string-bytes 1 1129305)

 (vectors 8 41992)

 (vector-slots 4 796865 14244)

 (floats 8 308 374)

 (intervals 28 5839 89)

 (buffers 520 27))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24787; Package emacs. (Mon, 24 Oct 2016 23:22:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: "Gary O'Sullivan" <gary5000 <at> gmail.com>
Cc: 24787 <at> debbugs.gnu.org
Subject: Re: bug#24787: 25.1;
 eshell cd not changing directory on remote path (windows-nt)
Date: Mon, 24 Oct 2016 19:21:00 -0400
On Mon, Oct 24, 2016 at 7:03 PM, Gary O'Sullivan <gary5000 <at> gmail.com> wrote:
> Run runemacs.exe -Q
>
> M-x eshell
>
> Welcome to the Emacs shell
>
>
> c:/software/emacs/bin $ cd /plink:mysrv:/
>
> /plink:mysrv:/home/gary/ $ cd etc
>
> No such directory found via CDPATH environment variable
>
> /plink:mysrv:/home/gary/ $ cd /plink:mysrv:/etc
>
> /plink:mysrv:/etc $


Wouldn't the corresponding relative path for this be ../../etc? (I'm
assuming cd /plink:mysrv:/home/gary/etc doesn't work)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24787; Package emacs. (Tue, 25 Oct 2016 21:03:01 GMT) Full text and rfc822 format available.

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

From: Gary O'Sullivan <gary.osullivan <at> iol.ie>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>,
 Gary O'Sullivan <gary5000 <at> gmail.com>
Cc: 24787 <at> debbugs.gnu.org
Subject: Re: bug#24787: 25.1; eshell cd not changing directory on remote path
 (windows-nt)
Date: Tue, 25 Oct 2016 21:44:51 +0100
On 25/10/16 00:21, Noam Postavsky wrote:
> On Mon, Oct 24, 2016 at 7:03 PM, Gary O'Sullivan <gary5000 <at> gmail.com> wrote:
>> Run runemacs.exe -Q
>>
>> M-x eshell
>>
>> Welcome to the Emacs shell
>>
>>
>> c:/software/emacs/bin $ cd /plink:mysrv:/
>>
>> /plink:mysrv:/home/gary/ $ cd etc
>>
>> No such directory found via CDPATH environment variable
>>
>> /plink:mysrv:/home/gary/ $ cd /plink:mysrv:/etc
>>
>> /plink:mysrv:/etc $
>
> Wouldn't the corresponding relative path for this be ../../etc? (I'm
> assuming cd /plink:mysrv:/home/gary/etc doesn't work)

The output from the ls command looks ok, I can see the etc directory but 
pwd/cd seems to be confused. If I go directly to 
"/plink:mysrv:/home/gary" I can list the files in my home directory but 
cd is still not working.

c:/software/emacs/bin $ cd /plink:mysrv:/
/plink:mysrv:/home/gary/ $ pwd
/plink:mysrv:/home/gary/
/plink:mysrv:/home/gary/ $ ls
bin   dev  home  lib64       media  mnt  opt   root  selinux  sys usr
boot  etc  lib   lost+found  misc   net  proc  sbin  srv      tmp var
/plink:mysrv:/home/gary/ $ cd etc
No such directory found via CDPATH environment variable
/plink:mysrv:/home/gary/ $ cd /plink:mysrv:/home/gary
/plink:mysrv:/home/gary $ pwd
/plink:mysrv:/home/gary
/plink:mysrv:/home/gary $ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates Videos
/plink:mysrv:/home/gary $ cd Documents
No such directory found via CDPATH environment variable
/plink:mysrv:/home/gary $ cd ..
No such directory found via CDPATH environment variable
/plink:mysrv:/home/gary $ pwd
/plink:mysrv:/home/gary
/plink:mysrv:/home/gary $ cd ../../etc
No such directory found via CDPATH environment variable
/plink:mysrv:/home/gary $






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24787; Package emacs. (Sun, 30 Oct 2016 20:14:02 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Gary O'Sullivan <gary5000 <at> gmail.com>
Cc: 24787 <at> debbugs.gnu.org
Subject: Re: bug#24787: 25.1; eshell cd not changing directory on remote path
 (windows-nt)
Date: Sun, 30 Oct 2016 20:12:55 +0000
On Tue, Oct 25, 2016 at 12:03:28AM +0100, Gary O'Sullivan wrote:
> On Windows I can change remote directories in eshell via absolute paths
> 
> but using relative paths return an error message "No such directory
> 
> found via CDPATH environment variable".

I can confirm I see this on my work’s Windows 10 PC using Emacs 25.1.
-- 
Alan Third




Forcibly Merged 24787 33791. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 22 Dec 2018 18:51:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 27 Jan 2019 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 87 days ago.

Previous Next


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