If I run M-x magit I see a big list of staged and unstaged file paths. I want to search through the list of file names, using my usual Emacs command of C-s (isearch-forward). But in this magit buffer that also searches file contents -- not what I want. Is there a way to search just the file path list, and prevent it from expanding and going into the content of the files?

  • IIUC, it actually searches through the diffs, not the complete contents.
    – NickD
    Commented Nov 28, 2023 at 2:39
  • 1
    Magit supports imenu. In the Magit status buffer, press M-g i (or M-x imenu RET), then select the section you are interested in and you should be able to browse the files. The search is not performed using isearch thus this does not directly answer your question, but I hope it is a decent alternative. Commented Nov 28, 2023 at 12:08


Your Answer

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

Browse other questions tagged or ask your own question.