unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 83e0442139f: There are no file modes on windows and dos
       [not found] ` <20230928023358.9538BC06316@vcs2.savannah.gnu.org>
@ 2023-09-28  3:21   ` Po Lu
  2023-09-29 14:10     ` Eli Zaretskii
  2023-10-02  7:19   ` Michael Albinus
  1 sibling, 1 reply; 9+ messages in thread
From: Po Lu @ 2023-09-28  3:21 UTC (permalink / raw)
  To: emacs-devel; +Cc: Sam Steingold

Sam Steingold <sds@gnu.org> writes:

> branch: master
> commit 83e0442139f8dbe5b9b3f19e0d1850ab43cf034f
> Author: Sam Steingold <sds@gnu.org>
> Commit: Sam Steingold <sds@gnu.org>
>
>     There are no file modes on windows and dos
>     
>     * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes` on GNU & Unix
>       (ls-lisp-format): When `modes` is not in `ls-lisp-verbosity',
>        keep just the 1st character of `drwxrwxrwx`.

Thanks, but your ChangeLog entry is improperly formatted.  In the
future, please refrain from indenting subsequent entries or continuing
lines, use grave or straight quotes, and terminate each entry with a
sentence stop.  For example:

* lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes' on GNU and
Unix systems.
(ls-lisp-format): When `modes' is not in `ls-lisp-verbosity',
retain only the first character of `drwxrwxrwx'.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 83e0442139f: There are no file modes on windows and dos
  2023-09-28  3:21   ` master 83e0442139f: There are no file modes on windows and dos Po Lu
@ 2023-09-29 14:10     ` Eli Zaretskii
  2023-09-29 15:53       ` [External] : " Drew Adams
                         ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-09-29 14:10 UTC (permalink / raw)
  To: Po Lu, sds; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: Sam Steingold <sds@gnu.org>
> Date: Thu, 28 Sep 2023 11:21:05 +0800
> 
> Sam Steingold <sds@gnu.org> writes:
> 
> > branch: master
> > commit 83e0442139f8dbe5b9b3f19e0d1850ab43cf034f
> > Author: Sam Steingold <sds@gnu.org>
> > Commit: Sam Steingold <sds@gnu.org>
> >
> >     There are no file modes on windows and dos
> >     
> >     * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes` on GNU & Unix
> >       (ls-lisp-format): When `modes` is not in `ls-lisp-verbosity',
> >        keep just the 1st character of `drwxrwxrwx`.
> 
> Thanks, but your ChangeLog entry is improperly formatted.  In the
> future, please refrain from indenting subsequent entries or continuing
> lines, use grave or straight quotes, and terminate each entry with a
> sentence stop.  For example:
> 
> * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes' on GNU and
> Unix systems.
> (ls-lisp-format): When `modes' is not in `ls-lisp-verbosity',
> retain only the first character of `drwxrwxrwx'.

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 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; and (b) be an
opt-in behavior, i.e. we need a new defcustom for it.  In its current
form, this change is not acceptable, sorry (and neither is the way of
installing it without any discussion).



^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [External] : Re: master 83e0442139f: There are no file modes on windows and dos
  2023-09-29 14:10     ` Eli Zaretskii
@ 2023-09-29 15:53       ` Drew Adams
  2023-09-29 16:25         ` Eli Zaretskii
  2023-10-05  7:19       ` Eli Zaretskii
  2023-10-06 16:55       ` Sam Steingold
  2 siblings, 1 reply; 9+ messages in thread
From: Drew Adams @ 2023-09-29 15:53 UTC (permalink / raw)
  To: Eli Zaretskii, Po Lu, sds@gnu.org; +Cc: emacs-devel@gnu.org

> > * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes' on GNU and
> > Unix systems.
> > (ls-lisp-format): When `modes' is not in `ls-lisp-verbosity',
> > retain only the first character of `drwxrwxrwx'.
> 
> 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 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; and (b) be an
> opt-in behavior, i.e. we need a new defcustom for it.  In its current
> form, this change is not acceptable, sorry (and neither is the way of
> installing it without any discussion).

+1.

Please don't mess with the longstanding Dired behavior
showing file permissions.  That will screw up habits
and font-locking.

For the most part, `ls-lisp' tries to match what `ls'
produces on, say, GNU/Linux - a feature, not a bug.

If someone wants to provide a minor mode that does
something different, that's a different story.  But
the default, longstanding behavior of `ls-lisp' in
this regard should be kept/respected.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [External] : Re: master 83e0442139f: There are no file modes on windows and dos
  2023-09-29 15:53       ` [External] : " Drew Adams
@ 2023-09-29 16:25         ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-09-29 16:25 UTC (permalink / raw)
  To: Drew Adams; +Cc: luangruo, sds, emacs-devel

> From: Drew Adams <drew.adams@oracle.com>
> CC: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
> Date: Fri, 29 Sep 2023 15:53:29 +0000
> 
> For the most part, `ls-lisp' tries to match what `ls'
> produces on, say, GNU/Linux - a feature, not a bug.

That part didn't change, since the default behavior of ls-lisp is NOT
MS-Windows.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 83e0442139f: There are no file modes on windows and dos
       [not found] ` <20230928023358.9538BC06316@vcs2.savannah.gnu.org>
  2023-09-28  3:21   ` master 83e0442139f: There are no file modes on windows and dos Po Lu
