From: David Abrahams <dave@boost-consulting.com>
Cc: ding@gnus.org
Subject: Re: Double Newlines
Date: Tue, 25 Jul 2006 23:02:04 -0400 [thread overview]
Message-ID: <ubqrdjcgj.fsf@boost-consulting.com> (raw)
In-Reply-To: <b4mmzaxw60n.fsf@jpl.org> (Katsumi Yamaoka's message of "Wed, 26 Jul 2006 09:42:48 +0900")
Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>>> In <ubqrdoizi.fsf@boost-consulting.com> David Abrahams wrote:
>
>>> (setq message-send-mail-function
>>> (lambda nil
>>> (let ((coding-system-for-write 'binary))
>>> (write-region (point-min) (point-max) "~/TESTMAIL"))))
>>>
>>> What do you see there?
>
>> This is a test=0D
>> This is only a test=0D
>> If this had been an actual message, we'd tell you.=0D
>
>>> If newlines are doubled already,
>
>> I don't know for sure how to interpret the above, but my first guess
>> is that they're not (right?)
>
> That looks strange to me. `=0D' is the one that the CR character
> (0x0d) was encoded by quoted-printable. What does the following
> Lisp form return? (To do that, copy it to the *scratch* buffer
> and type `C-j' at the end of the last line.) [1]
>
> (let ((file (make-temp-file "testing"))
> (coding-system-for-write 'iso-8859-1)
> (coding-system-for-read 'binary))
> (with-temp-file file
> (insert "foo\n"))
> (prog1
> (with-temp-buffer
> (insert-file-contents file)
> (buffer-string))
> (delete-file file)))
>
> If you see
>
> "foo^M
> "
> , your Emacs 22 has a bug.
That's what I see.
> Since Kenichi Handa fixed the bug[2]
> recently[3], updating your Emacs 22 might fix the problem[4].
Okay, that's my next step, thanks.
> [1] It might probably be able to reproduce simply by the form:
>
> (encode-coding-string "foo\n" 'iso-8859-1)
yep.
> [2] Under the system in which the system_eol_type is CRLF (i.e.,
> Windows), Emacs 22 encodes text by the coding system FOO as if
> it is FOO-dos.
>
> [3] (lisp/ChangeLog)
> 2006-07-20 Kenichi Handa <handa@m17n.org>
>
> * international/mule-cmds.el (select-safe-coding-system): Fix the
> way of deciding eol-type of the coding system.
>
> [4] I'm not quite sure that `=0D' is decoded into a newline.
>
>>> the cause might be in the Gnus' encoder. Otherwise, the program to
>>> send mails or the mail server might do something strange. Whether
>>> or no, I cannot imagine what does it, though.
>
>> I'm running a local Exim on this machine to send the mail out. Maybe
>> I should be looking at that. On the other hand, this particular
>> instance of the phenomenon showed up in a newsgroup posting, not a
>> mail message. I don't think NG postings are handled like regular
>> mail, are they? If not, then they're not going through Exim and Gnus
>> might still be involved. Does message-send-mail-function get used for
>> NG postings, or just email? If it's just for email, then our TESTMAIL
>> test doesn't tell us very much.
>
> If the problem is concerned with the charset encoding, it will
> happen with both mail and news.
Thanks, I'll try rebuilding my emacs now.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
next prev parent reply other threads:[~2006-07-26 3:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-25 7:15 David Abrahams
2006-07-25 11:42 ` Katsumi Yamaoka
2006-07-25 14:29 ` David Abrahams
2006-07-26 0:42 ` Katsumi Yamaoka
2006-07-26 3:02 ` David Abrahams [this message]
2006-07-26 11:59 ` Katsumi Yamaoka
2006-07-27 9:28 ` Katsumi Yamaoka
2006-07-28 9:41 ` Katsumi Yamaoka
2006-07-26 21:59 ` David Abrahams
2006-07-26 23:48 ` Katsumi Yamaoka
2006-07-27 18:02 ` Reiner Steib
2006-07-28 3:28 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ubqrdjcgj.fsf@boost-consulting.com \
--to=dave@boost-consulting.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).