From f4a6345114b02fb725192aa548f2e84096fbaae6 Mon Sep 17 00:00:00 2001 From: Filipp Gunbin Date: Thu, 25 Dec 2014 21:17:43 +0300 Subject: [PATCH] make dired-maybe-insert-subdir always skip trivial files --- lisp/dired-aux.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index bb93cce6500..acc7e767d69 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2062,7 +2062,10 @@ See Info node `(emacs)Subdir switches' for more details." ;; inserted *after* opoint. (setq dirname (file-name-as-directory dirname)) (or (and (not switches) - (dired-goto-subdir dirname)) + (when (dired-goto-subdir dirname) + (unless (dired-subdir-hidden-p dirname) + (dired-initial-position dirname)) + t)) (dired-insert-subdir dirname switches no-error-if-not-dir-p)) ;; Push mark so that it's easy to find back. Do this after the ;; insert message so that the user sees the `Mark set' message. -- 2.39.2