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: Tue, 19 Oct 2004 20:14:11 -0500 (CDT) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200410200114.i9K1EBr28373@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> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1098235001 31215 80.91.229.6 (20 Oct 2004 01:16:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2004 01:16:41 +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 Wed Oct 20 03:16:26 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 1CK55U-0005bC-00 for ; Wed, 20 Oct 2004 03:16:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CK5Cr-0005Uh-D2 for ged-emacs-devel@m.gmane.org; Tue, 19 Oct 2004 21:24:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CK5Ck-0005UL-Qw for emacs-devel@gnu.org; Tue, 19 Oct 2004 21:23:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CK5Ck-0005U1-5L for emacs-devel@gnu.org; Tue, 19 Oct 2004 21:23:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CK5Ck-0005Tr-16 for emacs-devel@gnu.org; Tue, 19 Oct 2004 21:23:54 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CK54u-00063l-17; Tue, 19 Oct 2004 21:15:48 -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 i9K1FWiU002451; Tue, 19 Oct 2004 20:15:33 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id i9K1EBr28373; Tue, 19 Oct 2004 20:14:11 -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 Tue, 19 Oct 2004 12:46:00 -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:28639 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28639 Richard Stallman wrote: If most of the uses in Emacs are wrong, There is one thing I know with absolute certainty: the current behavior of `interactive-p' is correct for every single one of the many keyboard macros I have ever written. The proposed new behavior would be wrong for every single macro I have ever written and for which it would make any difference. It would slow them down a lot and those that print at least two different messages would hopelessly ruin my *Messages* buffers by replacing important information with junk. (Most of the time, keyboard macros are repeated countless times.) A keyboard macro is a poor man's Lisp function. There are two reasons for using a keyboard macro: because the user does not know Lisp, or because defining a keyboard macro takes less time than writing a Lisp function. Before I learned Elisp, I used tons of sometimes very complex keyboard macros for the first reason. Now I still occasionally use keyboard macros for the second reason. Probably the main reason to use a Lisp function instead of a keyboard macro (for something that can actually be done using a keyboard macro) is that it tends to run a lot faster. The choice between keyboard macro and Lisp function is determined by necessity or convenience and by execution speed. It has nothing to do with wanting or not wanting messages to be printed to *Messages*. Like during execution of a Lisp function and unlike real interactive use, the user does not get to enter arguments in the minibuffer during execution of a macro. The arguments are given during definition of the macro. Like in a Lisp function, the user can not determine what to do after each command in the macro, except the last. A command that is part of a keyboard macro is much more like a command invoked from a Lisp function than a really interactively invoked command. Actually, one has to be a lot _more_ careful with messages during macro execution than during Lisp function execution. The absolute _worst_ time to print messages is during long loops. It slows things down tremendously and hopelessly clobbers *Messages*. I use most keyboard macros with very large or zero numeric arguments, that is, in long loops. I suspect most people do. Sincerely, Luc.