abo-abo / oremacs

My Emacs config
https://oremacs.com/
296 stars 33 forks source link

dired-omit-files regex #15

Closed srustamo closed 7 years ago

srustamo commented 7 years ago

I think I understand the intention of this regex below. It looks for for files in dired, which:

If it is so, it does not seem to work on `.log' files.

Is my understanding correct? Or does this regex do something else?

(setq dired-omit-files "\\(?:.*\\.\\(?:aux\\|log\\|pickle\\|synctex\\.gz\\|run\\.xml\\|bcf\\|am\\|in\\|blx\\.bib\\)\\'\\)\\|compile_commands.json\\|__pycache__")
srustamo commented 7 years ago

This line is from here

srustamo commented 7 years ago

Looks like I have the old version of this file, still, could you please explain the old regex?

abo-abo commented 7 years ago

Dot followed by one of the extensions in the group is omitted. Works on log files too.

srustamo commented 7 years ago

Why not use dired-omit-extensions from diredx package, which you require on the top of the file?

abo-abo commented 7 years ago

It's more flexible, see dired-omit-regexp function.

srustamo commented 7 years ago

By default, dired-omit-extensions seems to contain many extensions. Do you set this var to nil?

dired-omit-extensions is a variable defined in ‘dired-x.el’. Its value is (".o" "~" ".bin" ".lbin" ".so" ".a" ".ln" ".blg" ".bbl" ".elc" ".lof" ".glo" ".idx" ".lot" ".svn/" ".hg/" ".git/" ".bzr/" "CVS/" "_darcs/" "_MTN/" ".fmt" ".tfm" ".class" ".fas" ".lib" ".mem" ".x86f" ".sparcf" ".dfsl" ".pfsl" ".d64fsl" ".p64fsl" ".lx64fsl" ".lx32fsl" ".dx64fsl" ".dx32fsl" ".fx64fsl" ".fx32fsl" ".sx64fsl" ".sx32fsl" ".wx64fsl" ".wx32fsl" ".fasl" ".ufsl" ".fsl" ".dxl" ".lo" ".la" ".gmo" ".mo" ".toc" ".aux" ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs" ".pyc" ".pyo" ".idx" ".lof" ".lot" ".glo" ".blg" ".bbl" ".cp" ".cps" ".fn" ".fns" ".ky" ".kys" ".pg" ".pgs" ".tp" ".tps" ".vr" ".vrs")

abo-abo commented 7 years ago

dired-omit-files completely overrides dired-omit-extensions. I adjust dired-omit-files to my personal use, e.g. I never have .vrs files, I don't ignore them.

srustamo commented 7 years ago

Thanks. Do you use ranger.el by any chance?

abo-abo commented 7 years ago

No.