bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35668: 26.2; default value of `dired-omit-files'


From: Noam Postavsky
Subject: bug#35668: 26.2; default value of `dired-omit-files'
Date: Sun, 12 May 2019 12:47:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> As mentioned in passing in bug #34911, I think the default value should
> be this:
>
> "\\`\\.?#\\|\\`\\.\\'\\|\\`\\.\\.\\'"
>
> instead of this:
>
> "^\\.?#\\|^\\.$\\|^\\.\\.$"

Right, I'd also escape the "." with [], because so many backslashes make
my eyes hurt.

>From 1be76f5272236d8238cf8a39ed96732478ea6e39 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 12 May 2019 12:42:35 -0400
Subject: [PATCH] Fix dired-omit-files regexp (Bug#35668)

* lisp/dired-x.el (dired-omit-files): Match beginning and of string,
rather than beginning of end of line.
---
 lisp/dired-x.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index defc541ddc..3b78ec47d9 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -159,7 +159,7 @@ (define-minor-mode dired-omit-mode
 
 (put 'dired-omit-mode 'safe-local-variable 'booleanp)
 
-(defcustom dired-omit-files "^\\.?#\\|^\\.$\\|^\\.\\.$"
+(defcustom dired-omit-files "\\`[.]?#\\|\\`[.][.]?\\'"
   "Filenames matching this regexp will not be displayed.
 This only has effect when `dired-omit-mode' is t.  See interactive function
 `dired-omit-mode' (\\[dired-omit-mode]) and variable
-- 
2.11.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]