From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: yzhh Newsgroups: gmane.emacs.devel Subject: Re: recording-elisp.el - try recording commands as elisp code Date: Tue, 06 Nov 2007 14:12:08 +0800 Message-ID: References: <87k5p05qsy.fsf@jurta.org> <87ve8g5kws.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1194329614 13353 80.91.229.12 (6 Nov 2007 06:13:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2007 06:13:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 06 07:13:38 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IpHgs-0003BD-3H for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2007 07:13:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpHgh-0003TQ-3m for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2007 01:13:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IpHgd-0003QK-0x for emacs-devel@gnu.org; Tue, 06 Nov 2007 01:13:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IpHgb-0003NE-Fq for emacs-devel@gnu.org; Tue, 06 Nov 2007 01:13:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpHgb-0003N0-9d for emacs-devel@gnu.org; Tue, 06 Nov 2007 01:13:17 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IpHgb-0002ja-8o for emacs-devel@gnu.org; Tue, 06 Nov 2007 01:13:17 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IpHg9-000706-MJ for emacs-devel@gnu.org; Tue, 06 Nov 2007 06:12:49 +0000 Original-Received: from 211.90.238.185 ([211.90.238.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Nov 2007 06:12:49 +0000 Original-Received: from yezonghui by 211.90.238.185 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Nov 2007 06:12:49 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 211.90.238.185 User-Agent: KNode/0.10.5 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82625 Archived-At: Juri Linkov wrote: > 3. but the doc-string of this command says: > > This function is usually the wrong thing to use in a Lisp program. > What you probably want is a loop like this: > (while (search-forward FROM-STRING nil t) > (replace-match TO-STRING nil t)) > which will run faster and will not set the mark or print anything. > > So according to this guideline a Lisp program should use a loop with > search-forward and replace-match. Thanks for this. I haven't get to query-replace yet. What I have in mind is to record also the y/n/a/q choices of the user. -- regards, yzhh