all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13625: 24.1; Enable 'package-menu-execute being non-interactive
@ 2013-02-03 23:49 Yves Baumes
  2013-02-04  3:39 ` Stefan Monnier
  2013-02-05 16:38 ` bug#13625: Rép : " Yves Baumes
  0 siblings, 2 replies; 9+ messages in thread
From: Yves Baumes @ 2013-02-03 23:49 UTC (permalink / raw)
  To: 13625

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






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-02-13  5:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-03 23:49 bug#13625: 24.1; Enable 'package-menu-execute being non-interactive Yves Baumes
2013-02-04  3:39 ` Stefan Monnier
2013-02-04 11:18   ` Yves Baumes
2013-02-04 15:13     ` Stefan Monnier
2013-02-04 17:59       ` Yves Baumes
2013-02-04 19:44         ` Stefan Monnier
2013-02-04 22:09           ` Yves Baumes
2013-02-05 16:38 ` bug#13625: Rép : " Yves Baumes
2013-02-13  5:01   ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.