help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to properly parse a buffer into a list ?


From: Philippe M . Coatmeur
Subject: Re: How to properly parse a buffer into a list ?
Date: Mon, 11 Jun 2012 17:46:55 +0000
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.1 Mule/6.0 (HANACHIRUSATO)

At Mon, 11 Jun 2012 15:17:54 +0200,
Pascal J. Bourguignon wrote:
> 
> Philippe M. Coatmeur <philippe.coatmeur@gmail.com> writes:
> 
> > Hi ; I have this perl-script that prints email elements separated by
> > the string : "|_|".
> 
> If you could modify it so that it prints a sexp, it would be easier to
> read it in emacs.
> 
>     (("abc" "@" "example" "com")
>      ("def" "@" "example" "com"))
> 
> you could then just use:
> 
>     (with-current-buffer buf
>        (goto-char (point-min))
>        (read buf))

Simple, brilliant, bravo Pascal :) (Damnit, if it was'nt for the
second "i" in "brilliant", this sentence would be readable in both
english and french :( )

> 
> 
> > Problem is, this function moves in terms of lines (it puts evey single
> > line in a list cell), but my elements can easily span over several
> > lines, and I'd still wouldlike one such element to be a single list
> > cell..? 
> 
> How do you separate email addresses then?

Well I overlooked this problem, but your solution solved it even
before we were introduced ;)

> 
> 
> -- 
> __Pascal Bourguignon__                     http://www.informatimago.com/
> A bad day in () is better than a good day in {}.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]