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: Mon, 04 Feb 2013 10:13:48 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359990852 19648 80.91.229.3 (4 Feb 2013 15:14:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2013 15:14:12 +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 16:14:32 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 1U2Nka-0007XA-1G for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2013 16:14:28 +0100 Original-Received: from localhost ([::1]:35231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2NkH-0002dW-GF for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2013 10:14:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Nk9-0002ZW-O0 for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2013 10:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2Nk5-0003pV-LE for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2013 10:14:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Nk5-0003pR-Hn for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2013 10:13:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U2Nl8-0008Dl-F1 for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2013 10:15: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 15:15: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.135999089631579 (code B ref 13625); Mon, 04 Feb 2013 15:15:02 +0000 Original-Received: (at 13625) by debbugs.gnu.org; 4 Feb 2013 15:14:56 +0000 Original-Received: from localhost ([127.0.0.1]:36130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2Nl1-0008DH-Md for submit@debbugs.gnu.org; Mon, 04 Feb 2013 10:14:55 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:45856) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2Nl0-0008DC-UZ for 13625@debbugs.gnu.org; Mon, 04 Feb 2013 10:14:55 -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="392040" Original-Received: from 69-165-153-237.dsl.teksavvy.com (HELO pastel.home) ([69.165.153.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Feb 2013 10:13:49 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 01076590CF; Mon, 4 Feb 2013 10:13:48 -0500 (EST) In-Reply-To: (Yves Baumes's message of "Mon, 4 Feb 2013 12:18:29 +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:70676 Archived-At: >> Better would be to move those questions to the `interactive' spec, so >> you don't even need called-interactively-p. > Ok. I've read the Emacs Lisp Reference manual. As you told, they say > an alternative to `called-interactively-p' is possible with > `interactive'. Note sure if I understand it all with this example: > (defun test (&optional print-msg) > (interactive "p") > (if print-msg > (message "IS INTERACTIVE") > (message "IS *NOT* INTERACTIVE"))) That's one option: it doesn't move the questions to the interactive spec, but it removes the use of called-interactively-p. What I was suggesting was more like: (defun test () (interactive (if (yes-or-no-p ...) ... ...))) but I see that it's probably not applicable to package-menu-execute. Maybe the best option here is to add an optional `dont-query' argument. Stefan