unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Philippe M. Coatmeur <philippe.coatmeur@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to properly parse a buffer into a list ?
Date: Mon, 11 Jun 2012 17:50:55 +0000	[thread overview]
Message-ID: <lz3961wxds.wl%philippe.coatmeur@gmail.com> (raw)
In-Reply-To: <87zk8agf7h.fsf@kuiper.lan.informatimago.com>

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, thx Pascal ; Way to go from 13 to 5 lines ;)

> 
> > 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?

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

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



  parent reply	other threads:[~2012-06-11 17:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 13:15 How to properly parse a buffer into a list ? Philippe M. Coatmeur
2012-06-11 13:17 ` Pascal J. Bourguignon
2012-06-11 17:46   ` Philippe M. Coatmeur
2012-06-11 17:50   ` Philippe M. Coatmeur [this message]
2012-06-11 13:21 ` Ralf Fassel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lz3961wxds.wl%philippe.coatmeur@gmail.com \
    --to=philippe.coatmeur@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).