From: Gabriel do Nascimento Ribeiro Date: Sat, 5 Nov 2022 11:27:50 +0000 (-0300) Subject: Make 'dired-hide-details-mode' work after 'dired-hide-subdir' X-Git-Tag: emacs-29.0.90~1616^2~219 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7879eca247116745dc7ceaf45b1b93d618c5a217;p=emacs.git Make 'dired-hide-details-mode' work after 'dired-hide-subdir' * lisp/dired.el (dired--unhide): Restore text properties. (Bug#59047) * test/lisp/dired-tests.el (dired-test-bugXXXX): New test. --- diff --git a/lisp/dired.el b/lisp/dired.el index 209e270942b..825d0e47508 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3034,7 +3034,8 @@ See options: `dired-hide-details-hide-symlink-targets' and (remove-list-of-text-properties (progn (goto-char start) (line-end-position)) (progn (goto-char end) (line-end-position)) - '(invisible))))) + '(invisible)) + (dired-insert-set-properties start end)))) ;;; Functions for finding the file name in a dired buffer line diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index 09becc7fe7a..fd7ff73267e 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -288,6 +288,16 @@ (should (cdr (dired-get-marked-files)))) (when (buffer-live-p buf) (kill-buffer buf)))))) +(ert-deftest dired-test-bugXXXX () + "Test for https://debbugs.gnu.org/XXXX ." + (dired (list (expand-file-name "src" source-directory) + "cygw32.c" "alloc.c" "w32xfns.c" "xdisp.c")) + (dired-hide-all) + (dired-hide-all) + (dired-next-line 1) + (should (equal 'dired-hide-details-detail + (get-text-property (1+ (line-beginning-position)) 'invisible)))) + (ert-deftest dired-test-bug27899 () "Test for https://debbugs.gnu.org/27899 ." :tags '(:unstable)