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: [Emacs-diffs] master db828f6: Don't rely on defaults in decoding UTF-8 encoded Lisp files Date: Mon, 28 Sep 2015 09:53:20 +0300 Message-ID: <83pp13dogv.fsf@gnu.org> References: <20150921165211.20434.28114@vcs.savannah.gnu.org> <83fv27mt7r.fsf@gnu.org> <83wpvfix7i.fsf@gnu.org> <83fv23hr0z.fsf@gnu.org> <5605CB6B.4000102@cs.ucla.edu> <83twqhhf0g.fsf@gnu.org> <5606AC48.7090801@cs.ucla.edu> <83zj09fbzp.fsf@gnu.org> <5606C140.6090309@cs.ucla.edu> <878u7trwlb.fsf@fencepost.gnu.org> <5606E995.2000102@cs.ucla.edu> <83si61ezxd.fsf@gnu.org> <2FCA0DAD-831B-4B0A-B948-9F31DE52B6F0@gmail.com> <87twqgrgtv.fsf@fencepost.gnu.org> <56077423.6030800@cs.ucla.edu> <87pp14qvkf.fsf@fencepost.gnu.org> <5608A8E0.8080201@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443423220 18930 80.91.229.3 (28 Sep 2015 06:53:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Sep 2015 06:53:40 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 28 08:53:31 2015 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 1ZgSJU-0007ov-2Q for ged-emacs-devel@m.gmane.org; Mon, 28 Sep 2015 08:53:28 +0200 Original-Received: from localhost ([::1]:60973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgSJT-0004vy-Em for ged-emacs-devel@m.gmane.org; Mon, 28 Sep 2015 02:53:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgSJG-0004vp-La for emacs-devel@gnu.org; Mon, 28 Sep 2015 02:53:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgSJD-0007Oa-F0 for emacs-devel@gnu.org; Mon, 28 Sep 2015 02:53:14 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:50542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgSJD-0007OT-6D; Mon, 28 Sep 2015 02:53:11 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NVD00I00KG78700@a-mtaout20.012.net.il>; Mon, 28 Sep 2015 09:53:10 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVD00IYFKGL7O00@a-mtaout20.012.net.il>; Mon, 28 Sep 2015 09:53:10 +0300 (IDT) In-reply-to: <5608A8E0.8080201@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:190429 Archived-At: > From: Paul Eggert > Date: Sun, 27 Sep 2015 19:41:36 -0700 > Cc: emacs-devel@gnu.org > > The discussion has morphed into the possibility of a similar facility for files > other than .el files, and what the defaults for such a facility should be. The > idea is to somehow avoid the need for UTF-8 coding cookies for users who prefer > Emacs to default to UTF-8 for text files regardless of system locale. I think (prefer-coding-system 'utf-8) is what those users should do, but I'm not sure. It definitely sets the defaults for new files and for communicating with sub-processes (the latter part might not be what you want, btw), but its effect on decoding existing files might sometimes surprise, due to the way the priority of trying various decoders is implemented. (Hint: look at the implementation of set-coding-priority, the function that is called under the hood by prefer-coding-system.) Btw, the issue under discussion, as I perceive it, was somewhat different: how to ensure correct decoding of UTF-8 encoded files (other than *.el) in Emacs source tree _regardless_ of whether the user in question wants to prefer UTF-8 outside of Emacs tree. The best solution we have now is to have a coding cookie in each such file, and the question is how can that be avoided. IOW, the solution should IMO be independent of user's preferences.