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#44513: default value of file-name-coding-system Date: Sun, 08 Nov 2020 14:58:17 +0200 Message-ID: <80FA4C56-8A61-4B0C-87AA-948AC731035C@gnu.org> References: <20201108091550.lqomueilkbxxhcl7@E15-2016.optimum.net> <92897EE1-AEF0-4E4C-A66B-12DCF3843CAF@gnu.org> <20201108122703.amq5doup7kzourwj@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25701"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android Cc: 44513@debbugs.gnu.org To: Boruch Baum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 08 13:59:10 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 1kbkHm-0006bY-9l for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Nov 2020 13:59:10 +0100 Original-Received: from localhost ([::1]:55716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbkHk-00070b-OY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Nov 2020 07:59:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbkHe-00070O-Sb for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 07:59:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbkHe-0000Vo-Hz for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 07:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbkHe-0002Wd-Fs for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 07:59: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: Sun, 08 Nov 2020 12:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44513 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org, 44513@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16048403069652 (code B ref -1); Sun, 08 Nov 2020 12:59:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Nov 2020 12:58:26 +0000 Original-Received: from localhost ([127.0.0.1]:59948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbkH3-0002Vc-L5 for submit@debbugs.gnu.org; Sun, 08 Nov 2020 07:58:25 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbkGz-0002VS-JV for submit@debbugs.gnu.org; Sun, 08 Nov 2020 07:58:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbkGz-0006us-9t for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 07:58:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48588) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbkGy-0000JG-Qp; Sun, 08 Nov 2020 07:58:20 -0500 Original-Received: from [2a02:14f:80:78ff::1] (port=43116) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1kbkGx-0007LG-PX; Sun, 08 Nov 2020 07:58:20 -0500 In-Reply-To: <20201108122703.amq5doup7kzourwj@E15-2016.optimum.net> 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:192876 Archived-At: On November 8, 2020 2:27:03 PM GMT+02:00, Boruch Baum wrote: > On 2020-11-08 13:29, Eli Zaretskii wrote: > > On November 8, 2020 11:15:50 AM GMT+02:00, Boruch Baum > wrote: > > > Shouldn't emacs ship with the default value of variable > > > file-name-coding-system being equal to that of the default value > of > > > default-file-name-coding-system? > > > > > > file-name-coding-system =3D> nil > > > (default-value file-name-coding-system) =3D> nil > > > default-file-name-coding-system =3D> utf-8-unix > > > > These are 2 separate variables, see the doc string of > default-file-name-coding-system=2E One is for the user to set, thus nil > by default, the other is what Emacs thinks should be the OS default=2E= =20 > They are separate because Unix filesystems traditionally treat file > names as byte streams, without imposing any encoding restrictions on > them=2E >=20 > I'm proposing that even the one that's 'for the user to set' should > have > a sane default=2E I'm a user, and it never occurred to me I needed to > set > that variable (among all the other emacs variables begging a > customization)=2E What percentage of users do you think install emacs > and > on their own initiative say, "Of course, I now need to set > file-name-coding-system"=2E If so, maybe it should be part of the > official > emacs tutorial (sarcasm)? I completely agree with the sane default requirement=2E Which is why the = default is nil, and why users are not required to set file-name-coding-syst= em: nil does TRT=2E You can see that every day in Emacs if you use non-ASC= II file names, because Emacs encodes every file name it passes to the syste= m APIs=2E The original issue, btw, was not about what users should do, it was about = what Lisp programs processing and interpreting file names should do: they s= hould consult default-file-name-coding-system if the user variable is nil, = as it usually is=2E