GNU bug report logs -
#13625
24.1; Enable 'package-menu-execute being non-interactive
Previous Next
Reported by: Yves Baumes <ybaumes <at> gmail.com>
Date: Mon, 4 Feb 2013 00:20:02 UTC
Severity: normal
Found in version 24.1
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
I was trying to make a little program to upgrade automatically my
packages archives. Basically something looking like that:
(progn
(list-packages)
(with-current-buffer "*Packages*"
(package-menu-mark-upgrades)
(package-menu-execute)
(kill-buffer)))
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))
(yes-or-no-p
...
;; Delete packages, prompting if necessary.
(when delete-list
(if (or
(not (called-interactively-p 'any))
(yes-or-no-p
...
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?
Regards
Yves
This bug report was last modified 12 years and 187 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.