Subject: Re: bug#17288: bug#17228: 24.4.50; Dired with -R switch and hiding details: Missing chars etc.

From: Michael Heerdegen <[email-masked]>
Date: Mon, 21 Apr 2014 02:33:07 +0200

Eli Zaretskii <[email-masked]> writes:

> Christopher, could you please take a look at this bug?  Emacs 24.4 is
> in pretest, and it would be too bad if we release it with this bug not
> fixed.

Chris, I don't think it's that hard to fix.
`dired-insert-set-properties' just doesn't check whether any non file
line is an information line to hide or something else (empty line or
subdir header line).  So, something like this should do:

*** /home/micha/Treasure/today/dired.el	2014-04-21 02:13:59.045937983 +0200
--- /home/micha/Treasure/today/dired-fix-17228.el	2014-04-21 02:15:00.429707571 +0200
***************
*** 1250,1258 ****
      (while (< (point) end)
        (ignore-errors
  	(if (not (dired-move-to-filename))
! 	    (put-text-property (line-beginning-position)
! 			       (1+ (line-end-position))
! 			       'invisible 'dired-hide-details-information)
  	  (put-text-property (+ (line-beginning-position) 1) (1- (point))
  			     'invisible 'dired-hide-details-detail)
  	  (add-text-properties
--- 1250,1260 ----
      (while (< (point) end)
        (ignore-errors
  	(if (not (dired-move-to-filename))
! 	    (unless (or (looking-at "^$")
!                         (looking-at dired-subdir-regexp))
!               (put-text-property (line-beginning-position)
!                                  (1+ (line-end-position))
!                                  'invisible 'dired-hide-details-information))
  	  (put-text-property (+ (line-beginning-position) 1) (1- (point))
  			     'invisible 'dired-hide-details-detail)
  	  (add-text-properties

WDYT?  We should test it well, however, to be sure it does the same for
different `ls-lisp-use-insert-directory-program' values and such.

Michael.