On Aug 19, 2012 11:50 PM, "YAMAMOTO Mitsuharu" <mituharu@math.s.chiba-u.ac.jp> wrote:
>
> >>>>> On Sun, 19 Aug 2012 22:36:12 +0800, Chong Yidong <cyd@gnu.org> said:
>
> > Óscar Fuentes <ofv@wanadoo.es> writes:
> >> Confirmed. This is Kubuntu 12.04 64 bits (a real machine, no
> >> VMWare):
> >>
> >> tar xzf emacs-24.2-rc1.tar.gz cd emacs-24.2 ./configure
> >> --prefix=/home/oscar/em-24.2 make -j4 make install cd ~/em-24.2/bin
> >> emacs -Q M-x eshell
> >>
> >> Welcome to the Emacs shell
> >>
> >> ~/em-24.2/bin $ cd usage: cd: (DIR)
>
> > I still can't reproduce the problem.  I'm also on Ubuntu 12.04.
>
> This seems to be dependent on the given prefix name.  $HOME/em-24.2
> shows the problem, but $HOME/ema-24.2 does not.
>
> The relevant part would be the regular expression below:
>
> (defun eshell-find-alias-function (name)
>   "Check whether a function called `eshell/NAME' exists."
>   (let* ((sym (intern-soft (concat "eshell/" name)))
>          (file (symbol-file sym 'defun)))
>     ;; If the function exists, but is defined in an eshell module
>     ;; that's not currently enabled, don't report it as found
>     (if (and file
>              (string-match "\\(em\\|esh\\)-\\(.*\\)\\(\\.el\\)?\\'" file))
>         (let ((module-sym
>                (intern (file-name-sans-extension
>                         (file-name-nondirectory
>                          (concat "eshell-" (match-string 2 file)))))))
>           (if (and (functionp sym)
>                    (or (null module-sym)
>                        (eshell-using-module module-sym)
>                        (memq module-sym (eshell-subgroups 'eshell))))
>               sym))
>       ;; Otherwise, if it's bound, return it.
>       (if (functionp sym)
>           sym))))
>
> Maybe we can use \\([^/\n]*\\) (or include more separators for DOS or
> Windows?) instead of \\(.*\\) .
>
>                                      YAMAMOTO Mitsuharu
>                                 mituharu@math.s.chiba-u.ac.jp
>

Thanks. It works when I change the prefix directory to start with ema-

Raj