Subject: Re: bug#25485: 25.1; Having trouble setting --time-style in dired-listing-switches

From: Chunyang Xu <[email-masked]>
Date: Fri, 20 Jan 2017 01:20:45 +0800

Eli Zaretskii writes:

>> From: Chunyang Xu <[email-masked]>
>> Date: Thu, 19 Jan 2017 22:34:31 +0800
>>
>> I want to custom the file timestamps used in dired through the option:
>>
>>   --time-style='+%_m月 %d %H:%M'
>>
>> then I adjust `dired-listing-switches' accordingly:
>>
>>   (setq dired-listing-switches "-al --time-style='+%_m月 %d %H:%M'")
>>
>> However, it doesn't work, it signals an error, here is the Backtrace:
>
> Isn't --time-style a GNU ls extension?  You are on Darwin, so do you
> have GNU ls installed?  What happens if you use that option from the
> shell prompt?

Yes, and yes, and I have set shell and Emacs to use GNU ls, thus in
shell (via M-x shell) it works like expected:

~$ cd /tmp
/tmp$ ls -al --time-style='+%_m月 %d %H:%M'
total 4
drwxrwxrwt 8 root wheel 272  1月 20 00:49 .
drwxr-xr-x 6 root wheel 204 11月 15 13:17 ..
-rw-rw-rw- 1 xcy  wheel   0  1月 16 13:40 .keystone_install_lock
drwx------ 3 xcy  wheel 102  1月 16 13:40 com.apple.launchd.404wZSYm30
drwx------ 3 xcy  wheel 102  1月 16 13:40 com.apple.launchd.ORTswTb0KX
drwx------ 3 xcy  wheel 102  1月 16 13:40 com.apple.launchd.WcFjcyxZ4I
drwx------ 3 xcy  wheel 102  1月 16 13:40 com.apple.launchd.g1ImzMVLVC
-rw-r--r-- 1 xcy  wheel 985  1月 20 01:10 mail.log
/tmp$