[ Followups redirected from xemacs-patches to xemacs-beta. ]
greg(a)alphatech.com (Greg Klanderman) wrote:
I've added a few enhancements to package-ui.el. I'm not sure
these
are the best ways to add this functionality, but I think these things
are sorely needed in some form or another. Darryl, please let me know
what you think about this.
The patch adds the following features:
* M-x pui-list-packages now takes a prefix argument. With the
prefix argument, it prompts for a package-get-base.el filename
(using a sane default) which it then loads before doing anything
else.
Could you please separate the code that grabs the new
package-get-base.el into a separate function (in package-admin.el or
package-get.el -- and not package-ui.el)? Reasons:
* Sometimes you just want to update package-get-base.el.
* People who access these functions via menu picks cannot specify a
prefix (there's no way to specify a prefix using menu picks). We'll
probably have to provide a separate (?) menu pick that updates
package-get-base.el, and maybe yet-another-menu-pick (ugh) that
updates package-get-base.el before entering the visual package
installer.
Maybe it should just always do this?
Dunno. I can think of reasons to do it, and reasons to not do it.
* In the *Packages* buffer, `x' (pui-install-selected-packages)
now
takes a prefix argument for whether to also update the packages
required by those you are updating. The variable
pui-default-fetch-requires controls the default and is t by default.
This is fine for an interim (temporary) solution, but what we
really need is for the installer to (optionally) auto-select all
dependent packages (and make it stop automatically grabbing the
dependent packages without telling the user). That way the user can see
everything that will be installed, and he can then manually unselect
anything that he doesn't want (with a suitable warning message when
unselecting dependent packages). If this is done, we'd only have to
call `package-get' instead of `package-get-all'.
* In the *Packages* buffer, `x' (pui-install-selected-packages)
now
prompts for the directory in which to install packages, after
confirming that you'd like to install the selected packages.
This feature needs to be added, but your implementation has
potential problems:
* The package install directory information needs to be managed by
package-admin.el. It's best if all the directory information is
maintained by one module.
* Do we really want to allow installations into arbitrary directories
(that is, ones which will NOT be located by XEmacs' automatic package
path finder)? This is an issue for novice users. Personally, I think
we should restrict package installations to specific "system"
locations (e.g., to the package-paths specified at configure time) or
to the user-local location ("~/.xemacs/packages"???). Creating a good
user-interface for this is a pain, though, and so we might want to
just settle for some kind of warning if the user enters a "bad" path.
The remaining issue for me is that if I have a newer version of a
package installed than in package-get-base, it will happily overwrite
it with the older version. Being able to disable installation of
This sounds like a bug. Newer versions should never be overwritten
with an older one (well, maybe we should provide yet another prefix
arg/variable that forces an installation for advanced users).
--
Darryl Okahata
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.