unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Christopher Schmidt <christopher@ch.ristopher.com>
Cc: 17288@debbugs.gnu.org
Subject: bug#17288: bug#17228: 24.4.50; Dired with -R switch and hiding details: Missing chars etc.
Date: Mon, 21 Apr 2014 02:33:07 +0200	[thread overview]
Message-ID: <87eh0rttbw.fsf@web.de> (raw)
In-Reply-To: <837g6kf4xu.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 20 Apr 2014 17:31:25 +0300")

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

Eli Zaretskii <eliz@gnu.org> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 17228.patch --]
[-- Type: text/x-diff, Size: 1127 bytes --]

*** /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

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]


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.

  reply	other threads:[~2014-04-21  0:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08 22:35 bug#17228: 24.4.50; Dired with -R switch and hiding details: Missing chars etc Drew Adams
2014-04-09 15:26 ` Eli Zaretskii
2014-04-20 14:31 ` bug#17288: " Eli Zaretskii
2014-04-21  0:33   ` Michael Heerdegen [this message]
2014-04-21 17:58     ` Christopher Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eh0rttbw.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=17288@debbugs.gnu.org \
    --cc=christopher@ch.ristopher.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).