* bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language
@ 2016-06-21 8:31 Lele Gaifax
2020-12-15 7:09 ` Lars Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Lele Gaifax @ 2016-06-21 8:31 UTC (permalink / raw)
To: 23812
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@metapensiero.it | -- Fortunato Depero, 1929.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language
2016-06-21 8:31 bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language Lele Gaifax
@ 2020-12-15 7:09 ` Lars Ingebrigtsen
2020-12-15 7:48 ` Lele Gaifax
2020-12-15 16:50 ` Eli Zaretskii
0 siblings, 2 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-15 7:09 UTC (permalink / raw)
To: Lele Gaifax; +Cc: 23812
Lele Gaifax <lele@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language
2020-12-15 7:09 ` Lars Ingebrigtsen
@ 2020-12-15 7:48 ` Lele Gaifax
2020-12-15 16:56 ` Drew Adams
2020-12-15 16:50 ` Eli Zaretskii
1 sibling, 1 reply; 7+ messages in thread
From: Lele Gaifax @ 2020-12-15 7:48 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 23812
Lars Ingebrigtsen <larsi@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@metapensiero.it | -- Fortunato Depero, 1929.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language
2020-12-15 7:48 ` Lele Gaifax
@ 2020-12-15 16:56 ` Drew Adams
0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2020-12-15 16:56 UTC (permalink / raw)
To: Lele Gaifax, Lars Ingebrigtsen; +Cc: 23812
> > 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.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language
2020-12-15 7:09 ` Lars Ingebrigtsen
2020-12-15 7:48 ` Lele Gaifax
@ 2020-12-15 16:50 ` Eli Zaretskii
2020-12-17 11:20 ` Lars Ingebrigtsen
1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2020-12-15 16:50 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: lele, 23812
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 15 Dec 2020 08:09:29 +0100
> Cc: 23812@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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language
2020-12-15 16:50 ` Eli Zaretskii
@ 2020-12-17 11:20 ` Lars Ingebrigtsen
2021-12-01 22:28 ` Lars Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-17 11:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: lele, 23812
Eli Zaretskii <eliz@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language
2020-12-17 11:20 ` Lars Ingebrigtsen
@ 2021-12-01 22:28 ` Lars Ingebrigtsen
0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-01 22:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: lele, 23812
Lars Ingebrigtsen <larsi@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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-01 22:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-21 8:31 bug#23812: 25.0.95; Minor glitch in dired listing due to non English host language Lele Gaifax
2020-12-15 7:09 ` Lars Ingebrigtsen
2020-12-15 7:48 ` Lele Gaifax
2020-12-15 16:56 ` Drew Adams
2020-12-15 16:50 ` Eli Zaretskii
2020-12-17 11:20 ` Lars Ingebrigtsen
2021-12-01 22:28 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.