24
votes
Accepted
How to mark all files in the current dired directory?
U (if necessary) followed by t
dired-unmark-all-marks
dired-toggle-marks
20
votes
Accepted
How to rename a file with dired with the current file name as default?
Pressing R in dired queries the new file name in the minibuffer.
There you can access the current file name by pressing the ↓ key.
Note that this is a general convention when querying text input from ...
19
votes
Tree-based directory browser?
Have you ever tried Emacs' M-x speedbar? :-) before installing some new package I'd try an inbuilt solution...
Update 2020-01-10
Actually I'm using now dired-sidebar which is available via Melpa.
18
votes
Accepted
Dired. First show list of folders
External ls
GNU's ls has an option --group-directories-first, and you can control the list of options passed to ls by dired with the variable dired-listing-switches (assuming that you haven't already ...
17
votes
Accepted
How to only show the file/directory column in a Dired buffer
Assuming this question is about dired (the Emacs directory editor mode), there is no simple built-in way to rearrange the columns. Dired is presenting the output of an ls command so you can customize ...
16
votes
Accepted
Finding files by names
Wildcard
Use
M-x find-name-dired
to get files according to a wildcard.
Example
Find all files with suffix "org" in directory "~/org/". Enter the following
M-x find-name-dired
~/org
*org
and ...
16
votes
Simple ways to copy/paste files and directories between dired buffers
You can do the following in vanilla Dired (no 3rd-party library needed):
Go first to a Dired buffer that lists the target directory.
With the cursor on the directory header line for a listing of the ...
15
votes
dired - sort and hide by default
Thanks to Dan's comment on the original question.
This seems to work:
(add-hook 'dired-mode-hook
(lambda ()
(dired-hide-details-mode)
(dired-sort-toggle-or-edit)))
14
votes
Accepted
How to drill back up a folder in Dired?
What did you try?
C-h m tells you about the current mode for an Emacs buffer. In Dired it lists the key bindings, including ^, which takes you to the parent directory, in Dired.
C-h k ^ tells you:
...
14
votes
Accepted
How to remove subdirectories inserted into the dired buffer with i?
TL;DR: Type C-uk on the subdirectory header line.
Quoth (emacs) Subdirectories in Dired:
Use the ‘l’ command (‘dired-do-redisplay’) to update the
subdirectory’s contents, and use ‘C-u k’ on the ...
13
votes
Accepted
How to stop dired printing "Reverting buffer ..."
Customize option auto-revert-verbose to nil. C-h v tells you this:
auto-revert-verbose is a variable defined in autorevert.el.
Its value is t
Documentation:
When nil, Auto-Revert Mode does not ...
13
votes
Accepted
Follow symlinked directories in Dired
You can set the value of find-file-visit-truename to t — for instance with customise via M-x customize-variable RET find-file-visit-truename or just with (setq find-file-visit-truename t).
This will ...
13
votes
Why can't I list the contents of Desktop on macos using dired?
If you find the problem persists after granting Emacs full disk access:
from here on the problem remains because Emacs on MacOS gets launched indirectly, from a Ruby script. Your Emacs binary has full ...
12
votes
Accepted
Dired+ missing from MELPA
It is true that MELPA no longer pulls libraries from EmacsWiki.
Please obtain Dired+ and other libraries by me from EmacsWiki: dired+.el.
All of my pages on EmacsWiki are locked (they require a site ...
11
votes
Copy all file names that match regexp
Use function directory-files, for which C-h f tells you:
directory-files is a built-in function in `C source code'.
(directory-files DIRECTORY &optional FULL MATCH NOSORT)
Return a list of ...
11
votes
Accepted
Why doesn't (use-package dired) work for me?
Debugger entered--Lisp error: (error "Package ‘dired-’ is unavailable")
You get this error when package.el tries to install a non-existent package. use-package will attempt to install the given ...
11
votes
How show size in KB in dired mode?
Try using h among your dired-listing-switches - e.g., -alFh. It stands for "human-readable", and it shows sizes in KB etc.
But which ls switches are available can depend on your particular ls command ...
11
votes
Is there a table of Evil keys for Dired?
Here are a few things you can try to see available keys:
? -- actually this is partly wrong because
SPC ? dired
F1 m (describe-mode)
SPC h SPC dired -- this lets you jump to the code for the layer ...
11
votes
Accepted
Is it possible to load Dired+ automatically with use-package?
dired+ has left MELPA repository, and now you have to download it manually from EmacsWiki. You can still use use-package with a downloaded package, like this:
(use-package dired+
:load-path "~/....
11
votes
How show hidden and system folder/files?
What is the value of option dired-listing-switches? If you are telling ls not to list dot files ("hidden" files) then they will not be shown by Dired.
Do you have dired-omit-mode turned on? If so, ...
10
votes
Batch rename files to numeric sequence in dired?
Firstly, take note of JeanPierre's comment -- you're not renaming files by using convert like that. You're creating new and different files (lower quality ones, although the difference may or may not ...
10
votes
Dired+. Mouse click - open folder in the same window
If you're using Emacs 26 or later (unlike what is specified in the question...), you can just use:
(define-key dired-mode-map [mouse-2] 'dired-mouse-find-file)
(The default binding is dired-mouse-...
10
votes
How to mark all files in the current dired directory?
@phils provided the answer (which should be accepted, IMO).
If you use library Dired+ then you can also do what you ask in some other ways.
In particular, commands, such as H (dired-do-hardlink), ...
10
votes
Windows: Open files by default application
Press W in dired mode (Emacs 26.1, official MS Windows built), which is bound by default to browse-url-of-dired-file.
The documentation string is restrictive by saying
In Dired, ask a WWW browser ...
9
votes
How to sort directories first in dired?
Use standard Emacs library ls-lisp.
(require 'ls-lisp)
Customize these two user options (you can just use setq to set them in your init file, if you prefer):
ls-lisp-dirs-first to t
ls-lisp-use-...
9
votes
Accepted
Copy to kill-ring selected file names/full path
You can copy file names by pressing w. It calls the function dired-copy-filename-as-kill:
(dired-copy-filename-as-kill &optional ARG)
Copy names of marked (or next ARG) files into the kill ...
8
votes
Accepted
Display recursive folder sizes in-line in dired?
Indeed, Alex is right.
If your Emacs version is >=24.4, then you can
try `dired-du' library. It's available from the ELPA repository.
Once you've installed this lib:
If your current buffer is in ...
8
votes
How to sort directories first in dired?
As @lawlist mentioned, you need to install coreutils as the ls command which ships with mac does not have the option to sort directories first. If you have homebrew, you could just type brew install ...
8
votes
Dired+ missing from MELPA
Is this normal?
Yes, MELPA recently updated its policy and no longer includes packages hosted on EmacsWiki, quoting security reasons: https://github.com/melpa/melpa/pull/5008. See also Drew's answer.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
dired × 514files × 32
tramp × 30
key-bindings × 19
microsoft-windows × 19
buffers × 14
shell × 13
org-mode × 12
sorting × 12
find-dired × 11
init-file × 10
regular-expressions × 10
window × 10
search × 10
debugging × 9
images × 9
directories × 9
evil × 8
helm × 8
faces × 8
git × 8
osx × 7
use-package × 7
shell-command × 7
remote × 7