emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 83e0442139f: There are no file modes on windows and dos


From: Eli Zaretskii
Subject: Re: master 83e0442139f: There are no file modes on windows and dos
Date: Sat, 07 Oct 2023 08:38:59 +0300

> From: Sam Steingold <sds@gnu.org>
> Cc: Po Lu <luangruo@yahoo.com>,  emacs-devel@gnu.org
> Date: Fri, 06 Oct 2023 12:55:14 -0400
> 
> > * Eli Zaretskii <ryvm@tah.bet> [2023-09-29 17:10:54 +0300]:
> >
> > I have much more serious issues with this change: it is an
> > incompatible change in a long-standing behavior, which AFAIR was never
> > discussed.  Worse, it loses information: files that are read-only
> > (something that _is_ supported on Windows) are no longer marked as
> > unwritable, and executable files (not marked as such in the
> > filesystem, but still a clearly existing attribute that we support) is
> > not shown as such, either.
> 
> I came back to windows after a decade-long hiatus and found this feature
> (ls-lisp-verbosity) and thought that lack of mode removing was a simple
> oversight.

It wasn't.  ls-lisp.el intentionally emulates 'ls' as much as
possible.  The intent is to provide UX as similar as possible to GNU
and Unix systems.

> > I think if anything, this should (a) show 3-4 letters instead of just
> > d or dash, i.e. drwx for a writable directory, -r-- for read-only
> > files, -rwx for writable and executable files, etc;
> 
> I did not realize that this notion of permission exists in the MS world
> - but, I suppose, it depends on the FS and NTFS probably supports some
> form of it.

No, the read-only bit is supported even by the old DOS FAT
filesystems.  And the executable bit, as computed by Emacs on these
systems, is also independent of the filesystem type.

> I suppose I should keep 4 chars instead of just 1 when `modes` is not in
> `ls-lisp-verbosity'.

Yes, that's the minimum change we need.

> > (b) be an opt-in behavior, i.e. we need a new defcustom for it.
> 
> Adding / removing `modes' to `ls-lisp-verbosity' is opt-out/in already.

Yes, but if someone was used to customize ls-lisp-emulation to the
value 'MS-Windows', they are now forced to this new behavior, whereby
the modes of the files are not shown as they were before.

> What I could do is keep it in on windows and let users remove it if they
> wish. Or maybe if removing it keeps 4 chars instead of just 1, it will
> be an acceptable default on Windows to trim permissions?

Our usual policy is to introduce incompatible behavior changes via
options that are by default turned off.  I see no reason not to do the
same in this case.

Most importantly: please always discuss such changes before installing
them.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]