From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64235 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: smtpmail.el: set-buffer-file-coding-system takes too many args Date: Sun, 07 Jan 2007 13:09:58 +0100 Message-ID: References: <87d55svxxu.fsf@latte.josefsson.org> <87irfjf8m9.fsf@latte.josefsson.org> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168171824 26906 80.91.229.12 (7 Jan 2007 12:10:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2007 12:10:24 +0000 (UTC) Cc: ding@gnus.org, David Z Maze Original-X-From: ding-owner+M12758@lists.math.uh.edu Sun Jan 07 13:10:22 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1H3Wqz-000655-6G for ding-account@gmane.org; Sun, 07 Jan 2007 13:10:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1H3Wqu-0004he-8a; Sun, 07 Jan 2007 06:10:16 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1H3Wqs-0004hK-Rp for ding@lists.math.uh.edu; Sun, 07 Jan 2007 06:10:14 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1H3Wqm-0003Cj-Dn for ding@lists.math.uh.edu; Sun, 07 Jan 2007 06:10:14 -0600 Original-Received: from mail.uni-ulm.de ([134.60.1.1]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1H3Wqi-0006XE-00 for ; Sun, 07 Jan 2007 13:10:04 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by mail.uni-ulm.de (8.13.8/8.13.8) with ESMTP id l07C9xcA004413; Sun, 7 Jan 2007 13:09:59 +0100 (MET) Original-Received: from viandante.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by bridgekeeper.physik.uni-ulm.de (Postfix) with SMTP id B312F1252D; Sun, 7 Jan 2007 13:09:59 +0100 (CET) Original-Received: (nullmailer pid 21627 invoked by uid 170); Sun, 07 Jan 2007 12:09:59 -0000 Original-To: Eli Zaretskii X-Face: 1;h7XMU[7l}$T@J.D}5z*w8Tg'}B5ArAWc8>2X~otB;kOjKs8X%|hTC#dG:%Vpx")x7S/`v :VXU#fZW$X$zdhEU.RfVQ@<-m9IuN{Hm"fW{,5]6kR'M*vEs+{5Cj!L(JTRzA$(},?5J=sm;%Od, ding@gnus.org, David Z Maze User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux) X-DCC-CTc-dcc1-Metrics: gemini 1030; Body=3 Fuz1=3 Fuz2=3 X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64235 Archived-At: On Sun, Jan 07 2007, Simon Josefsson wrote: > Reiner Steib writes: >> BTW: Is NOMODIFY really useful here? In both cases, >> `set-buffer-file-coding-system' is followed by >> `insert-buffer-substring' which will mark the buffer modified anyhow. >> What am I missing? > > Hm, I agree that it looks funny. Maybe you could ask whomever applied > this, if it is really needed? I agree that it doesn't seem very > useful, and the modified-flag seems rather pointless for temporary > buffers anyway. Eli, we wonder if the NOMODIFY argument to `set-buffer-file-coding-system' in your 2006-11-24 change of `smtpmail.el' (see below) is useful. NOMODIFY breaks compatibility with Emacs 21. Although it's not a goal for `smtpmail.el' in Emacs CVS to be compatible with Emacs 21, it would be "nice-to-have" because `smtpmail.el' provides very useful features for Gnus user on Emacs 21 (SMTP-AUTH, STARTTLS, ...). This was the reason why we include a copy of `smtpmail.el' from Emacs in Gnus' contrib directory. (See http://thread.gmane.org/gmane.emacs.gnus.general/64222/focus=64233 for the rest of this thread.) ,---- | 2006-11-24 Eli Zaretskii | | * mail/smtpmail.el (smtpmail-send-it): | Copy buffer-file-coding-system from the mail buffer. Possibly add a | MIME header for the message encoding. | Bind coding-system-for-write around the call to mail-do-fcc. | Use smtpmail-code-conv-from to encode queued mail messages. `---- --8<---------------cut here---------------start------------->8--- --- smtpmail.el 18 Oct 2006 11:11:32 -0000 1.88 +++ smtpmail.el 24 Nov 2006 14:32:19 -0000 1.89 @@ -244,6 +244,11 @@ (save-excursion (set-buffer tembuf) (erase-buffer) + ;; Use the same buffer-file-coding-system as in the mail + ;; buffer, otherwise any write-region invocations (e.g., in + ;; mail-do-fcc below) will annoy with asking for a suitable + ;; encoding. + (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) ;; require one newline at the end. [...] @@ -370,6 +394,7 @@ (make-directory smtpmail-queue-dir t)) (with-current-buffer buffer-data (erase-buffer) + (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring tembuf) (write-file file-data) (set-buffer buffer-elisp) --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/