Windows 10, Emacs 25.1

Suppose I have some folder (not project folder). In this folder I has 10 subfolders.


  1. I has to find some file.

  2. I don't what is the name of this file.

  3. I exactly known that in this file has word "time"

  4. I exactly known that this file has extension ".cpl"

So as result I want to have a next possibility for search:

  1. Use mask (e.g. "*.cpl")
  2. Containing text: "time"
  3. Show search history
  4. Case sensitive
  5. Whole word only
  6. hex, e. Search file that has content AEFF
  7. Inverse (not content text)
  8. Search in archives, e.g search file I zip files
  9. Search only in

    in root disk C:

    in current folder

    in selected folders (e.g. search only in subfolder5 and subfolder7)

    in PATH folders (in environment variables)

Is it possible in Emacs? Or maybe has some package that can do all of this?

1 Answer 1


Without examining each of your criteria exhaustively, yes, I'd say that Icicles file-finding satisfies them.

In particular, commands such as icicle-locate and icicle-locate-file.

  • They let you search within one or more directories (including within subdirectories etc., recursively)
  • They let you match both file names (e.g. your suffix match, .cpl') and file content (e.g. your content match for the wordtime').
  • They can be case-sensitive or not (like everything in Emacs).
  • They let you get the complement of matches, i.e., the files that do not match.

Not sure what you mean by "hex" matching or "search in archives". But matching is as general as Emacs regexp matching, and you can search any set of directories.

More info here: Icicles - Find Files Anywhere.

Those are commands for finding files that match certain criteria. If you are also interested in searching for certain content within files (or other buffers), then Icicles Search and Isearch+ can help (each in different ways).

  • You accepted this answer quickly, but you will no doubt get other answers. Know that you can change which answer to accept anytime.
    – Drew
    Commented Sep 22, 2017 at 18:01
  • Not sure what you mean by "hex" matching or "search in archives - I mean search file in archive files, e.g zip. Hex - meant file content Hex symbols, e.g ABDF Commented Sep 23, 2017 at 7:10
  • (1) Icicles does not not have anything special for searching zip archives - you would need to unzip them first. (2) If you just mean matching characters [0-9A-Fa-f] then that is of course supported. If you mean something else it's still not clear what you mean. Do you, for example, mean matching a decimal numeral, such as 12 against a hex numeral, such as C? Icicles does let you define your own matching functions, but no such different-base numeral matching is there by default.
    – Drew
    Commented Sep 23, 2017 at 15:08

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.