[mel-base-devel] multipart messages and pop3

Timothy Ritchey tritchey at mac.com
Thu May 14 14:38:51 UTC 2009


As an update, if I use map-messages on the maildir folder, I get the  
backtrace below. In map-messages there is a (declare (type simple-base- 
string file)) in the lambda. Why it is not happy with the filename, I  
am not sure:

   (mel.filesystem:map-directory
    (lambda (file)
      (declare (type simple-base-string file))
      (let ((uid (uidify file)))
        (setf (gethash uid uid-cache) (cons :cur file))
        (funcall fn (push-message file))))
    (namestring (truename (current-mail folder))))))

map-recent-messages seems to run afoul in flagp-using-folder with the  
inlined uidify:

(defun uidify (file)
   (declare (optimize (speed 3) (safety 0))
            (type simple-base-string file))
   (let ((uid-end (position #\: file :from-end t)))
     (if uid-end
       (subseq file 0 uid-end)
       file)))

So from what I can tell, the type declaration and the filename the  
system is providing are not happy. I have no idea if it could be  
related, but I do have:

;; possibly controversial as a global default, but shipping a lisp
;; that dies trying to talk to slime is stupid, so:
(set-language-environment "UTF-8")
(setq slime-net-coding-system 'utf-8-unix)

at the top of my .emacs file from clbuild.

Cheers,
Tim R.


-----
The value "1242273504.8901_1.localhost"
is not of type
   (SIMPLE-ARRAY BASE-CHAR (*)).
    [Condition of type TYPE-ERROR]

Restarts:
  0: [RETRY] Retry SLIME REPL evaluation request.
  1: [ABORT] Return to SLIME's top level.
  2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "new-repl- 
thread" RUNNING {133305C9}>)

Backtrace:
   0: ((LAMBDA (MEL.FOLDERS.MAILDIR::FILE))  
"1242273504.8901_1.localhost")
   1: (MEL.FILESYSTEM:MAP-DIRECTORY #<CLOSURE (LAMBDA #) {1344A08D}> "/ 
private/tmp/test-maildir/cur/")
   2: ((SB-PCL::FAST-METHOD MEL.PUBLIC:MAP-MESSAGES (T  
MEL.FOLDERS.MAILDIR:MAILDIR-FOLDER)) ..)
   3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CHECK-EMAIL) #<NULL-LEXENV>)

On May 14, 2009, at 12:17 AM, Timothy Ritchey wrote:

> I've been able to pretty easily move files from a pop folder to a  
> local maildir:
>
> (mel:move-folder folder tmp-folder)
> (mel:map-recent-messages
>    (lambda (m) (format t "~a~%" (find-plain-text m))) tmp-folder)
>
> The map-recent-messages gets through all of the messages in new, and  
> they are printed out okay, but then brings up the error below. As  
> best I can tell, it is trying to move the messages to the cur  
> directory. I am running a recent sbcl on OS X. Running map-messages  
> gets me the same error, but with a slightly different backtrace.  
> Does anyone have any ideas about what might be going on?
>
> Cheers,
> Tim R.
>
> The value "1242273934.8901_1.localhost"
> is not of type
>  (SIMPLE-ARRAY BASE-CHAR (*)).
>   [Condition of type TYPE-ERROR]
>
> Restarts:
> 0: [RETRY] Retry SLIME REPL evaluation request.
> 1: [ABORT] Return to SLIME's top level.
> 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "new-repl- 
> thread" RUNNING {133154B9}>)
>
> Backtrace:
>  0: ((SB-PCL::FAST-METHOD MEL.INTERNAL:FLAGP-USING-FOLDER  
> (MEL.FOLDERS.MAILDIR:MAILDIR-FOLDER T (EQL :RECENT))) ..)
>  1: ((SB-PCL::FAST-METHOD MEL.INTERNAL:UNMARK-MESSAGE-USING-FOLDER  
> (MEL.FOLDERS.MAILDIR:MAILDIR-FOLDER T (EQL :RECENT))) ..)
>  2: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0.  
> SB-PCL::.ARG1. SB-PCL::.ARG2.)) ..)
>  3: (SB-IMPL::%MAP-FOR-EFFECT-ARITY-1 #<FUNCTION (LAMBDA #)  
> {124D2DBD}> (#<MEL.PUBLIC:MIME-MESSAGE {1190C5C1}>))
>  4: ((SB-PCL::FAST-METHOD MEL.PUBLIC:MAP-RECENT-MESSAGES :AROUND (T  
> MEL.PUBLIC:BASIC-FOLDER)) ..)
>  5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CHECK-EMAIL) #<NULL-LEXENV>)





More information about the mel-base-devel mailing list