From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: ^M in the info files Date: Tue, 13 Jan 2009 00:04:48 +0200 Message-ID: References: <00aa01c951a0$4535a2d0$0200a8c0@us.oracle.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1231797969 4729 80.91.229.12 (12 Jan 2009 22:06:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2009 22:06:09 +0000 (UTC) Cc: emacs-devel@gnu.org, handa@m17n.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 12 23:07:20 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LMUwD-0006lZ-Lv for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2009 23:07:13 +0100 Original-Received: from localhost ([127.0.0.1]:41686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMUux-0006A4-G4 for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2009 17:05:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LMUtx-00060I-0y for emacs-devel@gnu.org; Mon, 12 Jan 2009 17:04:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LMUtv-0005zg-Lv for emacs-devel@gnu.org; Mon, 12 Jan 2009 17:04:52 -0500 Original-Received: from [199.232.76.173] (port=53991 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMUtv-0005za-DF for emacs-devel@gnu.org; Mon, 12 Jan 2009 17:04:51 -0500 Original-Received: from mtaout1.012.net.il ([84.95.2.1]:46014) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LMUtu-0006m4-Rl for emacs-devel@gnu.org; Mon, 12 Jan 2009 17:04:51 -0500 Original-Received: from conversion-daemon.i-mtaout1.012.net.il by i-mtaout1.012.net.il (HyperSendmail v2007.08) id <0KDD00A00P6QVJ00@i-mtaout1.012.net.il> for emacs-devel@gnu.org; Tue, 13 Jan 2009 00:04:58 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.39.198]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KDD004H3PC96LH0@i-mtaout1.012.net.il>; Tue, 13 Jan 2009 00:04:58 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107808 Archived-At: > From: Stefan Monnier > Cc: Kenichi Handa , emacs-devel@gnu.org > Date: Mon, 12 Jan 2009 15:56:16 -0500 > > > This creates an inconsistency for Lisp programs that do their own > > decoding: if they call detect-coding-region/string for a region or > > string with null bytes, they will not see no-conversion in the return > > value, but insert-file-contents will use no-conversion nonetheless. > > > I think this inconsistency constitutes a bug. > > Indeed, it sounds like a bug. Not sure how/when it would manifest > itself, tho. Well, for starters, it means that insert-file-contents does its own detection that cannot be separated from it on the Lisp level. That is, (let ((coding-system-for-read 'undecided)) (insert-file-contents FOO)) and (insert-file-contents-literally FOO) (let ((coding-system-for-read (detect-coding-region (point-min) (point-max) t))) (insert-file-contents FOO)) will surprisingly produce different results.