From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.devel Subject: Re: how-many/count-matches for non-interactive use Date: Fri, 15 Oct 2004 08:54:31 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <87pt3m5vqk.fsf@oak.pohoyda.family> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097844897 21205 80.91.229.6 (15 Oct 2004 12:54:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Oct 2004 12:54:57 +0000 (UTC) Cc: Alexander Pohoyda , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 15 14:54:48 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CIRbc-0002tD-00 for ; Fri, 15 Oct 2004 14:54:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CIRil-00037F-8X for ged-emacs-devel@m.gmane.org; Fri, 15 Oct 2004 09:02:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CIRie-00036x-Bu for emacs-devel@gnu.org; Fri, 15 Oct 2004 09:02:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CIRid-00036Q-DY for emacs-devel@gnu.org; Fri, 15 Oct 2004 09:02:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CIRid-00036F-4N for emacs-devel@gnu.org; Fri, 15 Oct 2004 09:02:03 -0400 Original-Received: from [206.47.199.164] (helo=simmts6-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CIRbP-0002xp-G4; Fri, 15 Oct 2004 08:54:35 -0400 Original-Received: from empanada.home ([67.68.216.211]) by simmts6-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041015125431.MWPX1635.simmts6-srv.bellnexxia.net@empanada.home>; Fri, 15 Oct 2004 08:54:31 -0400 Original-Received: by empanada.home (Postfix, from userid 502) id 704E132400D; Fri, 15 Oct 2004 08:54:31 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 14 Oct 2004 20:26:24 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28435 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28435 > interactive-p is the wrong function to call here, because it is nil > when the command is called froma keyboard macro. The right thing > to do here is to take an argument saying whether to print the message, > and use "p" in the interactive spec to set that argument non-nil > in an interactive call. Silly me, I never thought of abusing `p' for this purpose. I always thought (why isn't there a letter for "always t") and the used (interactive (list t)). > It seems that interactive-p as currently defined is very rarely useful > -- perhaps never. Perhaps we should change interactive-p to ignore > whether the command is running from a macro and do what most people > seem to expect. I think we should declare it obsolete because the alternative (of adding an argument) is always clearer, less brittle, and allows callers better control. I've already been bitten once where I just "reorganized" a function by moving a large subpart into its own function without noticing that that subpart used `interactive-p'. Stefan