[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: async.el: A simple asynchronous framework for Emacs

From: John Wiegley
Subject: Re: async.el: A simple asynchronous framework for Emacs
Date: Wed, 20 Jun 2012 00:34:46 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin)

>>>>> Stefan Monnier <address@hidden> writes:

> The byte-compiler uses prin1 to generate the .elc files, so I'm pretty sure
> there's a way to solve this problem ;-)

Actually, I was being too pessimistic.  Byte-compiled forms are handled just

What I did run into is a bug communicating with the subprocess over stdin.
It happens if I use this function:

    (defun async-smtpmail-send-it ()
       `(lambda ()
          (require 'smtpmail)
            (insert ,(buffer-substring-no-properties (point-min) (point-max)))
            ;; Pass in the variable environment for smtpmail
            ;;  "\\`\\(smtpmail\\|\\(user-\\)?mail\\)-"
            ;;  (lambda (symbol)
            ;;    (or (not (functionp sym))
            ;;        (symbolp sym)))
            (setq mail-extr-trailing-comment-start-pattern 
            (setq smtpmail-debug-info 'nil)
            (setq mail-abbrev-mode-regexp
            (setq mail-send-actions 'nil)
            (setq mail-source-imap-streams
                  '((const gssapi)
                    (const kerberos4)
                    (const tls)
                    (const ssl)
                    (const network)
                    (const shell)
                    (const starttls)))

All I see from the stdout of the child process is around 20 ^G characters, and
then it blocks waiting for input.  However, If I delete *any one* of the setq
statements above (it doesn't matter which), it works just fine.  So it doesn't
appear to be triggered by the length, or by any special characters.  I'm
having a tough time figuring this one out.

I've also implemented a message-passing scheme so one can implement status
updates for long-running async jobs, but I'm hesitant to enable it because it
relies on communicating over the pipe.

Until then, I pass the async lambda as a program argument, which means I'm
limited on maximum length to the OS limit (around 4k on Mac, I believe).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]