Martin Buchholz <martin(a)xemacs.org> writes in xemacs-beta(a)xemacs.org:
>>>>> "SL" == SL Baur
<steve(a)xemacs.org> writes:
...
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.
That's not a case I'm concerned about. The user is always allowed to
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?
This doesn't solve the right problem.
In the case I'm citing, tmdecode and mmencode don't live in the same
directory. tmdecode lives in the xemacs-packages lib-src directory,
and mmencode lives in the XEmacs core lib-src directory. Taking the
full path to tmdecode is not going to help one bit about finding
mmencode[1]. Both need to be exported via $PATH, IMO.
Footnotes:
[1] Which shouldn't be included with XEmacs anyway, but here we are.