guile-email discussion
 help / color / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: guile-email@systemreboot.net
Subject: Re: [guile-email] parse-email-headers returns just “fields”
Date: Thu, 23 Apr 2020 16:40:08 +0200
Message-ID: <874ktal0zb.fsf@elephly.net> (raw)
In-Reply-To: <cu7h7xawi8p.fsf@systemreboot.net>


[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]


Arun Isaac <arunisaac@systemreboot.net> writes:

> Did the parse-email snippet I sent in my previous mail work on the
> attached mbox you sent earlier?

Yes, this worked.  Thank you.  In any case this simplifies the code.

>>   (parse-email
>>    (and=> (call-with-input-string contents mbox->emails) first))
>
> Also, it isn't a good idea to handle emails or mboxes as strings (the
> `contents' variable). They should be handled as bytevectors. Perhaps it
> doesn't matter here, but just saying.

Yeah, I figured as much, but I shied away from reading the file in
bytevector chunks that would then need to be searched for control
characters to split the parts of the log file.  I’ll probably do that
later, but for the first pass I just decided to use read-line.

> And, just out of curiosity, if there's no sensitive information in it,
> could you share a copy of a debbugs log file?

An example is attached.  I picked it arbitrarily from the many logs that
fail when I don’t drop the first line.

The mbox begins at the first ^G and ends at the next ^C.


[-- Attachment #2: 40755.log --]
[-- Type: application/octet-stream, Size: 11557 bytes --]

[-- Attachment #3: Type: text/plain, Size: 12 bytes --]


--
Ricardo

  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 12:24 Ricardo Wurmus
2020-04-23  1:26 ` Arun Isaac
2020-04-23  1:26   ` Arun Isaac
2020-04-23  6:35   ` Ricardo Wurmus
2020-04-23 11:31     ` Arun Isaac
2020-04-23 11:31       ` Arun Isaac
2020-04-23 14:40       ` Ricardo Wurmus [this message]
2020-04-23 21:54         ` Arun Isaac
2020-04-23 21:54           ` Arun Isaac

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

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

  git send-email \
    --in-reply-to=874ktal0zb.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=arunisaac@systemreboot.net \
    --cc=guile-email@systemreboot.net \
    /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

guile-email discussion

Archives are clonable:
	git clone --mirror http://lists.systemreboot.net/guile-email/0 guile-email/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-email guile-email/ http://lists.systemreboot.net/guile-email \
		guile-email@systemreboot.net
	public-inbox-index guile-email

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git