unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Yves Baumes <ybaumes@gmail.com>
Cc: 13625@debbugs.gnu.org
Subject: bug#13625: 24.1; Enable 'package-menu-execute being non-interactive
Date: Sun, 03 Feb 2013 22:39:43 -0500	[thread overview]
Message-ID: <jwvy5f43g1n.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m27gmp3qmj.fsf@gmail.com> (Yves Baumes's message of "Mon, 04 Feb 2013 00:49:08 +0100")

> Well, from my point of view the implementation must be silent when
> called non interactively.

As a general rule, I tend to agree.

> 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
> ...

Better would be to move those questions to the `interactive' spec, so
you don't even need called-interactively-p.

But you'd also want to check if there are callers of this function that
would need to be adjusted.


        Stefan





  reply	other threads:[~2013-02-04  3:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy5f43g1n.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=13625@debbugs.gnu.org \
    --cc=ybaumes@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).