Ricardo Wurmus
2018-08-24 19:00:42 UTC
Hello!
I’m the author of GNU Guile Debbugs, a Guile interface to the SOAP
service of the Debbugs bug tracker. I’m trying to use the Guile
bindings of Mailutils to simplify the task of dealing with emails from
Debbugs (e.g. to parse multipart messages or to decode Quoted Printable
strings).
I used the latest version of Mailutils from Savannah because unlike the
latest release it provides working bindings for Guile 2.2.
Unfortunately, I cannot get it to read a message in mbox format from a
file. Here’s what I tried:
--8<---------------cut here---------------start------------->8---
wget https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32514;msg=8;mbox=yes
guile
GNU Guile 2.2.4
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> ,use (mailutils mailutils)
scheme@(guile-user)> (call-with-input-file "bug_32514_message_8.mbox" mu-message-from-port)
$1 = #<message "debbugs-submit-***@debbugs.gnu.org" "Fri Aug 24 06:39" ERROR: In procedure write:
Wrong type (expecting exact integer): #<closed: file 14ef0e0>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In ice-9/boot-9.scm:
829:9 3 (catch quit #<procedure 119f560 at system/repl/repl.scm:191:18 ()> #<procedure 7fc1e1f559f8 at system/repl/repl.scm:210:18 (k . args)> _)
260:13 2 While executing meta-command:
Wrong type (expecting exact integer): #<closed: file 14ef0e0>
scheme@(guile-user) [1]>
--8<---------------cut here---------------end--------------->8---
This also happens for other messages that don’t come from Debbugs. The
problem only seems to happen when the message object is printed – I can
assign the parsed to a variable, but I cannot print it.
--
Ricardo
I’m the author of GNU Guile Debbugs, a Guile interface to the SOAP
service of the Debbugs bug tracker. I’m trying to use the Guile
bindings of Mailutils to simplify the task of dealing with emails from
Debbugs (e.g. to parse multipart messages or to decode Quoted Printable
strings).
I used the latest version of Mailutils from Savannah because unlike the
latest release it provides working bindings for Guile 2.2.
Unfortunately, I cannot get it to read a message in mbox format from a
file. Here’s what I tried:
--8<---------------cut here---------------start------------->8---
wget https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32514;msg=8;mbox=yes
guile
GNU Guile 2.2.4
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> ,use (mailutils mailutils)
scheme@(guile-user)> (call-with-input-file "bug_32514_message_8.mbox" mu-message-from-port)
$1 = #<message "debbugs-submit-***@debbugs.gnu.org" "Fri Aug 24 06:39" ERROR: In procedure write:
Wrong type (expecting exact integer): #<closed: file 14ef0e0>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In ice-9/boot-9.scm:
829:9 3 (catch quit #<procedure 119f560 at system/repl/repl.scm:191:18 ()> #<procedure 7fc1e1f559f8 at system/repl/repl.scm:210:18 (k . args)> _)
260:13 2 While executing meta-command:
Wrong type (expecting exact integer): #<closed: file 14ef0e0>
scheme@(guile-user) [1]>
--8<---------------cut here---------------end--------------->8---
This also happens for other messages that don’t come from Debbugs. The
problem only seems to happen when the message object is printed – I can
assign the parsed to a variable, but I cannot print it.
--
Ricardo