GNU bug report logs - #13625
24.1; Enable 'package-menu-execute being non-interactive

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#13625: closed (24.1; Enable 'package-menu-execute being
 non-interactive)
Date: Wed, 13 Feb 2013 05:03:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 13 Feb 2013 00:01:26 -0500
with message-id <9ozjz8vmc9.fsf_-_ <at> fencepost.gnu.org>
and subject line Re: bug#13625: 24.1; Enable 'package-menu-execute being non-interactive
has caused the debbugs.gnu.org bug report #13625,
regarding 24.1; Enable 'package-menu-execute being non-interactive
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
13625: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13625
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Yves Baumes <ybaumes <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1; Enable 'package-menu-execute being non-interactive
Date: Mon, 04 Feb 2013 00:49:08 +0100
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



[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 13625-done <at> debbugs.gnu.org
Subject: Re: bug#13625: 24.1;
	Enable 'package-menu-execute being non-interactive
Date: Wed, 13 Feb 2013 00:01:26 -0500
Version: 24.4

Thanks; applied.


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.