From 40098786b578185966883d38b8448ff01a6da656 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 27 Jun 2011 02:02:15 +0200 Subject: [PATCH] Bind coding-system-for-* to binary to possibly avoid line encoding issues on Windows (among other things). --- lisp/ChangeLog | 6 ++++++ lisp/mail/smtpmail.el | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 98b5ac37ef2..294a22f40f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-06-27 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-via-smtp): Bind coding-system-for-* + to binary to possibly avoid line encoding issues on Windows (among + other things). + 2011-06-26 Lars Magne Ingebrigtsen * net/network-stream.el (open-network-stream): Return an :error diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 4a3cb906570..ece4de669d0 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -488,9 +488,9 @@ The list is in preference order.") (secret . "SMTP password for %u@%h: "))) (auth-info (car (auth-source-search - :max 1 :host host :port port + :max 1 :require (and ask-for-password '(:user :secret)) :create ask-for-password))) @@ -615,6 +615,8 @@ The list is in preference order.") (and mail-specify-envelope-from (mail-envelope-from)) user-mail-address)) + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) response-code process-buffer result @@ -629,6 +631,7 @@ The list is in preference order.") ;; clear the trace buffer of old output (with-current-buffer process-buffer + (set-buffer-multibyte nil) (setq buffer-undo-list t) (erase-buffer)) -- 2.39.2