From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: acomber Newsgroups: gmane.emacs.help Subject: Using append to create a list from a line of text Date: Tue, 16 Apr 2013 02:58:14 -0700 (PDT) Message-ID: <1366106294207-283808.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366106454 7070 80.91.229.3 (16 Apr 2013 10:00:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Apr 2013 10:00:54 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 16 12:00:58 2013 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 1US2h6-0001cx-As for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Apr 2013 12:00:56 +0200 Original-Received: from localhost ([::1]:35090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US2h5-0000NX-T5 for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Apr 2013 06:00:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US2eX-00060G-58 for Help-gnu-emacs@gnu.org; Tue, 16 Apr 2013 05:58:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US2eV-0006Jk-Rb for Help-gnu-emacs@gnu.org; Tue, 16 Apr 2013 05:58:17 -0400 Original-Received: from sam.nabble.com ([216.139.236.26]:34123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US2eV-0006JV-Mn for Help-gnu-emacs@gnu.org; Tue, 16 Apr 2013 05:58:15 -0400 Original-Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1US2eU-0003Bo-7N for Help-gnu-emacs@gnu.org; Tue, 16 Apr 2013 02:58:14 -0700 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 216.139.236.26 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:90184 Archived-At: I want to create a list of words from a line of text delimitted by tabs. I want to basically split the line into atoms, split by tab. The code below is sort of pseudocode but is this the best approach to do this type of thing? Here is my first attempt:- (defun get-hdr() ;obviously point must be positioned on correct line (let (mylist) while(not (end-of-line) while(re-search-forward ("[A-Za-z]+[^\t\n]" nil t) append (match-string 1) mylist ) ) ) ) How do I get my function to return the list, mylist? -- View this message in context: http://emacs.1067599.n5.nabble.com/Using-append-to-create-a-list-from-a-line-of-text-tp283808.html Sent from the Emacs - Help mailing list archive at Nabble.com.