all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using append to create a list from a line of text
@ 2013-04-16  9:58 acomber
  2013-04-16 10:05 ` Christopher Schmidt
  2013-04-16 13:10 ` Drew Adams
  0 siblings, 2 replies; 6+ messages in thread
From: acomber @ 2013-04-16  9:58 UTC (permalink / raw)
  To: Help-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <mailman.24205.1366106299.855.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2013-04-17 18:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16  9:58 Using append to create a list from a line of text acomber
2013-04-16 10:05 ` Christopher Schmidt
2013-04-16 13:10 ` Drew Adams
     [not found] <mailman.24205.1366106299.855.help-gnu-emacs@gnu.org>
2013-04-16 20:51 ` Pascal J. Bourguignon
2013-04-17 16:27   ` Barry Margolin
2013-04-17 18:23     ` Pascal J. Bourguignon

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.