GNU bug report logs - #35668
26.2; default value of `dired-omit-files'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 10 May 2019 13:43:01 UTC

Severity: wishlist

Tags: fixed

Found in version 26.2

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 35668 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 35668 <at> debbugs.gnu.org
Subject: Re: bug#35668: 26.2; default value of `dired-omit-files'
Date: Sun, 12 May 2019 12:47:44 -0400
[Message part 1 (text/plain, inline)]
Drew Adams <drew.adams <at> 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.

[0001-Fix-dired-omit-files-regexp-Bug-35668.patch (text/x-diff, inline)]
From 1be76f5272236d8238cf8a39ed96732478ea6e39 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> 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


This bug report was last modified 6 years and 55 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.