From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: how-many/count-matches for non-interactive use Date: Thu, 21 Oct 2004 17:13:29 -0500 (CDT) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200410212213.i9LMDTH22583@raven.dms.auburn.edu> References: <87pt3m5vqk.fsf@oak.pohoyda.family> <87zn2mh5jk.fsf-monnier+emacs@gnu.org> <87is99nznd.fsf-monnier+emacs@gnu.org> <200410172053.i9HKrdL01136@raven.dms.auburn.edu> <200410190158.i9J1wrH25523@raven.dms.auburn.edu> <200410200127.i9K1Rpp28384@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1098396937 467 80.91.229.6 (21 Oct 2004 22:15:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Oct 2004 22:15:37 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, alexander.pohoyda@gmx.net, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 22 00:15:27 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 1CKlDS-0005aR-00 for ; Fri, 22 Oct 2004 00:15:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CKlKv-000175-8K for ged-emacs-devel@m.gmane.org; Thu, 21 Oct 2004 18:23:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CKlKn-00016b-Pa for emacs-devel@gnu.org; Thu, 21 Oct 2004 18:23:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CKlKm-000169-V1 for emacs-devel@gnu.org; Thu, 21 Oct 2004 18:23:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CKlKm-000164-Op for emacs-devel@gnu.org; Thu, 21 Oct 2004 18:23:00 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CKlDH-000170-1r; Thu, 21 Oct 2004 18:15:15 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i9LMEuiU014279; Thu, 21 Oct 2004 17:14:56 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id i9LMDTH22583; Thu, 21 Oct 2004 17:13:29 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Wed, 20 Oct 2004 21:45:45 -0400) 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:28714 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28714 I took a closer look at what started this thread, `how-many'. I somewhat changed my opinion on this particular example. It indeed seems to make some sense to print that message in a keyboard macro in some situations (if `how-many' is the very last command in the macro). But it makes equally much sense in the same situations when called from Lisp. Remember that `how-many' without Alexander's patch prints the message even when called from Lisp. Alexander's latest patch looks OK because you still are able to print the message even from Lisp. Trying to solve the problem by changing interactive-p makes in my opinion no sense, because if you sometimes need the message in a keyboard macro, you automatically also sometimes need the message from Lisp, for instance if you translate your keyboard macro into a Lisp function for efficiency. There are many messages that make no sense when called from a keyboard macro, so the present behavior of `interactive-p' makes sense. In situations where the message should appear in a keyboard macro, one should always use an argument, because then you will sometimes also need to print the message from Lisp. This is exactly what is currently clearly documented in the Elisp manual and in plenty of other places. When the user currently tests a keyboard macro, he tests it with the current behavior. Hence, the current behavior of `interactive-p' determines whether the macro does what the user wants it to do, This argument assumes that people who wrote this code knew what they were doing. I can't assume that. I want to see what sort of messages they really are. I want someone to look at them. The argument assumed that _keyboard macro users_ know what they want their macros to do. I am aware that some people who write code do not know what they are doing, although I would hope that this does not apply to the majority of people whose code winds up in the Emacs sources. I have not seen a flood of bug reports related to uses of `interactive-p' that were inappropriate for macros. Sincerely, Luc.