* bug#17228: 24.4.50; Dired with -R switch and hiding details: Missing chars etc.
@ 2014-04-08 22:35 Drew Adams
2014-04-09 15:26 ` Eli Zaretskii
2014-04-20 14:31 ` bug#17288: " Eli Zaretskii
0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2014-04-08 22:35 UTC (permalink / raw)
To: 17228
emacs -Q
C-u C-x d -alR SOME-DIR
The descendent dirs are inserted. OK. Now hide details (`(').
The `.' entries appear at the end of the subdir header lines. The
newlines separating the inserted subdirs from the preceding listing are
missing. The colons at the end of the subdir header lines are missing.
The subdir header lines are not indented.
(The top-level dir listing is OK.)
Example - this is what you see before hiding details:
d:/foo/test:
total used in directory 1024 available 115348376
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 .
drwxrwxrwx 1 myuser Domain Users 1048576 04-08 15:19 ..
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 sample-one
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 sample-two
d:/foo/test/sample-one:
total 0
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 .
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 ..
drwxrwxrwx 1 myuser Domain Users 0 2013-05-18 example1
d:/foo/test/sample-one/example:
total 0
drwxrwxrwx 1 myuser Domain Users 0 2013-05-18 .
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 ..
d:/foo/test/sample-two:
total 0
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 .
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 ..
drwxrwxrwx 1 myuser Domain Users 0 2013-05-18 example2
d:/foo/test/sample-two/example:
total 0
drwxrwxrwx 1 myuser Domain Users 0 2013-05-18 .
drwxrwxrwx 1 myuser Domain Users 0 2013-05-31 ..
And this is what you see after hiding details:
d:/foo/test:
.
..
sample-one
sample-two
d:/foo/test/sample-one .
..
example
d:/foo/test/sample-one/example1 .
..
d:/foo/test/sample-two .
..
example
d:/foo/test/sample-two/example2 .
..
In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
of 2014-04-08 on ODIEONE
Bzr revision: 116956 dancol@dancol.org-20140408123940-knoyutxt4l8ws7qm
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/snapshot/trunk
--enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
-Ic:/Devel/emacs/include''
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17228: 24.4.50; Dired with -R switch and hiding details: Missing chars etc.
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
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2014-04-09 15:26 UTC (permalink / raw)
To: Drew Adams; +Cc: 17228
> Date: Tue, 8 Apr 2014 15:35:24 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
>
> In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
> of 2014-04-08 on ODIEONE
> Bzr revision: 116956 dancol@dancol.org-20140408123940-knoyutxt4l8ws7qm
FWIW, I see the same problems on GNU/Linux.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17288: bug#17228: 24.4.50; Dired with -R switch and hiding details: Missing chars etc.
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 ` Eli Zaretskii
2014-04-21 0:33 ` Michael Heerdegen
1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2014-04-20 14:31 UTC (permalink / raw)
To: Christopher Schmidt; +Cc: 17288
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.
TIA
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17288: bug#17228: 24.4.50; Dired with -R switch and hiding details: Missing chars etc.
2014-04-20 14:31 ` bug#17288: " Eli Zaretskii
@ 2014-04-21 0:33 ` Michael Heerdegen
2014-04-21 17:58 ` Christopher Schmidt
0 siblings, 1 reply; 5+ messages in thread
From: Michael Heerdegen @ 2014-04-21 0:33 UTC (permalink / raw)
To: Christopher Schmidt; +Cc: 17288
[-- 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17228: 24.4.50; Dired with -R switch and hiding details: Missing chars etc.
2014-04-21 0:33 ` Michael Heerdegen
@ 2014-04-21 17:58 ` Christopher Schmidt
0 siblings, 0 replies; 5+ messages in thread
From: Christopher Schmidt @ 2014-04-21 17:58 UTC (permalink / raw)
To: 17228; +Cc: Michael Heerdegen
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
Michael Heerdegen <michael_heerdegen@web.de> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 1058 bytes --]
+--- lisp/ChangeLog
+++ lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-21 Michael Heerdegen <michael_heerdegen@web.de>
+
+ * 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 <michael.albinus@gmx.de>
* 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-21 17:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-04-21 17:58 ` Christopher Schmidt
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).