From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44486: 27.1; C-@ chars corrupt elisp buffer Date: Sat, 14 Nov 2020 18:13:49 +0200 Message-ID: <83eekvvruq.fsf@gnu.org> References: <878sbeikpr.fsf@posteo.net> <87zh3u8pqn.fsf@igel.home> <83blga8pdp.fsf@gnu.org> <838sbe8nny.fsf@gnu.org> <83361m8d1t.fsf@gnu.org> <87blg6lem7.fsf@gnus.org> <83r1p24ieo.fsf@gnu.org> <83h7psug9r.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40260"; mail-complaints-to="usenet@ciao.gmane.io" Cc: thievol@posteo.net, larsi@gnus.org, schwab@linux-m68k.org, 44486@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 14 17:15:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdyCm-000AJY-8t for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 17:15:12 +0100 Original-Received: from localhost ([::1]:51642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdyCl-0001he-7c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 11:15:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdyCc-0001fb-Tr for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:15:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40175) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdyCc-0003d9-KD for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdyCc-0004yF-GK for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Nov 2020 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44486 X-GNU-PR-Package: emacs Original-Received: via spool by 44486-submit@debbugs.gnu.org id=B44486.160537045618958 (code B ref 44486); Sat, 14 Nov 2020 16:15:02 +0000 Original-Received: (at 44486) by debbugs.gnu.org; 14 Nov 2020 16:14:16 +0000 Original-Received: from localhost ([127.0.0.1]:51715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdyBo-0004vd-16 for submit@debbugs.gnu.org; Sat, 14 Nov 2020 11:14:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdyBl-0004vQ-Le for 44486@debbugs.gnu.org; Sat, 14 Nov 2020 11:14:10 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56868) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdyBf-0003IF-AK; Sat, 14 Nov 2020 11:14:03 -0500 Original-Received: from [176.228.60.248] (port=4626 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kdyBe-0002bx-Kw; Sat, 14 Nov 2020 11:14:03 -0500 In-Reply-To: (message from Stefan Monnier on Sat, 14 Nov 2020 10:19:57 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193296 Archived-At: > From: Stefan Monnier > Cc: larsi@gnus.org, thievol@posteo.net, handa@gnu.org, > schwab@linux-m68k.org, 44486@debbugs.gnu.org > Date: Sat, 14 Nov 2020 10:19:57 -0500 > > >> Actually, for prefer-utf-8 files, I think we never want to automatically > >> fallback to binary. > > I think you are assuming prefer-utf-8 is something other than what it > > is. It is not a variant of UTF-8, it is a variant of 'undecided' > > (i.e. it starts by detecting the encoding), which prefers UTF-8 if > > that can decode the text. > > My position is not based on principles but on pragmatic concerns. > AFAIK `prefer-utf-8` is only ever used for files which are known to > contain text and should almost always contain UTF-8 text. For those, we should use utf-8, not prefer-utf-8. > I believe if there's a NUL byte in such a files but it otherwise doesn't > contain any invalid UTF-8 byte sequence, it will result in better > behavior if we treat it as UFT-8 than as binary. We treat null bytes as the _single_ telltale sign of a binary file. If we disable that in coding-systems that are supposed to _detect_ encoding, we will never be able to detect binary files.