greg(a)alphatech.com (Greg Klanderman) writes:
It just seems the default behavior should favor keeping a less
experienced user from shooting himself in the foot. Usually when you
use pui-list-packages you want to install new packages. You should
get the current list.
I have just slept some more on this.
I think
1. Signalling an error is bad. Getting possibly outdated data is not a
fatal thing. Erroring out just scares people away.
2. Solving it in package get.el is too low level.
It is clear that there should be an indication to the user that he
is using a _possibly_[1] outdated database. However when the warning
should come is more of a user interface issue so we should solve it at
that level.
What about
1. _Warning_ the user at the start of pui-list-package that the
database could be outdated, ussing `message' not `error'. Also
stick this warning at the top of the *Packages* buffer.
2. Offer to update the database (and if a there is a pui-list-package
buffer update that) after the user uses "Add Download site".
No, pui-list-packages does (package-get-require-base t) so it thinks
it already has gotten an up to date package index, when in fact it
loaded the one from the etc directory, and has set package-get-was-current
to true.
Then that is a bug and either
a1. Setting package-get-was-current needs to be somewhat deeper in
the code.
a2. package-get-was-current never should be set when
package-get-remote is nil.
b. When changing package-get-remote either using the menu or using
custom package-get-was-current should be set back to nil.
I think a combination of a2 and b would preferable now.
Jan
Footnotes:
[1] Remember, the code will offer to save the database locally after
updating it.
--
Jan Vroonhof
http://www.math.ethz.ch/~vroonhof/
Mathematik, vroonhof @ math.ethz.ch
HG E16, ETH-Zentrum, Tel: +41-1-6325456/25154
Raemistrasse 101, CH-8092 Zuerich. Fax: +41-1-6321085