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 Lisp's future Date: Thu, 09 Oct 2014 10:21:23 +0300 Message-ID: <83r3yhiu8c.fsf@gnu.org> References: <54193A70.9020901@member.fsf.org> <87wq8pwjen.fsf@uwakimon.sk.tsukuba.ac.jp> <837g0ptnlj.fsf@gnu.org> <87r3yxwdr6.fsf@uwakimon.sk.tsukuba.ac.jp> <87tx3tmi3t.fsf@fencepost.gnu.org> <834mvttgsf.fsf@gnu.org> <87lhp5m99w.fsf@fencepost.gnu.org> <87h9ztm5oa.fsf@fencepost.gnu.org> <87d2ahm3nw.fsf@fencepost.gnu.org> <871tqneyvl.fsf@netris.org> <87d2a54t1m.fsf@yeeloong.lan> <83lhotme1e.fsf@gnu.org> <871tql17uw.fsf@yeeloong.lan> <838uktm9gw.fsf@gnu.org> <87h9zgarvp.fsf@fencepost.gnu.org> <83y4srjaot.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1412839307 6976 80.91.229.3 (9 Oct 2014 07:21:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2014 07:21:47 +0000 (UTC) Cc: dak@gnu.org, mhw@netris.org, dmantipov@yandex.ru, emacs-devel@gnu.org, handa@gnu.org, monnier@iro.umontreal.ca, stephen@xemacs.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 09 09:21:39 2014 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 1Xc82Z-0006nj-K7 for ged-emacs-devel@m.gmane.org; Thu, 09 Oct 2014 09:21:35 +0200 Original-Received: from localhost ([::1]:40857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xc82Z-00080c-59 for ged-emacs-devel@m.gmane.org; Thu, 09 Oct 2014 03:21:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xc82J-00080V-7F for emacs-devel@gnu.org; Thu, 09 Oct 2014 03:21:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xc82E-0004Rt-Pq for emacs-devel@gnu.org; Thu, 09 Oct 2014 03:21:19 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:42708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xc829-0004RG-H0; Thu, 09 Oct 2014 03:21:09 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0ND6001001N0LA00@mtaout29.012.net.il>; Thu, 09 Oct 2014 10:20:17 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0ND600LQR1PSK640@mtaout29.012.net.il>; Thu, 09 Oct 2014 10:20:17 +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.185 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:175168 Archived-At: > Date: Wed, 08 Oct 2014 21:19:54 -0400 > From: Richard Stallman > CC: dak@gnu.org, mhw@netris.org, dmantipov@yandex.ru, > emacs-devel@gnu.org, handa@gnu.org, monnier@iro.umontreal.ca, > stephen@xemacs.org > > We do ask, but only at buffer save time. Asking questions when > visiting a file is perceived as a nuisance, because our heuristics > that detect these cases are imperfect and tend to have high enough > false positive rate that annoys people. > > Asking about invalid UTF-8 in a file could be a nuisance, but how much > of a nuisance depends on the details of what we do. Since this has > some security implications, it is worth a small amount of nuisance. That wasn't what users felt, overwhelmingly. > What exactly did we try before? AFAIR, we tried converting raw bytes into valid non-ASCII characters, and perhaps also replacing them with the equivalent of u+FFFD, the Unicode "replacement character". > Meanwhile, in a separate message I wrote about non-file operations: Well, you said "frile", which confused me ;-) However, ... > > We can set the defaults for those non-frile interfaces so as to reject > > invalid UTF-8 sequences. Then a program could specify to override the > > default and allow them. > > That has been tried (not with UTF-8, but I don't think this matters), > and failed miserably. > > I don't think we are talking about the same thing. I am talking about Lisp > functions to do conversions on text that does NOT come from files. ... Emacs treats all of these cases the same. For text we are going to send to a process or network stream, we ask the above-mentioned question at the time we encode the internal representation into the external byte stream we are about to send. E.g., you can see that in action in sending mail if you insert some raw bytes into a mail message in a *mail* buffer, and then try sending it. There's no file involved here, at least not as far as Emacs is concerned, and yet you will see the same prompt asking you to select a proper encoding. > You seem to be talking about operations on files: > > The experience taught us that Emacs users > definitely don't want Emacs to do _anything_ about the unmodified > parts of text, except copy it verbatim. Even the question we ask at > buffer-save time is sometimes reported as an annoyance. > > It looks like you're grouping the two cases together, > while I am treating them separately. Emacs treats them both the same way, and uses the same low-level primitives that generally don't know the purpose of the byte stream they are encoding or decoding. All they know is whether the source resp. destination is a buffer, a string, or a gap in the buffer text, which is insufficient to distinguish between the 2 use cases you are trying to treat separately.