From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: how-many/count-matches for non-interactive use Date: Wed, 20 Oct 2004 03:35:27 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: 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> <200410200114.i9K1EBr28373@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098236175 706 80.91.229.6 (20 Oct 2004 01:36:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2004 01:36:15 +0000 (UTC) Cc: alexander.pohoyda@gmx.net, storm@cua.dk, rms@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 20 03:36:03 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 1CK5OV-0006Ot-00 for ; Wed, 20 Oct 2004 03:36:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CK5Vr-0004VX-Fz for ged-emacs-devel@m.gmane.org; Tue, 19 Oct 2004 21:43:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CK5Vj-0004V7-VJ for emacs-devel@gnu.org; Tue, 19 Oct 2004 21:43:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CK5Vj-0004Ud-4h for emacs-devel@gnu.org; Tue, 19 Oct 2004 21:43:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CK5Vi-0004UZ-Rv for emacs-devel@gnu.org; Tue, 19 Oct 2004 21:43:30 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CK5O5-0000TO-VR for emacs-devel@gnu.org; Tue, 19 Oct 2004 21:35:38 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CK5Ny-0000Qk-6e; Tue, 19 Oct 2004 21:35:30 -0400 Original-To: Luc Teirlinck In-Reply-To: <200410200114.i9K1EBr28373@raven.dms.auburn.edu> (Luc Teirlinck's message of "Tue, 19 Oct 2004 20:14:11 -0500 (CDT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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:28641 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28641 Luc Teirlinck writes: > 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. (defun execute-keyboard-macro [...] (let (saved-message) (flet (message (&rest args) (setq saved-message args)) [execute the keyboard macro as often as wanted]) (when saved-message (message "In macro: %s" (apply #'format saved-message))))) Something like that. Note that only the last message will actually get formatted. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum