From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: How can I change "buffer" to "string" Date: Wed, 5 Aug 2015 07:27:42 -0700 (PDT) Message-ID: <8a479349-f4f8-4960-9ecf-a557c591449e@googlegroups.com> References: <20150805034423.GA8540@debian> <5f33bab1-954c-47d3-ad19-5287786b9d49@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1438785041 14043 80.91.229.3 (5 Aug 2015 14:30:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2015 14:30:41 +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:30:40 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 1ZMziJ-0004xv-Uv for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2015 16:30:40 +0200 Original-Received: from localhost ([::1]:40737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMziJ-0005rF-CX for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2015 10:30:39 -0400 X-Received: by 10.129.41.73 with SMTP id p70mr8883936ywp.7.1438784863049; Wed, 05 Aug 2015 07:27:43 -0700 (PDT) X-Received: by 10.50.122.40 with SMTP id lp8mr552212igb.0.1438784863001; Wed, 05 Aug 2015 07:27:43 -0700 (PDT) Original-Path: usenet.stanford.edu!z61no5399027qge.0!news-out.google.com!nt1ni175igb.0!nntp.google.com!pg9no7293057igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=117.195.38.14; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 117.195.38.14 User-Agent: G2/1.0 Injection-Date: Wed, 05 Aug 2015 14:27:43 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:213970 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:106255 Archived-At: On Wednesday, August 5, 2015 at 7:55:16 PM UTC+5:30, Navy Cheng wrote: > 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)) > > Do check whether its buffer-substring-no-properties that you really want