I was wondering if anyone knew a way to mark some files/folder in dired and then colorize (change face for BG/FG) them. this would also need to be saved even after Emacs restarts.

1 Answer 1


Not limited to Dired, but you can apply faces to any text using library Highlight, and you can ensure that font-lock will respect your highlighting and not override it.

You can write a command for Dired that highlights, say, the file name of the current line.

  • Thx as always drew! i really dont know any lisp or where to start. do you have some examples for something like this? what im trying to achive is to mark files for later use. maybe there are better ways of doing so?
    – zeltak
    Commented May 7, 2016 at 11:04
  • Colorizing persistently would take a tiny bit of Lisp. But you can at least persistently mark files & folders, without highlighting them. To do that, use library Bookmark+. Just mark the files and folders in a Dired buffer, as you would normally, then use C-x r m to bookmark that Dired buffer state - the markings are included in the saved state. You can have any number of bookmarks for the same directory, saving different markings etc. Bookmarks are named and persistent. When you "jump" to such a bookmark the saved marks are restored.
    – Drew
    Commented May 7, 2016 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.