all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 15417@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	[thread overview]
Message-ID: <CAO9XsiSH+3EUL9C7XH9t3NLFQVCD7avs=whHXFWgmdw+Y4pc=Q@mail.gmail.com> (raw)
In-Reply-To: <jwvpprvvg9c.fsf-monnier+emacsbugs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]

> > 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@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
>

[-- Attachment #2: Type: text/html, Size: 2867 bytes --]

  reply	other threads:[~2013-10-02 13:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 10:55 bug#15417: (compile "cd /u*r && ... cd: No such directory found via CDPATH environment variable jidanni
2013-09-25  5:44 ` Kevin Rodgers
2013-09-25 17:06   ` Stefan Monnier
2013-09-26  5:45     ` Kevin Rodgers
2013-09-26 13:56       ` Stefan Monnier
2013-10-02 13:41         ` Kevin Rodgers [this message]
2013-10-02 23:35           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO9XsiSH+3EUL9C7XH9t3NLFQVCD7avs=whHXFWgmdw+Y4pc=Q@mail.gmail.com' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=15417@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.