From: Yves Baumes <ybaumes@gmail.com>
To: 13625@debbugs.gnu.org
Subject: bug#13625: 24.1; Enable 'package-menu-execute being non-interactive
Date: Mon, 04 Feb 2013 00:49:08 +0100 [thread overview]
Message-ID: <m27gmp3qmj.fsf@gmail.com> (raw)
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
next reply other threads:[~2013-02-03 23:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-03 23:49 Yves Baumes [this message]
2013-02-04 3:39 ` bug#13625: 24.1; Enable 'package-menu-execute being non-interactive 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m27gmp3qmj.fsf@gmail.com \
--to=ybaumes@gmail.com \
--cc=13625@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.