jwiegley / emacs-async

Simple library for asynchronous processing in Emacs
GNU General Public License v3.0
833 stars 68 forks source link

re-opend issue #22 due to -- error in process sentinel: Invalid read syntax: "#" -- while sending mail #26

Closed emelin closed 10 years ago

emelin commented 10 years ago

Hello, I've read issue #22 carefully and -- as I understood -- it wasn't really resolved. My version is:

Library is file ~/.emacs.d/elpa/async-20140303.17/async.elc

Here is a new case occuring with mu4e while sending mail asynchronously. Mails are just sent fine when setting

 (setq message-send-mail-function 'smtpmail-send-it)

but when changing to async by:

   (require 'smtpmail-async)
      (setq
        send-mail-function 'async-smtpmail-send-it
        message-send-mail-function 'async-smtpmail-send-it
        async-debug t
      )

then sending fails (though reported differently) while posting:

Sending...done
[mu4e] Message sent
error in process sentinel: async-handle-result: Invalid read syntax: "#"
error in process sentinel: Invalid read syntax: "#"

Below is the full debug output. I hope this helps to hunt down the error this time. What ever I could do further, please let me know.

Asynchronous whishes, emelin

(New file) Mark set Making completion list... Auto-saving...done Mark set Saving file /Users/admin2/Maildirs/gmail_emelin/[Gmail].Drafts/cur/20140304-b8148a-on27:2,DS... Wrote /Users/admin2/Maildirs/gmailemelin/[Gmail].Drafts/cur/20140304-b8148a-on27:2,DS Sending... Mark set [2 times] Sending via mail... Delivering message to emelin emelinhocker@gmail.com... Transmitting sexp {{{'(lambda nil (require 'smtpmail) (with-temp-buffer (insert "User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.1\nFrom: admin2 emelin.hocker@gmail.com\nTo: emelin emelinhocker@gmail.com\nSubject: send test myself\nDate: Tue, 04 Mar 2014 22:32:49 +0200\nMessage-ID: m18uspbt72.fsf@on27.dyndns.org\nMIME-Version: 1.0\nContent-Type: text/plain\n--text follows this line--\nI love asynchronous things!\n\n-- \nSent with my mu4e\n\n") (setq mail-alias-separator-string '", " mail-extr-trailing-comment-start-pattern '" [-{]|--|[+@#></;]" smtpmail-debug-info 'nil mail-abbrev-mode-regexp '"^(Resent-)?(To|From|CC|BCC|Reply-to):" mail-send-actions 'nil mail-directory-function 'nil mail-extr-guess-middle-initial 'nil mail-reply-action 'nil mail-passwd-files '("/etc/passwd") smtpmail-code-conv-from 'nil mail-extr-leading-garbage '"\W+" mail-indentation-spaces '3 mail-citation-prefix-regexp '"([ ](\w|[.])+>+|[ ][]>|])+" mail-envelope-from 'nil mail-abbrev-modtime 'nil mail-mode-abbrev-table '[## 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] mail-abbrevs-only 'nil mail-extr-name-pattern '"\b[[:alpha:]][][[:alnum:]{|}'~---]*[[:alpha:]'.]" mail-extr-last-letters '"[:alpha:]'." smtpmail-default-smtp-server '"smtp.gmail.com" smtpmail-sendto-domain 'nil mail-directory-stream 'nil smtpmail-smtp-server '"smtp.gmail.com" mail-extr-bad-dot-pattern '"\\([][[:alnum:]{|}'~---][[:alpha:]'.]\\)\\.+\\([[:alpha:]]\\)" mail-hist-keep-history 't mail-extr-listserv-list-name-pattern '"Multiple recipients of list \\([-A-Z]+\\)" mail-names 't mail-citation-header 'nil mail-extr-alternative-address-pattern '"\\(aka *\\)?[a-zA-Z.]+[!@][a-zA-Z.]" mail-specify-envelope-from 'nil smtpmail-recipient-address-list '("papadromos@gmail.com") smtpmail-smtp-user 'nil mail-yank-hooks 'nil smtpmail-queue-counter '0 mail-archive-file-name 'nil mail-extr-ham-call-sign-pattern '"\\b\\(DX[0-9]+\\|[AKNW][A-Z]?[0-9][A-Z][A-Z]?[A-Z]?\\)" mail-use-rfc822 'nil mail-header-separator '"--text follows this line--" smtpmail-queue-dir '"~/Maildirs/queue/cur" mail-send-hook 'nil mail-extr-ignore-single-names 'nil mail-from-style 'default mail-abbrevs-loaded 'nil mail-extr-full-name-suffix-pattern '"\\(,? ?\\([JjSs][Rr]\\.?\\|V?I+V?\\)\\)\\([^][[:alnum:]{|}'~---]([^][[:alnum:]{|}'~---]\\|\\'\\)\\|\\'\\)" smtpmail-queue-index-file '"index" mail-font-lock-keywords '(("^\\(To\\|Newsgroups\\):" . font-lock-function-name-face) ("^\\(B?CC\\|Reply-to\\|Mail-\\(reply\\|followup\\)-to\\):" . font-lock-keyword-face) ("^\\(Subject:\\)[ ]*\\(.+\\)?" (1 font-lock-comment-face)) (eval let ((separator (if (zerop (length mail-header-separator)) " \\\' " (regexp-quote mail-header-separator)))) (cons (concat "^" separator "$") 'font-lock-warning-face)) ("[>|}]" ("\=[ ]((([[:alpha:]]+[[:alpha:]0-9.@-'\"]_\)?\([>|}][ ]_\)\)+\)\(._\)" (beginning-of-line) (end-of-line) (1 font-lock-comment-delimiter-face nil t) (5 font-lock-comment-face nil t))) ("^\(X-[A-Za-z0-9-]+\|In-reply-to\):._\(\n[ ]+._\)_$" . font-lock-string-face)) mail-extr-mangle-uucp 'nil mail-extr-x400-encoded-address-given-name-pattern '"/[Gg]=\([^/]+\)\(/\|\'\)" mail-complete-function 'ispell-complete-word mail-extr-all-top-level-domains '[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 org 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mil 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ac ad ae af ag aero ai gov 0 al jobs an ao 0 ba bb as bd be bf bg bh bi bj 0 bl bm bn bo 0 ca br museum cd 0 cf cg ch ci bz ck cl cm cn co 0 0 cr 0 0 de cv 0 cx cy dj dk edu uucp 0 do 0 0 0 ec 0 ee 0 eg eh 0 dz 0 0 0 0 0 0 0 er es et eu 0 0 0 fi fj fk 0 fm 0 fo 0 ga gb 0 gd ge gf gg gh gi 0 0 gl gm gn 0 gp gq gr gs biz gu travel gw 0 gy 0 hk 0 hm hn 0 0 0 hr 0 id ie 0 0 0 0 pro 0 il im in io 0 iq ir is it je 0 0 0 0 0 info 0 jm 0 jo jp 0 net 0 0 ke 0 kg kh ki 0 0 0 km kn 0 kp la lb lc 0 0 0 kw 0 li kz lk 0 0 0 0 0 ma lr mc md me mf mg mh ly 0 mk ml mm mn mo mp na mr nc tel ne nf ng mx ni mz 0 nl 0 0 no np 0 nr 0 0 nu 0 0 0 0 nz 0 0 om cat 0 0 pa 0 0 0 pe pf pg ph 0 0 pk pl pm pn 0 0 qa pr ps pt 0 0 pw 0 py 0 0 0 0 0 0 0 0 0 0 0 re 0 0 0 0 0 0 0 0 0 ro 0 sa sb sc sd se 0 sg sh si sj sk sl sm sn so 0 0 sr tc td su tf tg th sy tj tk tl tm tn to tp ua tr 0 tt 0 tv ug 0 0 tz uk 0 um arpa 0 0 va 0 vc 0 ve 0 vg 0 vi uz 0 0 0 vn 0 0 0 0 0 0 vu wf 0 0 0 0 0 0 0 0 coop 0 0 0 ws 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ye 0 0 0 0 0 0 0 0 0 0 0 za 0 0 yt yu 0 0 0 0 0 0 name zm 0 0 0 0 0 0 0 0 0 zw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 com 0 0 0 0 0 0 0 0 0 0 0 mobi 0 0 0 0 0 0 0 0 0 0 asia 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 int 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] mail-mailing-lists 'nil mail-personal-alias-file '"~/.mailrc" mail-self-blind 'nil mail-extr-ignore-realname-equals-mailbox-name 't mail-setup-hook 'nil mail-citation-hook 'nil mail-extr-x400-encoded-address-full-name-pattern '"/[Pp][Nn]=\([^/]+\)\(/\|\'\)" mail-extr-@-binds-tighter-than-! 'nil mail-mode-hook 'nil mail-extr-roman-numeral-pattern '"V?I+V?\b" mail-directory-requery 'nil mail-parse-ignored-charsets 'nil mail-extr-all-letters '"][[:alnum:]{|}'~---" mail-host-address 'nil mail-extr-hz-embedded-gb-encoded-chinese-pattern '"~{\([^~].\|~[^}]\)+~}" mail-complete-alist '(("^\(Resent-\)?\(To\|From\|CC\|BCC\|Reply-to\):" mail-get-names pattern) ("Newsgroups:" if (boundp 'gnus-active-hashtb) gnus-active-hashtb (if (boundp news-group-article-assoc) news-group-article-assoc)) ("Followup-To:" mail-sentto-newsgroups)) mail-address-field-regexp '"^\(Resent-\)?\(To\|From\|CC\|BCC\|Reply-to\):" mail-use-dsn 'nil smtpmail-mail-address 'nil mail-passwd-command 'nil mail-complete-style 'angles mail-extr-stupid-vms-date-stamp-pattern '"[0-9][0-9]-[JFMASOND][aepuco][nbrylgptvc]-[0-9][0-9][0-9][0-9] [0-9]+ *" mail-abbrevs 'nil mail-bury-selects-summary 't mail-extr-all-letters-but-separators '"][[:alnum:]{|}'~" mail-directory-parser 'nil mail-yank-ignored-headers '"^\(?:in-reply-to\|m\(?:ail-\(?:f\(?:ollowup-to\|rom\)\|reply-to\)\|essage-id\)\|origin\|re\(?:ceived\|mailed\|turn-path\)\|s\(?:tatus\|u\(?:bject\|mmary-line\)\)\|to\|via\|x-rmail-\(?:\(?:attribute\|keyword\)s\)\):" smtpmail-warn-about-unknown-extensions 'nil mail-extr-x400-encoded-address-pattern '"[a-z]?[a-z]?\(/[A-Za-z]+\(\.[A-Za-z]+\)?=[^/]+\)+/?\'" mail-extr-x400-encoded-address-surname-pattern '"/[Ss]=\([^/]+\)\(/\|\'\)" mail-alias-file 'nil mail-default-directory '"~/" mail-extr-x400-encoded-address-field-pattern-format '"/%s=\([^/]+\)\(/\|\'\)" mail-extr-initial-pattern '"\b[[:alpha:]]\([. ]\|\b\)" mail-dont-reply-to-names 'nil smtpmail-address-buffer '#<killed buffer> mail-extr-weird-acronym-pattern '"\([A-Z]+[-_/]\|[A-Z][A-Z][A-Z]?\b\)" mail-directory-process 'nil smtpmail-queue-mail 'nil mail-default-reply-to 'nil mail-extr-two-name-pattern '"\\(\b[[:alpha:]][][[:alnum:]{|}'~]+[[:alpha:]'.]\|\b[[:alpha:]]\([. ]\|\b\)\) +\(\b[[:alpha:]][][[:alnum:]{|}'~---]_[[:alpha:]'.])(,|\')" mail-encode-mml 'nil mail-header-format-function '#[(header value) "\302\303!!\304 :\203

thierryvolpiatto commented 10 years ago

emelin notifications@github.com writes:

Hello, I've read issue #22 carefully and -- as I understood -- it wasn't really resolved. Here is a new case occuring with mu4e while sending mail asynchronously. Mails are just sent fine when setting

(setq message-send-mail-function 'smtpmail-send-it)

but when changing to async by:

(require 'smtpmail-async) (setq send-mail-function 'async-smtpmail-send-it message-send-mail-function 'async-smtpmail-send-it async-debug t )

then sending fails (though reported differently) while posting:

Sending...done [mu4e] Message sent error in process sentinel: async-handle-result: Invalid read syntax: "#" error in process sentinel: Invalid read syntax: "#"

I am now using mu4e and still can't reproduce with my last modifications. What emacs version are you using ? How are you installing/compiling your files ? (please don't trust package.el or el-get etc... byte-compile your files yourself) Also what happen if you restart your emacs with no byte-compiled files at all ?

Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997

thierryvolpiatto commented 10 years ago

BTW these messages are sent with mu4e and async-smtpmail-send-it

Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997

jterk commented 10 years ago

See the recent updates to issue #22 - for me, at least, this issue is now resolved with the HEAD revision of this library.