Your best option is to change the ls
switches so that Dired does not list those fields. See M-x man ls
for your particular platform, to see what ls
switches are available to you.
dired-details.el
(and dired-details+.el
) are no longer needed if you have Emacs 24.4 (or a pre-release development snapshot). Just use (
to toggle between showing and hiding details.
And in that case you at least have two options to control whether symbolic-link targets or all lines except header and file lines are considered details to hide: dired-hide-details-hide-symlink-targets
and
dired-hide-details-hide-information-lines
.
If changing ls
switches does not help in your case, then you would need to tweak function dired-details-make-current-line-overlay
from dired-details.el
. The details to be hidden are determined by the first cond
clause, which is this (wrapped in ignore-errors
):
(dired-move-to-filename t)
That moves point to the beginning of the file name. The next line is this:
(make-overlay (+ 2 bol) (point))
That creates the invisibility overlay from the beginning of the line (bol
here) up to the beginning of the file name (point
).
If you want something different then you need to get the limits that you want for the overlay. For example, if you want invisibility to start at the file size, then you would search forward with a regexp that finds the beginning of the file size.
You can come up with such a regexp by working from the regexp for dired-move-to-filename-regexp
(in library dired.el
). It is a very complex regexp that matches everything up to the file name. But you can use it to find the date+time portion, which is either the 7th matching regexp subgroup or the 2nd, depending on whether the date+time is expressed using a locale (western or eastern) or using ISO representation.
You can see how this is handled in the code defining variable diredp-font-lock-keywords-1
of library dired+.el
.
But again, the best approach, if it does what you want, is to try to use ls
switches to control which fields are listed in the first place. You can easily experiment with switches by using a prefix argument with C-x d
- you are prompted for the switches to use.