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: Fri, 25 Sep 2015 16:37:34 +0300 Message-ID: <834miiipr5.fsf@gnu.org> References: <20150921165211.20434.28114@vcs.savannah.gnu.org> <83fv27mt7r.fsf@gnu.org> <83wpvfix7i.fsf@gnu.org> <83fv23hr0z.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1443188282 26338 80.91.229.3 (25 Sep 2015 13:38:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 13:38:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 25 15:37:53 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 1ZfTC5-00055s-HM for ged-emacs-devel@m.gmane.org; Fri, 25 Sep 2015 15:37:45 +0200 Original-Received: from localhost ([::1]:40246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfTC4-0003Us-VI for ged-emacs-devel@m.gmane.org; Fri, 25 Sep 2015 09:37:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfTC2-0003Tz-E9 for emacs-devel@gnu.org; Fri, 25 Sep 2015 09:37:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfTBz-00057G-5d for emacs-devel@gnu.org; Fri, 25 Sep 2015 09:37:42 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:48293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfTBy-00056K-Tu for emacs-devel@gnu.org; Fri, 25 Sep 2015 09:37:39 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NV800500IRYL900@mtaout28.012.net.il> for emacs-devel@gnu.org; Fri, 25 Sep 2015 16:37:16 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NV800JN6J64T5A0@mtaout28.012.net.il>; Fri, 25 Sep 2015 16:37:16 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 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:190345 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Fri, 25 Sep 2015 08:21:59 -0400 >=20 > > E.g., try saving a foo.el with the following contents: > > > > (setq string "=D7=90=E2=80=9C=E2=80=9D") > > > > using cp1255, then kill the buffer and visit it again. >=20 > AFAIK saving in this way requires very explicit action on the part = of > the user. She gets what she asked for. Who does? We are talking about 2 different people here, the one who was sloppy forgetting the coding cookie, and another who visited it. > I can imagine a future where we don't even support Elisp files usin= g > another coding system (i.e. throw away the load-with-code-conversio= n > machinery). I'm not sure this can be done. AFAIK, a few files under leim/quail are encoded with non-UTF encoding, and for a good reason. > > More generally, I think we should require any text file in the Em= acs > > repository that includes non-ASCII characters to have an explicit > > coding cookie, so that these subtle problems don't lie low becaus= e > > most Emacs contributors live in UTF-8 locales. >=20 > My view OTOH is that the future is utf-8 only If you know the future, perhaps you could suggest which shares of wha= t companies I should invest in? Why waste such an important insight on some insignificant piece of software? > we need to find ways to go from here (i.e. "need a coding: tag for > any non-ASCII file") to there. I don't have an answer in general, > but prefer-utf-8 is a step in that direction, which can be used for > some class of files (e.g. Elisp). I think there's no way from here to there, not as long as our encodin= g detection's reliability is what it is.