From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday Reddy Newsgroups: gmane.emacs.devel Subject: Re: Emacs24 coding system problems Date: Sun, 25 Nov 2012 20:36:29 +0000 Message-ID: <20658.33101.528000.856021@gargle.gargle.HOWL> References: <20627.33570.796000.901596@gargle.gargle.HOWL> <20649.12724.125000.858979@gargle.gargle.HOWL> <83k3tizkl2.fsf@gnu.org> <20649.61758.750000.69012@gargle.gargle.HOWL> <20657.53134.989000.793074@gargle.gargle.HOWL> <20657.63114.521000.806863@gargle.gargle.HOWL> <83d2z1zmyz.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1353875808 3993 80.91.229.3 (25 Nov 2012 20:36:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Nov 2012 20:36:48 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, Uday Reddy , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 25 21:36:59 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tciwh-0004Ip-8d for ged-emacs-devel@m.gmane.org; Sun, 25 Nov 2012 21:36:55 +0100 Original-Received: from localhost ([::1]:48285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TciwW-0000oY-Dz for ged-emacs-devel@m.gmane.org; Sun, 25 Nov 2012 15:36:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TciwT-0000nc-S1 for emacs-devel@gnu.org; Sun, 25 Nov 2012 15:36:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TciwS-0000S1-RQ for emacs-devel@gnu.org; Sun, 25 Nov 2012 15:36:41 -0500 Original-Received: from sun61.bham.ac.uk ([147.188.128.150]:41417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TciwS-0000Rx-LY; Sun, 25 Nov 2012 15:36:40 -0500 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun61.bham.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1TciwL-0000Nw-Mn; Sun, 25 Nov 2012 20:36:33 +0000 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk (envelope-from ) with esmtp (Exim 4.72) id 1TciwK-0006Zn-G1 using interface smart1.bham.ac.uk; Sun, 25 Nov 2012 20:36:32 +0000 Original-Received: from gromit.cs.bham.ac.uk ([147.188.193.16] helo=MARUTI.cs.bham.ac.uk) by mx1.cs.bham.ac.uk with esmtp (Exim 4.51) id 1TciwK-0004Vt-RV; Sun, 25 Nov 2012 20:36:32 +0000 In-Reply-To: <83d2z1zmyz.fsf@gnu.org> X-Mailer: VM 8.2.0b under 24.2.1 (i386-mingw-nt5.1.2600) X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 147.188.128.150 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155083 Archived-At: Eli Zaretskii writes: > I'm confused: is this problem specific to MS-Windows? I don't think > you ever mentioned Windows in this thread before; did I miss > something? I didn't know it was specific to Windows either. But, given that Kazuhiro's workaround fixed the problem, it must be. It appears that Emacs24 is not treating `buffer-file-type' as buffer-local variable, at least in some places inside its guts. The Bug Report #12989 demonstrated that. > So let's revisit your last finding. You said: > > > Tracing through find-file-noselect-1, I found that `rawfile' was set to > > nil. Then there is call to `insert-file-contents'. When it returns, > > enable-multibyte-characters has been set to nil. > > The logical next step is to find out what happened during the call to > insert-file-contents. The most probable suspect is the call to the > function after-insert-file-set-coding. insert-file-contents calls it > after reading the file into a buffer, in order to find the appropriate > coding-system to set the buffer's buffer-file-coding-system. Can you > see what happens inside after-insert-file-set-coding? insert-file-contents calls find-buffer-file-type-coding-system, which returns (no-conversion . no-conversion). enable-multibyte-characters has been set to nil already. after-insert-file-set-coding doesn't make any difference to this. If I set buffer-file-type to nil and try again: - find-buffer-file-type-coding-system returns (undecided . undecided). enable-multibyte-characters is still nil. - By the time after-insert-file-set-coding gets called, enable-multibyte-characters has already been set to t. All is well after that. Cheers, Uday