Your regular expression will match *-t.tex files, not *.tex .
In the latest version of Emacs, just add the following section to ~/.emacs to filter what you want:
(require 'dired-x) (setq-default dired-omit-files-p t) ; this is buffer-local variable (setq dired-omit-files (concat dired-omit-files "\\|^\\..+$\\|\\.pdf$\\|\\.tex$"))
Update: by default, dired-omit-files regexp filters special directories . and .. If you don't want this behavior, you can simply override the default values (instead of inheriting them from concat):
(setq dired-omit-files "^\\.[^.]\\|\\.pdf$\\|\\.tex$")
The regular expression ^\\.[^.] Will match any string of length 2+, starting at the point where the second character is any character except the dot itself. This is not ideal (it will not match file names, for example "..foo"), but should be fine in most cases.
barti_ddu
source share