> Kevin Ryde <[EMAIL PROTECTED]> wrote:
 > 
 > > It'd be nice if M-x apt-utils-show-package, when it prompts for a
 > > package name, didn't build the list of possible names until you
 > > hit tab or whatever to try to complete from among them.  The
 > > apt-cache program, or whatever builds the list, is very slow on
 > > my system and it's good to get the prompt without doing that,
 > > since of course you can type a package name without using the
 > > completions.  The few lines below work for me, using a
 > > completions handler function.

>>>>> Peter Galbraith writes:

 > I don't know whether you are subscribed to the package to receive
 > bug emails, but this is interesting.

Hi Peter,

I'm not opposed to something like the above, but it only delays the
pain of building the package lists until the package name is entered.

However, I notice at least two problems with the patch as it stands:

  (1) Entering an invalid package name for which there is a valid
  completion, e.g., M-x apt-utils-show-package RET foo RET results in
  a message to rebuild the package lists.

  (2) If the package lists become outdated (maybe an `apt-get update'
  has been run; simulate by touching apt-utils-timestamped-file,
  /var/cache/apt/pkgcache.bin), then apt-utils-show-package leads to
  an error like:

    Debugger entered--Lisp error: (error "Command attempted to use minibuffer 
while in minibuffer")
      yes-or-no-p("APT package lists may be out of date. Update them? ")
      (if apt-utils-automatic-update-asked nil (setq 
apt-utils-automatic-update-asked t) (yes-or-no-p "APT package lists may be out 
of date. Update them? "))
      (unless apt-utils-automatic-update-asked (setq 
apt-utils-automatic-update-asked t) (yes-or-no-p "APT package lists may be out 
of date. Update them? "))
      (cond ((eq apt-utils-automatic-update t)) ((eq apt-utils-automatic-update 
...) (unless apt-utils-automatic-update-asked ... ...)))
      (and (apt-utils-packages-needs-update) apt-utils-automatic-update (cond 
(...) (... ...)))
      (cond ((null apt-utils-package-list-built) 
(apt-utils-build-package-list)) ((and ... apt-utils-automatic-update ...) 
(apt-utils-build-package-list t)))
      apt-utils-check-package-lists()

Thanks,
Matt



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to