[ This is *not* being sent to xemacs-patch, as I'd like to get some
feedback and maybe fix up some things. A ChangeLog is not included
because this patch is still experimental. ]
This patch fixes the package-get routines to optionally look on a
local disk for packages. Basically, package-get-remote was modified to
allow for a system name of `nil', in which case the directory is taken
to be a local directory. This allows the user to set package-get-remote
in his .emacs file (for example):
(setq package-get-remote
'(
(nil "/my/local/directory")
(nil "~/local/package/dir") ; note: expansion is done
("ftp.xemacs.org"
"/pub/xemacs/beta/xemacs-21.0/packages/binary-packages")
))
This causes `package-get' to look in the local directories,
"/my/local/directory" and "~/local/package/dir", for packages. This
is
a big win for mswindows, as the user can then add a pathname to a CDROM
containing all of the packages.
I also enhanced most of the interactive functions to do package
completion; whenever you're queried for a package name, you can now do
completion.
Also, for mswindows users, `package-admin-add-binary-package' in
package-admin.el was modified to indirectly call an installation
function, to actually do the work of installing the package:
-------------------------------------------------------------------------------
(defvar package-admin-install-function 'package-admin-default-install-function
"The function to call to install a package.
Three args are passed: FILENAME PKG-DIR BUF
Install package FILENAME into directory PKG-DIR, with any messages output
to buffer BUF.")
-------------------------------------------------------------------------------
The default function preserves the existing functionality of
`package-admin-add-binary-package' (i.e., it calls "add-big-package.sh"
to do the actual work). The mswindows users can now set
`package-admin-default-install-function' to
`package-admin-install-function-mswindows', to install packages.
However, this function uses "djtar" to extract .tar.gz packages, and few
people have djtar (not to mention that cygwin users probably want to use
the Unix script). Perhaps this function should be deleted?
The patch is attached. Note that it's relative to the
xemacs-20/lisp directory (sorry about that).
Issues:
* I'm thinking that this is a 21.1 feature, as subprocesses are broken
on native Win95. It works under WinNT, as long as efs doesn't get
into the act.
* mswindows users need to be able to extract .tar.gz files. I'm using
djtar (a native Win32 version, and not a djgpp-compiled one); should
the code be using something better?
* What about cygwin folks?
* Should `package-admin-install-function' be dynamically set to use the
correct package extraction function? Right now, it's hard-coded to
`package-admin-default-install-function', but this is wrong for
mswindows users. What do cygwin folks want?
* Should I, or should I not submit this to xemacs-patches (properly
cleaned up, of course)?
Comments?
-- Darryl Okahata
Internet: darrylo(a)sr.hp.com
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Hewlett-Packard, or of the
little green men that have been following him all day.
Attachments:
- diffs.obj
(application/octet-stream — 11.4 KB)