Questions tagged [dired]

Dired is a major mode that allows users to edit files and directories on a file system. It is essentially a file browser, with a wide range of features and an appearance similar to the `ls` command.

487 questions
97
votes
5 answers

Edit file with super-user rights

When you have to edit system files, it's an usual situation that you launched Emacs with a normal user before, so the file will be write-protected. What can I do to gain root privileges? I mean something like M-x sudo from dired. I don't want to…
smonff
  • 1,575
  • 1
  • 15
  • 20
66
votes
4 answers

How to quickly copy/move file in Emacs Dired?

In Dired mode, I can m mark files and R to move them to a destination. Some times the destination path is too long. With the destination open in a split window, is there a way to move files quicker? When I see the two dired windows on the screen,…
Nick
  • 4,423
  • 4
  • 24
  • 41
49
votes
7 answers

Tree-based directory browser?

I love dired, but sometimes (particularly when filming screencasts) I want to see the tree-structure of a directory and its children, a la the tree(1) command. Is there a tree-oriented directory browser for Emacs?
Avdi
  • 737
  • 1
  • 7
  • 8
43
votes
4 answers

Why can't I list the contents of Desktop on macos using dired?

When I do C-x C-f on ~/Desktop/ in macos Catalina, I get the following error. Listing directory failed but 'access-file' worked I can list the directory for just ~. I'm new to Emacs and know little else. I've tried installing Emacs through Homebrew…
user25536
36
votes
5 answers

Is there a way to use query-replace from grep/ack/ag output modes?

I'm aware of find-grep-dired, marking the corresponding files and then pressing Q to run dired-do-query-replace-regexp on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use…
dgtized
  • 4,169
  • 20
  • 41
26
votes
8 answers

Close all dired buffers

Sometimes my buffer list has 10+ dired windows, and I end up using buffer-menu to manually mark and kill all of them. Is there a faster way to close all open dired windows?
nispio
  • 8,175
  • 2
  • 35
  • 73
26
votes
2 answers

Current path in Dired or Dired+ to clipboard

Say we have a Dired buffer open on some directory. How can I send the directory path to the clipboard? Also, how can I do the same when the Dired cursor is on a specific file, without opening the file first?
Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47
20
votes
4 answers

How to set emacs as the default file manager?

Some programs like firefox have buttons that when clicked open a file manager for browsing files. How do I make it to open in emacs with dired mode on Debian Linux?
godblessfq
  • 1,177
  • 8
  • 21
19
votes
7 answers

Dired "quick-view" key to preview the file at point

I would like to create a function that does a "quick view" of a file the is under point in dired. The way that I would like for this to work is that I hold down a function key, which then makes the file visible in a buffer, but when I let off of…
Eric Brown
  • 3,212
  • 4
  • 16
  • 20
18
votes
3 answers

Dired+ missing from MELPA

I am trying to install dired+ from MELPA but it seems that it no longer is listed. I also checked here: https://melpa.org/ Is this normal?
Tohiko
  • 1,589
  • 1
  • 10
  • 22
17
votes
7 answers

Simple ways to copy/paste files and directories between dired buffers

Is there a simple M-w C-y approach to copy paste files and directories between two dired buffers? I mean marking some items (files and buffer) by m then copying them by M-w (or another shortcut), then going to another dired buffer (which is not…
Name
  • 7,689
  • 4
  • 38
  • 84
17
votes
2 answers

Finding files by names

How can I bring all files with names that conform a specific regex, recursively in a directory tree, to a single dired buffer? So I can rename/delete them all at once?
iLemming
  • 1,223
  • 9
  • 14
15
votes
4 answers

Recursively open files matching regexp in marked directories

Generally speaking, I would like to be able to open all files within a given set of directories (and their subdirectories) where the filename matches a given regexp. For example /home/nispio/project: total used in directory 1612 available…
nispio
  • 8,175
  • 2
  • 35
  • 73
15
votes
2 answers

Display recursive folder sizes in-line in dired?

I'd like to display the recursive size (the value that would be reported by du) of folder contents in-line in the dired buffer as an additional column or in place of the directory file size. Is this already possible with dired/dired+ or a related…
ebpa
  • 7,319
  • 26
  • 53
15
votes
2 answers

Tramp/Dired transfers files inline over ssh instead of using scp externaly

I am using tramp via ssh to access remote files. For text files, this is working really well, but whenever I want to copy larger remote files to my local machine, tramp uses its slow inline method (encoding the file with gzip). This is much slower…
Chris
  • 252
  • 2
  • 5
1
2 3
32 33