>>>> "SL" == SL Baur <steve(a)xemacs.org>
writes:
SL> Martin Buchholz <martin(a)xemacs.org> writes in xemacs-beta(a)xemacs.org:
>>
>>>> "SL" == SL Baur
<steve(a)xemacs.org> writes:
SL> ...
SL> Shouldn't lib-src directories also get appended to $PATH? It makes
SL> the above problem go away.
> No.
> The dot files for the shell could just re-munge your PATH back
> anyways.
SL> That's not a case I'm concerned about. The user is always allowed to
SL> shoot himself in the foot and it isn't our problem.
> A Posix shell looks for $ENV.
> I tried to solve this problem in the distant past by adding this
hack
> to all the scripts in lib-src:
> PATH=${PATH:-/usr/bin:/bin}:`dirname $0 2>/dev/null`; export
PATH
> This hack requires that $0 contain the full path to the script,
and
> that dirname exists. Why would this this not be the case?
SL> This doesn't solve the right problem.
SL> In the case I'm citing, tmdecode and mmencode don't live in the same
SL> directory. tmdecode lives in the xemacs-packages lib-src directory,
SL> and mmencode lives in the XEmacs core lib-src directory. Taking the
SL> full path to tmdecode is not going to help one bit about finding
SL> mmencode[1]. Both need to be exported via $PATH, IMO.
They used to live in the same directory, and the old code worked. I
veto changing PATH, since this is a user-controlled variable that we
should avoid changing if at all possible. Please find some other way
to solve this problem, especially given that the directory
reorganization initiative has broken this.
Observe also that the old code would invoke the user's mmencode, if
installed earlier in the user's PATH. Presumably he would want that
one invoked.
Martin