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

From: Christopher Schmidt <[email-masked]>
Date: Mon, 21 Apr 2014 13:58:44 -0400 (EDT)

Michael Heerdegen <[email-masked]> writes:
> 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:
[...]
> 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.

Great!  I can confirm that your change fixes the bug with and without ls
emulation on my GNU/Linux system.  Thank you very much.

If there is no objection, I will commit the following patch to the
emacs-24 branch tomorrow.
+--- lisp/ChangeLog
+++ lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-21  Michael Heerdegen  <[email-masked]>
+
+	* dired.el (dired-insert-set-properties): Do not consider
+	subdirectory headings and empty lines to be information that
+	`dired-hide-details-mode' should hide.	(Bug#17228)
+
 2014-04-20  Michael Albinus  <[email-masked]>
 
 	* net/tramp-sh.el (tramp-get-ls-command): Use "-b" argument if
--- lisp/dired.el
+++ lisp/dired.el
@@ -1250,9 +1250,11 @@
     (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)
+	    (unless (or (looking-at-p "^$")
+			(looking-at-p 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