I use the following code for including dired omit mode:
(require 'dired-x) (setq dired-omit-files "^\\...+$") (add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1))) ;(dired-omit-mode 1)
When I turn on dired, by
(C-x d), text files ending with ~ are visible. I can hide them by hitting
M-x dired-omit-mode. However I would like that dired opens directly into omit mode. I try to achieve this by uncommenting the fourth line, (dired-omit-mode 1), but I get the error message:
Wrong type argument: stringp, nil
What is wrong with my forth code line?
How to start dired in omit mode?