From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Navy Cheng Newsgroups: gmane.emacs.help Subject: Re: How can I change "buffer" to "string" Date: Wed, 5 Aug 2015 22:24:51 +0800 Message-ID: <20150805142451.GA27314@debian> References: <20150805034423.GA8540@debian> <5f33bab1-954c-47d3-ad19-5287786b9d49@default> Reply-To: Navy Cheng NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1438784740 8593 80.91.229.3 (5 Aug 2015 14:25:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2015 14:25:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 05 16:25:23 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZMzdD-0002YW-EV for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2015 16:25:23 +0200 Original-Received: from localhost ([::1]:40687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMzdC-0001kG-Bt for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2015 10:25:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMzcz-0001kA-Bl for help-gnu-emacs@gnu.org; Wed, 05 Aug 2015 10:25:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMzcu-0007EM-8J for help-gnu-emacs@gnu.org; Wed, 05 Aug 2015 10:25:09 -0400 Original-Received: from m15-112.126.com ([220.181.15.112]:57192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMzcs-00075l-OV for help-gnu-emacs@gnu.org; Wed, 05 Aug 2015 10:25:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=QGBSB X/Nov3D8XX45f2gNGVPdOKnf3+jcByhcq5v3zg=; b=Sg+u1QPE8DKJBC3mLcPR7 FcqgMFmJ59wX/4oDitRwzKOdVpWKY88xA138P8iq1993NZBGQjnztErECzX/sjp9 ZdW2pyUW5t4AT0/CRv+OdxmvV4/tsvjNtESh9Z1sY1cmBcTTRxbEp1JlL4VuJ9ql p0r6kFb4Ra9XuniphjTIL4= Original-Received: from localhost (unknown [220.248.62.224]) by smtp2 (Coremail) with SMTP id DMmowEBJ3ka0HMJVfT2GAQ--.33101S3; Wed, 05 Aug 2015 22:24:55 +0800 (CST) Content-Disposition: inline In-Reply-To: <5f33bab1-954c-47d3-ad19-5287786b9d49@default> User-Agent: Mutt/1.5.23 (2014-03-12) X-CM-TRANSID: DMmowEBJ3ka0HMJVfT2GAQ--.33101S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUb3kuDUUUU X-Originating-IP: [220.248.62.224] X-CM-SenderInfo: 5qdy5ubk6rjloofrz/1tbi0BRNDVUJSp39GgAAso X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 220.181.15.112 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106254 Archived-At: Thank you for all of you. *buffer-substring* is what I want. Sorry again for my poor English. On Wed, Aug 05, 2015 at 06:34:18AM -0700, Drew Adams wrote: > > I want to change one line in a *buffer* to *string*, How can I do that ? > > As others have noted, your question is unclear, in particular, > what you mean by "change" is unclear. > > My own wild guess is that you want to copy a line from a buffer > as a string. > > To copy the current line as a string: > (buffer-substring (line-beginning-position) (line-end-position)) >