all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Boruch Baum <boruch_baum@gmx.com>
Cc: 44513@debbugs.gnu.org
Subject: bug#44513: default value of file-name-coding-system
Date: Sun, 08 Nov 2020 14:58:17 +0200	[thread overview]
Message-ID: <80FA4C56-8A61-4B0C-87AA-948AC731035C@gnu.org> (raw)
In-Reply-To: <20201108122703.amq5doup7kzourwj@E15-2016.optimum.net>

On November 8, 2020 2:27:03 PM GMT+02:00, Boruch Baum <boruch_baum@gmx.com> wrote:
> On 2020-11-08 13:29, Eli Zaretskii wrote:
> > On November 8, 2020 11:15:50 AM GMT+02:00, Boruch Baum
> <boruch_baum@gmx.com> 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  => nil
> > >   (default-value file-name-coding-system) => nil
> > >          default-file-name-coding-system  => utf-8-unix
> >
> > These are 2 separate variables, see the doc string of
> default-file-name-coding-system.  One is for the user to set, thus nil
> by default, the other is what Emacs thinks should be the OS default. 
> They are separate because Unix filesystems traditionally treat file
> names as byte streams, without imposing any encoding restrictions on
> them.
> 
> I'm proposing that even the one that's 'for the user to set' should
> have
> a sane default. 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). 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". If so, maybe it should be part of the
> official
> emacs tutorial (sarcasm)?

I completely agree with the sane default requirement.  Which is why the default is nil, and why users are not required to set file-name-coding-system: nil does TRT.  You can see that every day in Emacs if you use non-ASCII file names, because Emacs encodes every file name it passes to the system APIs.

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 should consult default-file-name-coding-system if the user variable is nil, as it usually is.





  reply	other threads:[~2020-11-08 12:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-08  9:15 bug#44513: default value of file-name-coding-system Boruch Baum
2020-11-08 11:29 ` Eli Zaretskii
2020-11-08 12:27   ` Boruch Baum
2020-11-08 12:58     ` Eli Zaretskii [this message]
2020-11-09 15:37       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80FA4C56-8A61-4B0C-87AA-948AC731035C@gnu.org \
    --to=eliz@gnu.org \
    --cc=44513@debbugs.gnu.org \
    --cc=boruch_baum@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.