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: EOL conversion of files in .tar archives Date: Wed, 23 May 2007 10:15:55 +0300 Message-ID: References: <87abvwrzwz.fsf@stupidchicken.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1179904568 9910 80.91.229.12 (23 May 2007 07:16:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 May 2007 07:16:08 +0000 (UTC) Cc: emacs-devel@gnu.org, handa@m17n.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 23 09:16:05 2007 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 1Hql4m-0005gY-Eu for ged-emacs-devel@m.gmane.org; Wed, 23 May 2007 09:16:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hql4n-0007J7-25 for ged-emacs-devel@m.gmane.org; Wed, 23 May 2007 03:16:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hql4i-0007Ir-N8 for emacs-devel@gnu.org; Wed, 23 May 2007 03:16:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hql4g-0007Id-5T for emacs-devel@gnu.org; Wed, 23 May 2007 03:15:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hql4f-0007Ia-V8 for emacs-devel@gnu.org; Wed, 23 May 2007 03:15:58 -0400 Original-Received: from nitzan.inter.net.il ([213.8.233.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hql4e-00070r-7z for emacs-devel@gnu.org; Wed, 23 May 2007 03:15:56 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-9-138.inter.net.il [80.230.9.138]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id GUL55041 (AUTH halo1); Wed, 23 May 2007 10:15:53 +0300 (IDT) In-reply-to: <87abvwrzwz.fsf@stupidchicken.com> (message from Chong Yidong on Tue, 22 May 2007 23:18:04 -0400) X-detected-kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) 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:71646 Archived-At: > Cc: handa@m17n.org, emacs-devel@gnu.org > From: Chong Yidong > Date: Tue, 22 May 2007 23:18:04 -0400 > > Eli Zaretskii writes: > > > > This solves the problem with the EOL decoding, but reveals a very > > strange phenomenon: dos-w32.el and dos-w32.elc behave differently. > > ... > > - (set-buffer-file-coding-system coding)) > > + (set-buffer-file-coding-system last-coding-system-used t)) > > What's the rationale for this change? 2 reasons: First, without the 3rd arg, set-buffer-file-coding-system does not force the coding-system of the buffer to `coding', it rather _merges_ them (see the code for the details). Second, `coding' could be `undecided', in which case decode-coding-region would set last-coding-system-used to the actual encoding it detected and used to decode the file's contents. Thus, using last-coding-system-used is more accurate (and in fact I believe it's TRT on all platforms, not only on Windows). > (And I think the use of last-coding-system-used leads to the > "strange phenomenon" mentioned above.) No, the ``strange phenomenon'' was observed in the previous patch, that didn't have this change. > All this makes me more dubious about adding this code now. We should > either make this entire change conditional on win32 (hedious as the > resulting code might be) or simply postphone it for Emacs 22.2. I'm okay with conditioning on w32 on the release branch.