[Top][All Lists]

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

Re: Proposal: ls-lisp.el handle --group-directories-first flag

From: Arthur Miller
Subject: Re: Proposal: ls-lisp.el handle --group-directories-first flag
Date: Mon, 19 Jul 2021 22:59:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Cc: emacs-devel@gnu.org
>> Date: Fri, 16 Jul 2021 16:58:16 +0200
>> Ok, I take my words back, it is actually not lost. I was to fast didn't
>> reallize --group-directories-first was just converted with rest to a
>> list of chars.
>> Doesn't it mean that ls-lisp could potentialy recieve flags that user
>> didn't ment to use?
> Yes, you need to remove that option before the options get converted.

Yes, and possibly even other long options that an ignorant, unawary user
like myself can pass in dired-listing-switches. The original code just
removes "--dired" flag. Everything else is converted into character
list, so if I pass something like --time-style=long-iso, everything but
dashes makes it into list with switches.

Manual says which switches are supported by ls-lisp, but now how it
behaves when passed flags it does not support:


Personally I expect it to just igonre those, now I have learned it does
not. Bug or not, does not matter, I think it is more convenient to have
one version of dired-listing-switches, then to keep two different, so I
suggest to "sanitize switches" before they are processed. Check included
ls-lisp-p2.patch and see if that is acceptable.

>> Since --group-directories-first is still there, then let bind works fine
>> :-).
> Great.  I think this can be installed, as soon as you add the removal
> of that option from the options' list.

Yepp, included patch ls-lisp-p1.patch does it.

A think to note is that -U will be ignored if --group-directories-first
is passed (so does gls).

Attachment: ls-lisp-p1.patch
Description: Text Data

Attachment: ls-lisp-p2.patch
Description: Text Data

reply via email to

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