emacs-devel
[Top][All Lists]
Advanced

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

Re: patch for Dired second header line info


From: Juri Linkov
Subject: Re: patch for Dired second header line info
Date: Sun, 02 Mar 2008 16:36:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu)

>> Are you sure this change will not break other packages that
>> rely on the first word `total' at the beginning of a dired
>> buffer?
>
> How could I (or anyone) be sure of that? Who knows what some package might
> rely on?

Using one of several code search engines, for instance,
http://www.krugle.org/kse/files?query=%22total+used%22&lang=elisp
you can find a few packages that rely on the format of this string,
including your ls-lisp+.el http://www.emacswiki.org/cgi-bin/wiki/ls-lisp%2B.el.

>> Also I think instead of displaying the number of files listed
>> in the current dired buffer, more useful would be to display
>> the total number of files in the current directory. There are
>> features that hide files in the dired buffer (e.g.
>> dired-omit-mode), so displaying the total number of
>> files will be helpful for users to see that there are more
>> hidden files.
>
> I disagree - it's a feature, not a bug, to see how many files are currently
> visible.
>
> For example, if I use Dired with wildcards, I want to see how many matching
> files there are. If I hide the files with extension `elc', I want to see how
> many files are left. And so on. The figure should reflect the current
> display state.

Sorry, it didn't appear to me that the number of listed files would be
useful too.  But we can display both numbers on the same line using the
traditional notation "listed/total", e.g.

total used in directory 49439 available 56233408 files 691/1000

> BTW, I did not check until now, but that is also apparently the approach
> Windows Explorer uses (FWIW). If you hide system files, for instance, the
> file count excludes them.

BTW, such file managers also display the number and total size of selected
files.  I have a function `dired-count-marked-files' that does the same
and displays this information in the echo area after marking a file.

Maybe instead of the echo area and instead of the header line beginning
with `total' we could display this information in the mode line?

There is a special mode-line symbol %i and %I (`size-indication-mode')
that is not very useful in dired mode.  We could use it (or create a new
%-construct) to display the total number of selected/all files and their
sizes in the mode line in more concise format.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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