[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] Using milutils from Guile?
From: |
Sergey Poznyakoff |
Subject: |
Re: [bug-mailutils] Using milutils from Guile? |
Date: |
Tue, 22 Jun 2004 19:11:12 +0300 |
Chris Hall <address@hidden> wrote:
> * First, I can't seem to find a 'users' mailing list anywhere - are
> the libraries meant primarily for developers?
For the time being address@hidden is serving as a users mailing
list as well. Feel free to post your questions here.
> * I'm having trouble figuring out a decent way to *develop* guile
> mailutil scripts:
>
> * 'guimb' is clearly not intended for interactive development, OK,
> but if did actually want to use it, *how* does one refer to the
> mailbox passed on the command line?
Use 'current-mailbox' variable. See our sieve.scm implementation
(guimb/scm/*) for examples (unfortunately our docs are far from
being perfect).
> For example: If I have a script guimb-test.scm, and I want it to
> just get my messages count. I start it like so:
>
> guimb -M imap://address@hidden/mbox -d -s guimb-test.scm
>
> (mu-mailbox-messages-count ???URL???)
> ^^^^^^^^^^
> ^--- What goes here?
(mu-mailbox-messages-count current-mailbox)
> * If guimb is run with the '-d' flag, yep, I get a backtrace, but
> quite frankly, how truly useful is that, since guimb then exits?
> I can't interactively examine the stack, move to different frames,
> try different values, etc.?
Yes, that's a good point. Using guimb -c '(top-repl)' might help,
although the feature is rather obscure and should be mentioned in the
docs.
> * If instead I (use-modules (mailutils)) from within an interactive
> guile session, it seems I can open *only* local, disk-based
> mailboxes, and then *only* if I leave any 'file:', 'imap:',
> etc. off of the 'URL'? Example:
>
> * (mu-mailbox-open "/some/valid/path" "r") works,
>
> * (mu-mailbox-open "file:///some/valid/path" "r") and
> (mu-mailbox-open "file://some/valid/path" "r") don't, nor does
> it seem willing to even try a remote mailbox.
Did you mean (mu-mailbox-open "imap://..") and (mu-mailbox-open
"pop://..")? These work OK.
> But then why does a "imap://" URL work in a 'guimb' script?
> And/or doesn't it work in guile? Both were built on the same
> machine, using the same tool chain, about a week apart.
This seems to indicate a problem with shared libraries. Check if
mailutils libs are properly installed.
> * Am I doing something wrong here?
> guile> mb
> #<mailbox /home/slacker/mbox (4)>
> guile> (mu-mailbox-close mb)
> ERROR: Wrong number of arguments to #<procedure -print (result)>
> ABORT: (wrong-number-of-args)
You are doing everything right. This is my bug :) I'm going to fix it
tonight. For the time being, ignore such errors. They will not be issued
when you run your program from a script, anyway.
Regards,
Sergey