Mike,
Thanks for replying.
On 12/19/05, Michael Sperber <sperber(a)informatik.uni-tuebingen.de> wrote:
Vin Shelton <acs(a)xemacs.org> writes:
> As far as I understand, assuming I want the users to be able to
> install to arbitrary locations, I can fix this in either of 2 ways:
> 1) I can install the packages underneath the 21.4.18 hierarchy or
> 2) I can set EMACSPACKAGEPATH (either through the registry or an
> environment variable) to point to the package hierarchy.
> Both of those solutions are slightly problematic from my point of
> view: #1 is kind of aesthetically yucky (the packages and the core are
> distinct and I don't want to install my packages underneath my core)
> and besides, I'd like to be able to install multiple cores (21.4.18,
> 21.4.19 and 21.5.b23, for instance) in parallel directories and not
> force each one to have its own package tree. #2 currently does not
> seem to work identically for 21.4 and 21.5 - "xemacs-packages" gets
> appended to EMACSPACKAGEPATH for 21.4 but not for 21.5.
Do you mean that "xemacs-packages" *needs* to be appended ...? If so,
there's something funky here.
Yes, 21.4 automatically appends "xemacs-packages" to the
EMACSPACKAGEPATH, but 21.5 does not at least under Windows. More
specifically, for two identically-configured XEmacsen, the commands
required to find the lisp code which lives in
e:\XEmacs\Packages\xemacs-packages\lisp differ:
EMACSPACKAGEPATH='e:\XEmacs\Packages\xemacs-packages'
~e/acs/test/xemacs-21.5-installed/i586-pc-win32/xemacs.exe
is required for 21.5, and
EMACSPACKAGEPATH='e:\XEmacs\Packages'
~e/acs/test/xemacs-21.4-installed/i586-pc-win32/xemacs.exe
is required for 21.4.
I think you still should try to convince XEmacs to find the packages
at run-time, based on where the executable is. That's generally the
most robust approach. The trick is to make it recognize a "root", and
the path-searching machinery will take over from there. You should
look at `paths-emacs-root-p' and `paths-find-emacs-root' for places to
tweak---this shouldn't be hard if you're just doing Windows and don't
have to worry about Unix. (We can sort all that out later.) In
particular, `paths-find-emacs-root' should probably go up at least two
directories.
I don't know if this helps---let me know if I can do more.
Here's what I've come up with. I'm not particularly happy with the
hygiene of the patch because:
1. I had to add the new defun paths-find-potential-package-root and
couldn't add that functionality into paths-find-emacs-root (maybe
that's OK)
2. in paths-find-emacs-roots I had to add another call to
paths-uniq-append and a temporary variable, combined-roots. It seems
I should have been able to just extend paths-uniq-append, but maybe
that's not a big deal, either.
Michael, if you don't mind, please help me clean this up - I'd be
grateful for any help you'd offer.
Thanks,
Vin