5
votes
Accepted
how to do command substitution in eshell generally (NOT just for loop)
I then tried various sorts of C-h and websearch, without success.
Please check the manual first! (or second, after docstrings) (eshell) Dollars Expansion:
Eshell has different ‘$’ expansion syntax ...
4
votes
Find files like in Nautilus' search
To answer your question about find-name-dired, according to its manual page (C-h f find-name-dired):
The default command run (after changing into DIR) is
find . -name 'PATTERN' -ls
See ‘find-...
3
votes
How can I recursively find and replace in the current git repository
You can use project-find-regexp (C-x p g), from project.el, to find the regexp you are looking for and in the resulting buffer you can hit r (xref-query-replace-in-results) to replace what you need.
...
3
votes
Accepted
find files containing "Emacs"
tl;dr
Do you get the expected behavior under emacs -Q? It's possible you've disabled case-insensitivity.
Long answer
Without knowing your arguments to find-name-dired (you should add them to your ...
3
votes
Find files with find-dired sorting by date and by size
After doing some googling for the Linux find parameters and looking at the find-dired function, I came with these two functions that seem to work.
Not sure if this is the optimal way, but at least ...
2
votes
Accepted
Find files like in Nautilus' search
I solved the problem by defining this function + shortcut:
(defun find-in-current-location ()
(interactive)
(find-dired dired-directory (concat "-iname \"*" (read-from-minibuffer "Search for: ") "...
2
votes
Tramp `find-dired`: wrong type argument error
sftp is implemented in Tramp by GVFS, so it doesn't support remote processes. You must use a Tramp method like ssh or scp.
2
votes
Accepted
How can I recursively find and replace in the current git repository
You can use (vc-git-root (buffer-file-name)) in place of "~/my_project". It walks up the tree until it finds the directory that contains the .git subdir and declares that to be the root of ...
2
votes
Find files with find-dired sorting by date and by size
If you use library find-dired+.el then you can do the date part using command find-time-dired:
find-time-dired is an interactive compiled Lisp function.
(find-time-dired DIR MIN-TIME MAX-TIME &...
1
vote
How to ignore some directories with find-grep-dired?
If you use library find-dired+.el (see also Locate Files Anywhere), then you can exclude any number of paths, and you can limit the depth.
find-grep-dired is an interactive compiled Lisp function in
...
1
vote
find-name-dired : save selection of files for reuse?
Just run M-x my-save-current-buffer, then open saved file in Emacs.
Here is the code,
(defun my-save-current-buffer ()
"Save current buffer (Dired, Grep, ...) to re-use in the future."
(...
1
vote
find-name-dired : save selection of files for reuse?
To get a list of the (absolute names of the) files in a Dired directory (including one produced by find-name-dired etc.), just use t with no files marked, to mark them all, and then use (dired-get-...
1
vote
Accepted
How can I prevent ` running timer: (void-function vc-git-root)` error
But if there is not .git folder in the root directory ... (void-function vc-git-root)
That error means that the function hasn't been defined.
The problem is that you haven't loaded the vc-git library ...
1
vote
Searching in Dired for content in files while filtering files
You can try the built in find-grep-dired. From the documentation:
Find files in DIR that contain matches for REGEXP and start Dired on
output.
Try C-h f find-grep-dired RET to know more.
1
vote
Accepted
How to replace strings including `.` (dot) as first character using dired-do-find-regexp-and-replace
This really has nothing to do with find-name-dired.
This is about Q in Dired buffers (including from find-name-dired).
Q is dired-do-find-regexp-and-replace. That command treats your first input ...
1
vote
How can I do a regex search recursively from a directory?
@phils answered the question. This is just to say that the version of find-grep-dired in library find-dired+.el provides a bit more than the vanilla version:
It has two optional args, DEPTH-LIMITS ...
1
vote
How can I do a regex search recursively from a directory?
The following does that and presents the results as a dired buffer:
M-x find-grep-dired
You'll also want to know about:
M-x rgrep
(which doesn't support the -l option to grep, but is usually what ...
1
vote
How to find a directory with given depth from current directory?
You can use the ls command of the built-in eshell for listing the files with some predefined depth.
You have to specify the depth by the right number of concatenated file name generator expressions */...
1
vote
How to find a directory with given depth from current directory?
Library find-dired+.el can help with this. C-h f find-dired:
find-dired is an interactive compiled Lisp function in
find-dired+.el.
(find-dired DIR ARGS &optional DEPTH-LIMITS EXCLUDED-...
1
vote
How to find a directory with given depth from current directory?
The elgrep-search command has options :mindepth and :maxdepth. Elgrep is available via package-install from the melpa package archive (instructions how to add melpa to package-archives can be found on ...
1
vote
How to find a directory with given depth from current directory?
I'd be inclined to use find for that:
(let ((dirname (expand-file-name "~/"))
(depth 3))
(split-string
(shell-command-to-string
(format "find %s -mindepth %d -maxdepth %d -type d -...
1
vote
Cannot use find-dired: setq: Searching for program: is a directory,
OK, found the problem: I also had to set shell-file-name to something other than /bin/sh, because Ubuntu ships with Dash as sh and Emacs relies on non-standard GNU features present in Bash, but not ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
find-dired × 21dired × 11
find × 4
search × 3
git × 2
grep × 2
directory × 2
debugging × 1
regular-expressions × 1
window × 1
microsoft-windows × 1
tramp × 1
shell × 1
eshell × 1
replace × 1
find-file × 1
shell-command × 1
linux × 1
sorting × 1
directories × 1
subprocess × 1
cygwin × 1
query-replace-regexp × 1
error × 1