From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Wu XiaoGuang Newsgroups: gmane.emacs.help Subject: Re: How can I use fuction "append-to-buffer"? Date: Mon, 19 Aug 2002 20:33:08 +0000 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <3D615604.7010007@linux.net.cn> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1029759973 21564 127.0.0.1 (19 Aug 2002 12:26:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 19 Aug 2002 12:26:13 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17glbn-0005bI-00 for ; Mon, 19 Aug 2002 14:26:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17glck-00064h-00; Mon, 19 Aug 2002 08:27:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17glby-000604-00 for help-gnu-emacs@gnu.org; Mon, 19 Aug 2002 08:26:22 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17glbv-0005zs-00 for help-gnu-emacs@gnu.org; Mon, 19 Aug 2002 08:26:21 -0400 Original-Received: from [210.82.103.10] (helo=mx.linux.net.cn) by monty-python.gnu.org with esmtp (Exim 4.10) id 17glbu-0005zj-00 for Help-gnu-emacs@gnu.org; Mon, 19 Aug 2002 08:26:19 -0400 Original-Received: from linux.net.cn (TNT1-0-55.yz.js.cn [202.102.33.55]) by mx.linux.net.cn (Postfix) with ESMTP id 8A24E24E1 for ; Mon, 19 Aug 2002 20:26:52 +0800 (CST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: en-us, zh-cn, zh-tw Original-To: Help-gnu-emacs Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:836 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:836 I just didn't know how to pass the two number argument(START and END) after " x". With your advice, I understand, just use mouse to "create" the "active mask" in oldbuf, then do " x append-to-buffer buffer". It works now. Thank you! Douglas Lewan wrote: > Wu, > > To use "append-to-buffer" interactively simply type "M-x > append-to-buffer" (where M-x is " x" or possibly " x"). > > To use it in another Emacs Lisp program: > 1. Determine the BUFFER that you want to append to. > 2. Calculate the START and END locations in the current buffer > that define the text to be appended. > 3. In your defun simply write: > (append-to-buffer BUFFER START END) > > I hope this helps. >