[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Environment variable in .prj file
From: |
Simon Wright |
Subject: |
Environment variable in .prj file |
Date: |
Fri, 24 Jul 2020 09:23:08 +0100 |
$HOME is /Users/simon. In /Users/simon/coldframe/examples, I have a Wisi
project file Simple_Buttons_Scripting.prj:
gpr_file=Simple_Buttons_Scripting.gpr
gpr_project_path=..
gpr_project_path=$HOME/scripted_testing
gpr_project_path=$HOME/tcladashell
$BUILD=Debug
I'm 99.9% sure it used to work, but now the resulting project file search path
is
/Users/simon/coldframe
/Users/simon/coldframe/examples/$HOME/scripted_testing
/Users/simon/coldframe/examples/$HOME/tcladashell
whereas I was expecting/hoping it'd be
/Users/simon/coldframe
/Users/simon/scripted_testing
/Users/simon/tcladashell
I tried using ${HOME}, no difference (except that the search path now shows the
{}).
This is with 7.1.3 from git, commit 30b8ea0d3d673b50e8feeabbde7355d87b87c923 of
Thu Jun 4 15:19:17 2020 -0700
I'm sure I've missed something, but is there a way of completely wiping out all
traces of current projects? At the moment I have to stop/restart emacs
LATER
I made this experimental change
======================================
diff --git a/gnat-core.el b/gnat-core.el
index 5901b223..be008baa 100644
--- a/gnat-core.el
+++ b/gnat-core.el
@@ -86,8 +86,10 @@ Throw an error if current project does not have a
gnat-compiler."
;; We maintain two project values for this;
;; project-path - a list of directories, for elisp find file
;; GPR_PROJECT_PATH in environment, for gnat-run
- (let ((process-environment (copy-sequence (wisi-prj-file-env project))))
- (cl-pushnew dir (gnat-compiler-project-path compiler) :test #'string-equal)
+ (let ((process-environment (copy-sequence (wisi-prj-file-env project)))
+ (d (substitute-in-file-name dir)))
+ (message "adding project dir %s (was %s)" d dir)
+ (cl-pushnew d (gnat-compiler-project-path compiler) :test #'string-equal)
(setenv "GPR_PROJECT_PATH"
(mapconcat 'identity
======================================
but the messages are
adding project dir /Users/simon/coldframe/examples/$HOME/tcladashell (was
/Users/simon/coldframe/examples/$HOME/tcladashell)
adding project dir /Users/simon/coldframe/examples/$HOME/scripted_testing (was
/Users/simon/coldframe/examples/$HOME/scripted_testing)
adding project dir /Users/simon/coldframe (was /Users/simon/coldframe)
so something wrong with environment vars?
- Environment variable in .prj file,
Simon Wright <=