GNU bug report logs - #15417
(compile "cd /u*r && ... cd: No such directory found via CDPATH environment variable

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Thu, 19 Sep 2013 10:58:02 UTC

Severity: minor

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15417 <at> debbugs.gnu.org
Subject: bug#15417: (compile "cd /u*r && ... cd: No such directory found via CDPATH environment variable
Date: Wed, 2 Oct 2013 07:41:04 -0600
[Message part 1 (text/plain, inline)]
> > Seems like after extracting the <blabla> arg and substituting the values
> > of any referenced environment variables (already implemented by the
> > current hack), you could pass the result to file-expand-wildcards.  Then
> > check that there is only a single directory in the result, and pass that
> > directory to `cd'.
>
> Indeed.  Could you take care of it?

Sure, sorry for the delay:

**** compile.el~    Fri Jan 21 18:08:13 2011
--- compile.el    Wed Oct  2 07:25:47 2013
***************
*** 1217,1223 ****
      ;; sh -c "cd ..; make"
      (cd (if (string-match "^\\s *cd\\(?:\\s +\\(\\S +?\\)\\)?\\s *[;&\n]"
command)
          (if (match-end 1)
!             (substitute-env-vars (match-string 1 command))
            "~")
            default-directory))
      (erase-buffer)
--- 1217,1229 ----
      ;; sh -c "cd ..; make"
      (cd (if (string-match "^\\s *cd\\(?:\\s +\\(\\S +?\\)\\)?\\s *[;&\n]"
command)
          (if (match-end 1)
!             (let* ((substituted-dir
!                 (substitute-env-vars (match-string 1 command)))
!                (expanded-dir
!                 (file-expand-wildcards substituted-dir)))
!               (if (= (length expanded-dir) 1)
!               (car expanded-dir)
!             substituted-dir))
            "~")
            default-directory))
      (erase-buffer)

-- 
Kevin Rodgers
Denver, Colorado


>
>
>         Stefan
>



On Thu, Sep 26, 2013 at 7:56 AM, Stefan Monnier <monnier <at> iro.umontreal.ca>wrote:

> > Seems like after extracting the <blabla> arg and substituting the values
> > of any referenced environment variables (already implemented by the
> > current hack), you could pass the result to file-expand-wildcards.  Then
> > check that there is only a single directory in the result, and pass that
> > directory to `cd'.
>
> Indeed.  Could you take care of it?
>
>
>         Stefan
>
[Message part 2 (text/html, inline)]

This bug report was last modified 11 years and 239 days ago.

Previous Next


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