From fab5ebecaf62dce221ee7adddd78d56fcd134690 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Tue, 18 Feb 2025 12:14:49 -0500 Subject: [PATCH] Remove ".." from dired-omit-files --- README.md | 6 ++++-- init.el | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index db145fe..21d0def 100644 --- a/README.md +++ b/README.md @@ -789,9 +789,11 @@ And [add the elpaca bootstrap code](https://github.com/progfolio/elpaca?tab=read ;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Window-Dividers.html (add-hook 'after-init-hook #'window-divider-mode) -;; Automatically hide file details (permissions, size, modification date, etc.) -;; in Dired buffers for a cleaner display. +;; Dired buffers: Automatically hide file details (permissions, size, +;; modification date, etc.) and all the files in the `dired-omit-files' regular +;; expression for a cleaner display. (add-hook 'dired-mode-hook #'dired-hide-details-mode) +(add-hook 'dired-mode-hook #'dired-omit-mode) ``` It is also recommended to read the following articles: diff --git a/init.el b/init.el index 631503c..387710d 100644 --- a/init.el +++ b/init.el @@ -429,10 +429,9 @@ ;; Disable the prompt about killing the Dired buffer for a deleted directory. (setq dired-clean-confirm-killing-deleted-buffers nil) -;; Dired-omit - +;; dired-omit-mode (setq dired-omit-verbose nil) -(setq dired-omit-files (concat "\\`[.]?#\\|\\`[.][.]?\\'" +(setq dired-omit-files (concat "\\`[.]\\'" "\\|\\(?:\\.js\\)?\\.meta\\'" "\\|\\.\\(?:elc|a\\|o\\|pyc\\|pyo\\|swp\\|class\\)\\'" "\\|^\\.DS_Store\\'"