From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13625: 24.1; Enable 'package-menu-execute being non-interactive Date: Sun, 03 Feb 2013 22:39:43 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359949266 21787 80.91.229.3 (4 Feb 2013 03:41:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2013 03:41:06 +0000 (UTC) Cc: 13625@debbugs.gnu.org To: Yves Baumes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 04 04:41:25 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U2Cvq-0006bb-Rl for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2013 04:41:22 +0100 Original-Received: from localhost ([::1]:41094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2CvY-0002Qo-C4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Feb 2013 22:41:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2CvW-0002Qj-3G for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2013 22:41:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2CvU-0002MP-Ug for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2013 22:41:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2CvU-0002ML-R9 for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2013 22:41:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U2CwU-0004jK-RC for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2013 22:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Feb 2013 03:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13625 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13625-submit@debbugs.gnu.org id=B13625.135994929118131 (code B ref 13625); Mon, 04 Feb 2013 03:42:02 +0000 Original-Received: (at 13625) by debbugs.gnu.org; 4 Feb 2013 03:41:31 +0000 Original-Received: from localhost ([127.0.0.1]:34761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2CvS-0004hf-UF for submit@debbugs.gnu.org; Sun, 03 Feb 2013 22:41:30 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:8836) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2CvG-0004hL-Op for 13625@debbugs.gnu.org; Sun, 03 Feb 2013 22:40:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZnt/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGJegOSHIFegxU X-IPAS-Result: Av4EABK/CFFFpZnt/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGJegOSHIFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="359859" Original-Received: from 69-165-153-237.dsl.teksavvy.com (HELO ceviche.home) ([69.165.153.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Feb 2013 22:39:43 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0E6BE66109; Sun, 3 Feb 2013 22:39:43 -0500 (EST) In-Reply-To: (Yves Baumes's message of "Mon, 04 Feb 2013 00:49:08 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70662 Archived-At: > 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