bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36729: 27.0.50; Unclear total in directory listing


From: Stephen Berman
Subject: bug#36729: 27.0.50; Unclear total in directory listing
Date: Wed, 26 Aug 2020 12:10:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Sat, 22 Aug 2020 16:02:28 +0200 Lars Ingebrigtsen <larsi@gnus.org> wrote:

> Stephen Berman <stephen.berman@gmx.net> writes:
>
>> An alternative is to do for "total used" what was done for "available".
>> On systems that use `ls' (at least the GNU version), users can do that
>> by setting the environment variable BLOCK_SIZE, but since the change to
>> the display of "available" was unconditional (if I'm not mistaken), we
>> could do the same for the display of "total used", e.g. as in the below
>> patch.
>
> [...]
>
>> +    (block-size (getenv "BLOCK_SIZE"))
>>      end)
>> +    (setenv "BLOCK_SIZE" "si")
>
> [...]
>
>> -      (dired-insert-set-properties content-point (point)))))
>> +      (dired-insert-set-properties content-point (point)))
>> +    (if block-size
>> +    (setenv "BLOCK_SIZE" block-size)
>> +      (setenv-internal process-environment "BLOCK_SIZE" nil t))))
>
> Makes sense to me, but this should probably be protected by an
> `unwind-protect' to ensure that things get properly reset.

Yes, but since this idea won't work with all ls implementations, I
assumed it's not worth pursuing.

Steve Berman





reply via email to

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