I want to do some refactoring. For that purpose I want to list all keywords grouped and sorted by their frequency of appearance.

That could help me get ideas, which repetitive code I could start abstracting-away.

Is there a way to do this nicely with emacs / elisp?

  • The "keywords" being a word list that you already have in a separate file? And you want to know how many times each of those words appears in some other set of files? – phils Sep 12 '19 at 10:45
  • Yes, think of those text analyzers who let you find the most frequent phrases: online-utility.org/text/analyzer.jsp The idea is to search through files in a directory (with subdirectories), do you think that is possible? – Jon Riel Sep 12 '19 at 11:55
  • Sure, but I probably wouldn't use elisp to do it. Is there a particular reason you would like to do it within Emacs? – phils Sep 12 '19 at 12:39
  • No, there is no particular reason I want to do it within Emacs other than convenience – Jon Riel Sep 12 '19 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.