GNU bug report logs - #23812
25.0.95; Minor glitch in dired listing due to non English host language

Previous Next

Package: emacs;

Reported by: Lele Gaifax <lele <at> metapensiero.it>

Date: Tue, 21 Jun 2016 08:33:02 UTC

Severity: minor

Found in version 25.0.95

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23812 in the body.
You can then email your comments to 23812 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23812; Package emacs. (Tue, 21 Jun 2016 08:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lele Gaifax <lele <at> metapensiero.it>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 21 Jun 2016 08:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lele Gaifax <lele <at> metapensiero.it>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.95;
 Minor glitch in dired listing due to non English host language
Date: Tue, 21 Jun 2016 10:31:59 +0200
When I enter in a `dired` mode, I see something like the following at the top
of the buffer:

  /home/lele/something:
  total used in directorye 8 available 24407396
  drwxrwxr-x 2 lele lele 4096 giu 21 10:02 .
  drwxr-xr-x 5 lele lele 4096 giu 21 10:02 ..

Note the “directorye” glitch: I think it is caused by the fact that the
function `insert-directory` in lisp/files.el assumes the underlying `ls`
command operates in an English environment, in particular in the first line
where it emits with the disk space usage, and perform a simple replace of
"total" with "total used in directory".

This is what I get with a plain `ls -la`:

  $ ls -la
  totale 8
  drwxrwxr-x 2 lele lele 4096 giu 21 10:02 .
  drwxr-xr-x 5 lele lele 4096 giu 21 10:02 ..

while it assumes an output like:

  $ LANG=en ls -la
  total 8
  drwxrwxr-x 2 lele lele 4096 Jun 21 10:02 .
  drwxr-xr-x 5 lele lele 4096 Jun 21 10:02 ..

Given that the function unconditionally inserts an English phrase, the
easiest-but-consistent workaround could be explicitly executing `ls` with
`$LANG` set to "en".

A more elaborated approach could be extracting only the number in the first
line of the `ls` output instead of matching "total": in this way it would
support also languages that swap the order (that is, that translate that line
to something equivalent “8 bytes in total”).

Thank you,
ciao, lele.


In GNU Emacs 25.0.95.2 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
 of 2016-06-14 built on nautilus
Repository revision: f5261917191336d052ad8586b2d9fd62ba46c3c4
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description:	Debian GNU/Linux unstable (sid)

Configured using:
 'configure --prefix /usr/local/emacs25'

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: it_IT.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele <at> metapensiero.it  |                 -- Fortunato Depero, 1929.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23812; Package emacs. (Tue, 15 Dec 2020 07:10:01 GMT) Full text and rfc822 format available.

Message #8 received at 23812 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Lele Gaifax <lele <at> metapensiero.it>
Cc: 23812 <at> debbugs.gnu.org
Subject: Re: bug#23812: 25.0.95; Minor glitch in dired listing due to non
 English host language
Date: Tue, 15 Dec 2020 08:09:29 +0100
Lele Gaifax <lele <at> metapensiero.it> writes:

> When I enter in a `dired` mode, I see something like the following at the top
> of the buffer:
>
>   /home/lele/something:
>   total used in directorye 8 available 24407396
>   drwxrwxr-x 2 lele lele 4096 giu 21 10:02 .
>   drwxr-xr-x 5 lele lele 4096 giu 21 10:02 ..

(This bug report unfortunately got no response at the time.)

This bug is still present.  Steps to reproduce:

LANGUAGE=it_IT.UTF-8 emacs -Q .

(You need to have an Italian locale installed.)

There's been a bit of discussion over the years about that summary line
in Dired, but I'm not sure whether anybody came to any conclusions.  I
guess we do not want to run "ls" under the C locale?  That would make
all the lines be in English, including the dates...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23812; Package emacs. (Tue, 15 Dec 2020 07:49:01 GMT) Full text and rfc822 format available.

Message #11 received at 23812 <at> debbugs.gnu.org (full text, mbox):

From: Lele Gaifax <lele <at> metapensiero.it>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 23812 <at> debbugs.gnu.org
Subject: Re: bug#23812: 25.0.95; Minor glitch in dired listing due to non
 English host language
Date: Tue, 15 Dec 2020 08:48:34 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> There's been a bit of discussion over the years about that summary line
> in Dired, but I'm not sure whether anybody came to any conclusions.  I
> guess we do not want to run "ls" under the C locale?  That would make
> all the lines be in English, including the dates...

IMHO, it should be simply removed, it carries so little information,
especially nowadays.

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele <at> metapensiero.it  |                 -- Fortunato Depero, 1929.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23812; Package emacs. (Tue, 15 Dec 2020 16:51:02 GMT) Full text and rfc822 format available.

Message #14 received at 23812 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: lele <at> metapensiero.it, 23812 <at> debbugs.gnu.org
Subject: Re: bug#23812: 25.0.95;
 Minor glitch in dired listing due to non English host language
Date: Tue, 15 Dec 2020 18:50:07 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Tue, 15 Dec 2020 08:09:29 +0100
> Cc: 23812 <at> debbugs.gnu.org
> 
> >   /home/lele/something:
> >   total used in directorye 8 available 24407396
> >   drwxrwxr-x 2 lele lele 4096 giu 21 10:02 .
> >   drwxr-xr-x 5 lele lele 4096 giu 21 10:02 ..
> 
> (This bug report unfortunately got no response at the time.)
> 
> This bug is still present.  Steps to reproduce:
> 
> LANGUAGE=it_IT.UTF-8 emacs -Q .
> 
> (You need to have an Italian locale installed.)
> 
> There's been a bit of discussion over the years about that summary line
> in Dired, but I'm not sure whether anybody came to any conclusions.  I
> guess we do not want to run "ls" under the C locale?  That would make
> all the lines be in English, including the dates...

I think we should delete everything except the number at the end.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23812; Package emacs. (Tue, 15 Dec 2020 16:57:01 GMT) Full text and rfc822 format available.

Message #17 received at 23812 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lele Gaifax <lele <at> metapensiero.it>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 23812 <at> debbugs.gnu.org
Subject: RE: bug#23812: 25.0.95; Minor glitch in dired listing due to non
 English host language
Date: Tue, 15 Dec 2020 08:56:10 -0800 (PST)
> > There's been a bit of discussion over the years about that summary line
> > in Dired, but I'm not sure whether anybody came to any conclusions.  I
> > guess we do not want to run "ls" under the C locale?  That would make
> > all the lines be in English, including the dates...
> 
> IMHO, it should be simply removed, it carries so little information,
> especially nowadays.

I disagree.
Of course, it could be made optional.

And the argument that it carries little info isn't
an argument for showing no info.  It's an argument
for showing more or better info.
___

And yes, the info can be improved.

In my case (Dired+, files+.el), it shows this, for
any listing:

 z:/path/to/some/subdir:
 files 157/1659 space used 34111 available 101612836

`files 157/1659' shows the # of files currently
shown (visible) in the current subdir listing (157),
compared to the # of files in the main dir (1659).

And that `files 157/1659' is a link/button.
Mouseover tells you:

 Files shown / total in directory [RET, mouse-1: more info]

And clicking or RET shows you complete info about
that subdir.  E.g.:

z:/path/to/some/subdir
----------------------

File Type:                  Directory
Permissions:                drwxrwxrwx
Time of last access:        Wed Jul 25 08:26:24 2018 (Pacific Daylight Time)
Time of last modification:  Wed Jul 25 08:26:24 2018 (Pacific Daylight Time)
Time of last status change: Wed Jul 25 08:26:16 2018 (Pacific Daylight Time)
Number of links:            1
User ID (UID):              37686
Group ID (GID):             513
Inode:                      281464976926869
Device number:              315264003

Similarly, "space used 34111 available 101612836" is
a link/button.  Mouseover tells you:

 Kbytes used in directory, Kbytes available on disk

And the same info (see above) is shown when you click
or use RET.
___

And let's not forget that when Dired details are
hidden (`('), the line isn't shown at all.  (IMO,
details should be hidden, not shown, by default.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23812; Package emacs. (Thu, 17 Dec 2020 11:21:01 GMT) Full text and rfc822 format available.

Message #20 received at 23812 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: lele <at> metapensiero.it, 23812 <at> debbugs.gnu.org
Subject: Re: bug#23812: 25.0.95; Minor glitch in dired listing due to non
 English host language
Date: Thu, 17 Dec 2020 12:20:11 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> >   /home/lele/something:
>> >   total used in directorye 8 available 24407396

[...]

> I think we should delete everything except the number at the end.

I do, too.  Well, I think the entire line should be removed, and the
"free disk" number displayed somewhere else.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23812; Package emacs. (Wed, 01 Dec 2021 22:29:02 GMT) Full text and rfc822 format available.

Message #23 received at 23812 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: lele <at> metapensiero.it, 23812 <at> debbugs.gnu.org
Subject: Re: bug#23812: 25.0.95; Minor glitch in dired listing due to non
 English host language
Date: Wed, 01 Dec 2021 23:28:28 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>>> >   /home/lele/something:
>>> >   total used in directorye 8 available 24407396
>
> [...]
>
>> I think we should delete everything except the number at the end.
>
> I do, too.  Well, I think the entire line should be removed, and the
> "free disk" number displayed somewhere else.

I've now introduced a new user option, `dired-free-space' to control
this, and defaulting it to showing only the available space (in the
first line).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 23812 <at> debbugs.gnu.org and Lele Gaifax <lele <at> metapensiero.it> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 01 Dec 2021 22:29:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Dec 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.