[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13625: 24.1; Enable 'package-menu-execute being non-interactive

From: Yves Baumes
Subject: bug#13625: 24.1; Enable 'package-menu-execute being non-interactive
Date: Mon, 04 Feb 2013 00:49:08 +0100


I was trying to make a little program to upgrade automatically my
packages archives. Basically something looking like that:

  (with-current-buffer "*Packages*"

The 'package-menu-execute implementation relies on the user to,
interactively, answer yes-or-no to a question asking him to confirm
he wants to upgrade the packages needing an upgrade.

Well, from my point of view the implementation must be silent when
called non interactively. And proceed with the packages upgrades.

Here is a modification that I made that suit my needs:

(defun package-menu-execute ()
    (when install-list
      (if (or
           (not (called-interactively-p 'any))
    ;; Delete packages, prompting if necessary.
    (when delete-list
      (if (or
           (not (called-interactively-p 'any))

Then, first, I am a newbie in Emacs Lisp modifications. Secondly, the
changelog suggests that package.el has not been modified for a while
ago. Since I could not believe I would be the first needing that
modification in five years, I guess that I maybe wrong somewhere, and
that there must be an easier way to perform what I am trying to do. Then
my question is basically what is a correct behavior according to you and
is my "solution" acceptable?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]