@ 2023-10-02  7:19   ` Michael Albinus
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2023-10-02  7:19 UTC (permalink / raw)
  To: emacs-devel; +Cc: Sam Steingold

Sam Steingold <sds@gnu.org> writes:

Hi Sam,

>     * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes` on GNU & Unix
>       (ls-lisp-format): When `modes` is not in `ls-lisp-verbosity',
>        keep just the 1st character of `drwxrwxrwx`.

This breaks an Emacs test:

--8<---------------cut here---------------start------------->8---
# make -C test test-custom-opts
...
The following options might have problems:
variable: ls-lisp-verbosity
   value: (links uid gid modes)
    type: (set (const :tag "Show Link Count" links) (const :tag "Show User" uid) (const :tag "Show Group" gid))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 83e0442139f: There are no file modes on windows and dos
  2023-09-29 14:10     ` Eli Zaretskii
  2023-09-29 15:53       ` [External] : " Drew Adams
@ 2023-10-05  7:19       ` Eli Zaretskii
  2023-10-06 16:55       ` Sam Steingold
  2 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-10-05  7:19 UTC (permalink / raw)
  To: sds; +Cc: luangruo, emacs-devel

Ping!  Sam, any progress with fixing the issues below?

> Date: Fri, 29 Sep 2023 17:10:54 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > From: Po Lu <luangruo@yahoo.com>
> > Cc: Sam Steingold <sds@gnu.org>
> > Date: Thu, 28 Sep 2023 11:21:05 +0800
> > 
> > Sam Steingold <sds@gnu.org> writes:
> > 
> > > branch: master
> > > commit 83e0442139f8dbe5b9b3f19e0d1850ab43cf034f
> > > Author: Sam Steingold <sds@gnu.org>
> > > Commit: Sam Steingold <sds@gnu.org>
> > >
> > >     There are no file modes on windows and dos
> > >     
> > >     * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes` on GNU & Unix
> > >       (ls-lisp-format): When `modes` is not in `ls-lisp-verbosity',
> > >        keep just the 1st character of `drwxrwxrwx`.
> > 
> > Thanks, but your ChangeLog entry is improperly formatted.  In the
> > future, please refrain from indenting subsequent entries or continuing
> > lines, use grave or straight quotes, and terminate each entry with a
> > sentence stop.  For example:
> > 
> > * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes' on GNU and
> > Unix systems.
> > (ls-lisp-format): When `modes' is not in `ls-lisp-verbosity',
> > retain only the first character of `drwxrwxrwx'.
> 
> 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 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; and (b) be an
> opt-in behavior, i.e. we need a new defcustom for it.  In its current
> form, this change is not acceptable, sorry (and neither is the way of
> installing it without any discussion).
> 
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 83e0442139f: There are no file modes on windows and dos
  2023-09-29 14:10     ` Eli Zaretskii
  2023-09-29 15:53       ` [External] : " Drew Adams
  2023-10-05  7:19       ` Eli Zaretskii
@ 2023-10-06 16:55       ` Sam Steingold
  2023-10-06 17:14         ` Corwin Brust
  2023-10-07  5:38         ` Eli Zaretskii
  2 siblings, 2 replies; 9+ messages in thread
From: Sam Steingold @ 2023-10-06 16:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, emacs-devel

> * Eli Zaretskii <ryvm@tah.bet> [2023-09-29 17:10:54 +0300]:
>
>> * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes' on GNU and
>> Unix systems.
>> (ls-lisp-format): When `modes' is not in `ls-lisp-verbosity',
>> retain only the first character of `drwxrwxrwx'.
>
> 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.

> 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.

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

> (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.

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?

Thank you.

-- 
Sam Steingold (https://aphar.dreamwidth.org/) on Pop 22.04 (jammy) X 11.0.12101004
https://lastingimpactpsychology.com https://steingoldpsychology.com
https://camera.org https://fairforall.org https://www.dhimmitude.org
Three can keep a secret if two of them are dead.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 83e0442139f: There are no file modes on windows and dos
  2023-10-06 16:55       ` Sam Steingold
@ 2023-10-06 17:14         ` Corwin Brust
  2023-10-07  5:38         ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Corwin Brust @ 2023-10-06 17:14 UTC (permalink / raw)
  To: sds, Eli Zaretskii, Po Lu, emacs-devel

On Fri, Oct 6, 2023 at 11:55 AM Sam Steingold <sds@gnu.org> wrote:
>
> > * Eli Zaretskii <ryvm@tah.bet> [2023-09-29 17:10:54 +0300]:
> >
> >> * lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes' on GNU and
> >> Unix systems.
> >> (ls-lisp-format): When `modes' is not in `ls-lisp-verbosity',
> >> retain only the first character of `drwxrwxrwx'.
> >
> > 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.
>

>
> 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.
>

Would you consider reverting this change and posting as patches?  I
would be happy to try them, if so; although, I may need guidance (how?
what's expected?).

Also, I would be grateful if you explain the problem you are solving
in terms of how I might run into it.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 83e0442139f: There are no file modes on windows and dos
  2023-10-06 16:55       ` Sam Steingold
  2023-10-06 17:14         ` Corwin Brust
@ 2023-10-07  5:38         ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-10-07  5:38 UTC (permalink / raw)
  To: sds; +Cc: luangruo, emacs-devel

> 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.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-07  5:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <169586843825.5191.11036492923664810557@vcs2.savannah.gnu.org>
     [not found] ` <20230928023358.9538BC06316@vcs2.savannah.gnu.org>
2023-09-28  3:21   ` master 83e0442139f: There are no file modes on windows and dos Po Lu
2023-09-29 14:10     ` Eli Zaretskii
2023-09-29 15:53       ` [External] : " Drew Adams
2023-09-29 16:25         ` Eli Zaretskii
2023-10-05  7:19       ` Eli Zaretskii
2023-10-06 16:55       ` Sam Steingold
2023-10-06 17:14         ` Corwin Brust
2023-10-07  5:38         ` Eli Zaretskii
2023-10-02  7:19   ` Michael Albinus

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).