From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: async.el: A simple asynchronous framework for Emacs Date: Wed, 20 Jun 2012 00:34:46 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340170552 26930 80.91.229.3 (20 Jun 2012 05:35:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Jun 2012 05:35:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 20 07:35:52 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ShDa2-0004xH-KA for ged-emacs-devel@m.gmane.org; Wed, 20 Jun 2012 07:35:50 +0200 Original-Received: from localhost ([::1]:51703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShDa2-0002J4-Ks for ged-emacs-devel@m.gmane.org; Wed, 20 Jun 2012 01:35:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShDZz-0002IQ-Fn for emacs-devel@gnu.org; Wed, 20 Jun 2012 01:35:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShDZw-0007wt-PB for emacs-devel@gnu.org; Wed, 20 Jun 2012 01:35:47 -0400 Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:59901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShDZw-0007wc-HA for emacs-devel@gnu.org; Wed, 20 Jun 2012 01:35:44 -0400 Original-Received: by yhr47 with SMTP id 47so6283072yhr.0 for ; Tue, 19 Jun 2012 22:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=MJYw+Vp9eWf+fp5nKx6W3b1/RWioxkX/5NQLR9Q1AyM=; b=MK4PJbzLjzyyx1jJt+JC6F28PjaNOwiROupPEPMlK4nJcJVJWu832A3AAh9lobQafc Q9slvlTTO9P7pLTBaFvzOJsWPHi3Jo3iZOZN0f6FADd7rGE05OqjLBK/k8o7eIxcCuEu KPuovhTsudpKrRMxP3uq/quEdACoVv8dhpMbzNumVOKMQl9Z27POQLv+6KFy1K872gkf v22vdoftFa0HFGN2S6xphdEj5Lruj6Jn4biKpqMV0BKcb3r43mRdcdsvcquGEe8CoOys olf7LLx9Nv3RkmCg+0JV2VwGr2kx9zCcBPA4bHxbc7LhXRrLKHxuuu6ydIjbuofdrJvf By/A== Original-Received: by 10.50.158.129 with SMTP id wu1mr3408661igb.33.1340170542420; Tue, 19 Jun 2012 22:35:42 -0700 (PDT) Original-Received: from vulcan.local (c-98-215-105-167.hsd1.il.comcast.net. [98.215.105.167]) by mx.google.com with ESMTPS id if4sm14332684igc.10.2012.06.19.22.35.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Jun 2012 22:35:41 -0700 (PDT) Original-Received: by vulcan.local (Postfix, from userid 501) id 03685EFC1128; Wed, 20 Jun 2012 00:34:46 -0500 (CDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Tue, 19 Jun 2012 17:46:15 -0400") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.213.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151040 Archived-At: >>>>> Stefan Monnier 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 fine! 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 () (async-start `(lambda () (require 'smtpmail) (with-temp-buffer (insert ,(buffer-substring-no-properties (point-min) (point-max))) ;; Pass in the variable environment for smtpmail ;;,(async-inject-variables ;; "\\`\\(smtpmail\\|\\(user-\\)?mail\\)-" ;; (lambda (symbol) ;; (or (not (functionp sym)) ;; (symbolp sym))) ;; "\\(\\`mail-header-format-function\\|-syntax-table\\|-mode-map\\)\\'") (setq mail-extr-trailing-comment-start-pattern '"[-{]\\|--\\|[+@#>