Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9236469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:18:01+00:00 2026-06-18T07:18:01+00:00

I am looking for a command M-x find in Emacs, which behave exactly like

  • 0

I am looking for a command M-x find in Emacs, which behave exactly like M-x grep (allows to modify the command, prints the output nicely including links to the found files, …) and which executes find . -iname '*|*' (with the cursor placed at the vertical bar — for inserting a search pattern — if not too complicated to implement). Has anyone implemented this before? [I am aware of M-x find-grep]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:18:02+00:00Added an answer on June 18, 2026 at 7:18 am

    Let’s start with M-xfind-dired that does almost what you want: it reads directory from minibuffer, defaulting to current directory, and then reads other find arguments. The result is opened in dired mode, and I think it’s as nicely as it can get (if you think that dired is too verbose, check out dired-details and maybe dired-details+ packages at MELPA).

    Now let’s make it start with -iname ** with a cursor between the stars when it’s asking for options. Looking at find-dired source, we can see that it uses the value of find-args as an initial input argument to read-string. This argument is obsolete and deprecated but awfully useful. One of its features (as we read in read-from-minibuffer description) is providing a default point position when a cons of a string and an integer is given.

    (defun marius/find-dired ()
      (interactive)
      (let ((find-args '("-iname '**'" . 10)))
        (call-interactively 'find-dired)))
    

    We added single quotes around stars in '**' because the arguments are subject to shell expansion.

    Instead of reading our own arguments from the minibuffer, we just
    rebind find-args and delegate all the rest to find-dired. Normally
    find-dired remembers last arguments you enter in find-args so they
    become the new default. Rebinding it with let ensures that this
    modification from our call to find-dired will be thrown away, so
    regular find-dired will use the arguments given to the latest
    regular find-dired. It probably doesn’t matter if you don’t use regular find-dired. If you want find arguments given to our wrapper to be used by regular find-dired, use the following definition instead:

    (defun marius/find-dired ()
      (interactive)
      (setq find-args '("-iname '**'" . 10))
      (call-interactively 'find-dired))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a command line either for an algorithm (script) which allows
using grep, vim's grep, or another unix shell command, I'd like to find the
As I asked in the title, I'm looking for a script/command to find the
How do I find out which version of .NET is installed? I'm looking for
Looking in the android source for the reboot command we find the following line:
I like the unix find command but I always find it too 'fiddly' to
Is there a command line shell or shell customization that supports emacs-style ido find
I’m looking for find command arguments to find all files under the / that
I am looking for a command which would get the result of whether there
I'm looking for a command which finds all files in a directory using a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.