Brian Elmegaard wrote:
> Rex Dieter <[EMAIL PROTECTED]> writes:
>
>
>>Understand that our motivations are entirely different, as my primary
>>intention is to create a package that *administrators* install that
>>users merely "use".
>
>
> I think I want this too. But, if the users want to install the
> software at home, how should they proceed?
Users should have admin access to their own/home machines, no?
>>My installer only looks in
>>%emacs_dir%\site-lisp
>>Program Files\Emacs\site-lisp
> I think it was confused by my existing emacs installation. I don't
> know how it could be however? I have no %emacs_dir% variable.
Not environment variable, but registry setting in
HKLM/Software/Gnu/Emacs
(or HKCU/Software/Gnu/Emacs if not admin)
> I think it's a great way to do it. But should
> Program Files\Emacs\site-lisp
> be either
> Program Files\Emacs\setup\site-lisp or Program
> Files\Emacs\emacs21.3\site-lisp?
>
> Is this what makes it fail as shown above?
Actually, any/all of those are used. (-:
See Emacs/Emacs-21.3/site-lisp/site-start.el
for what is auto-loaded. Currently I'm trying to use:
;; Rex's first/lame attempt to use relative paths for searching
;; site-lisp/site-start.d, based on w32-feeling setup code.
(let ((site-start-dir (expand-file-name (concat exec-directory
"../site-lisp/site-start.d"))))
(when (file-accessible-directory-p site-start-dir)
(mapc 'load
(directory-files site-start-dir1 t "\\.el\\'")) ))
(let ((site-start-dir (expand-file-name (concat exec-directory
"../../site-lisp/site-start.d"))))
(when (file-accessible-directory-p site-start-dir)
(mapc 'load
(directory-files site-start-dir2 t "\\.el\\'")) ))
;; load ".el" files in "%PROGRAMFILES%/Emacs/site-lisp/site-start.d/" on
startup
(mapc 'load
(directory-files "c:/Program Files/Emacs/site-lisp/site-start.d" t
"\\.el\\'"))
For this last bit, perhaps a lisp guru here can help me try to use the
env variable %PROGRAMFILES% or at least %SYSTEMDRIVE% instead of
hard-coding c:/Program Files.
>>The latter being pretty much absolutely required (IMO), so that add-on
>>packages can have a known-ahead-of-time location to install lisp
>>packages and startup/inits in site-start.d.
>
>
> Will it work if users cannot write in Program Files\Emacs\site-lisp?
It should work, just don't install the optional "Global site-lisp" bit
(ie, do a "Custom" install)
-- Rex