From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs 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-ID: References: <87txhhf5ce.fsf@jidanni.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bdc085085fcd404e7c23838 X-Trace: ger.gmane.org 1380721342 12632 80.91.229.3 (2 Oct 2013 13:42:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Oct 2013 13:42:22 +0000 (UTC) Cc: 15417@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 02 15:42:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VRMgy-00059L-F6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Oct 2013 15:42:16 +0200 Original-Received: from localhost ([::1]:36197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRMgx-0006lm-OC for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Oct 2013 09:42:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRMgp-0006f8-L8 for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2013 09:42:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRMgk-0002Z5-Lx for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2013 09:42:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRMgk-0002Z1-Hu for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2013 09:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VRMgj-0004Z6-To for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2013 09:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Rodgers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Oct 2013 13:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15417 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15417-submit@debbugs.gnu.org id=B15417.138072127017489 (code B ref 15417); Wed, 02 Oct 2013 13:42:01 +0000 Original-Received: (at 15417) by debbugs.gnu.org; 2 Oct 2013 13:41:10 +0000 Original-Received: from localhost ([127.0.0.1]:49269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRMft-0004Y1-Um for submit@debbugs.gnu.org; Wed, 02 Oct 2013 09:41:10 -0400 Original-Received: from mail-qe0-f41.google.com ([209.85.128.41]:57579) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRMfp-0004Xq-CB for 15417@debbugs.gnu.org; Wed, 02 Oct 2013 09:41:05 -0400 Original-Received: by mail-qe0-f41.google.com with SMTP id 1so540344qee.0 for <15417@debbugs.gnu.org>; Wed, 02 Oct 2013 06:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MK8DIHViLD3JLuCr9XlLrkMlw+XlB0YX+cBGzWJAn8Y=; b=vVuRFn33z7KlUjAFp9oq0v0Aq+KUr6RIFhZXHMLyJZzoYyZFqihSef/Q25cgshBeC3 ev6fsPAeUvtBcaov0RwFltAqmXt+is0YIfrjVcy2pkAgVowLZNTwQ0rTKcUSW31qHbzf IXEexeXMCItP4rQtAuHgLTLIkzLsMWftFQ9VD82Cz+J3+/Xa+7GcIwUsOSyn+LdCP+75 4MhmQU7chu+YXGHotaWQqOXpdIZkAA1aSIxZWMrRrYGZ8MDPJ9AO9rOqH40vZrleMYL2 XN/HwVJTSzkin+iNfufX/peNU0GqtUurMUaSkYa6tKfn/LGvztb+GAJMVJQuK+Lg/uMG h10w== X-Received: by 10.49.27.137 with SMTP id t9mr2811557qeg.70.1380721264811; Wed, 02 Oct 2013 06:41:04 -0700 (PDT) Original-Received: by 10.49.128.4 with HTTP; Wed, 2 Oct 2013 06:41:04 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78865 Archived-At: --047d7bdc085085fcd404e7c23838 Content-Type: text/plain; charset=ISO-8859-1 > > Seems like after extracting the 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 wrote: > > Seems like after extracting the 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 > --047d7bdc085085fcd404e7c23838 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
> > Seems like after extracting the <blabla> a= rg and substituting the values
> > of any referenced environment v= ariables (already implemented by the
> > current hack), you could = pass the result to file-expand-wildcards.=A0 Then
> > check that there is only a single directory in the result, and pa= ss that
> > directory to `cd'.
>
> Indeed.=A0 Cou= ld you take care of it?

Sure, sorry for the delay:

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

--
Kevin Rodgers
Denver= , Colorado



=A0 =A0 =A0 =A0 Stefan



On Thu, Sep 26, 2013 at 7:56 AM, Stefan= Monnier <monnier@iro.umontreal.ca> wrote:
> Seems like after extracting the <bla= bla> 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. =A0= Then
> check that there is only a single directory in the result, and pass th= at
> directory to `cd'.

Indeed. =A0Could you take care of it?


=A0 =A0 =A0 =A0 Stefan

--047d7bdc085085fcd404e7c23838--