Questions tagged [dired]

Dired is a mode for the Emacs text editor that allows users to conveniently edit files and directories on a file system. Use together with the [emacs] tag.

is a mode for the text editor that allows users to conveniently edit files and directories on a file system.

196 questions
72
votes
15 answers

How do I create an empty file in emacs?

How can I create an empty file from emacs, ideally from within a dired buffer? For example, I've just opened a Python module in dired mode, created a new directory, opened that in dired, and now need to add an empty __init__.py file in the…
Singletoned
  • 5,089
  • 3
  • 30
  • 32
63
votes
6 answers

How to create new file from dired mode?

I want to create a new file in dired mode. Is there "create new file" command in dired mode ? For example, When I type "c" in dired mode, it creates "untitled.txt". It's very simple , but I can't find it.
Kei Minagawa
  • 4,395
  • 3
  • 25
  • 43
57
votes
6 answers

How do I stop emacs dired mode from opening so many buffers?

When I use dired mode to browse around and find a file I want to open in Emacs, dired opens a new buffer for each directory I visit when looking for the file each time I select a directory with Enter, which means I can end up with a lot of buffers I…
David Webb
  • 190,537
  • 57
  • 313
  • 299
39
votes
2 answers

Dired - open files in another Emacs window

I want to have two Emacs windows on the screen: one for Dired and one for code. But when I click on a file in the Dired buffer the file opens in the the same window, in place of the Dired buffer. Can I change this behaviour?
ceth
  • 44,198
  • 62
  • 180
  • 289
38
votes
3 answers

In Emacs dired, how to find/visit multiple files?

If I have multiple files marked, how do I find/visit all those marked files in emacs, beside running dired-find-file on each of them? Is there a build-in command, or do I need some extra lisp code?
polyglot
  • 9,945
  • 10
  • 49
  • 63
36
votes
8 answers

How can I open files externally in Emacs dired mode?

I want to open a pdf with evince instead of DocView mode. Is there a possibility to open a file with a specific command like 'evince'?
Gustavo Alip
  • 361
  • 1
  • 3
  • 3
36
votes
3 answers

Emacs Dired rename many files

How to rename from: VAR1_1F_text.txt VAR2_1F_text.txt VAR3_2F_text.txt to 1F_VAR1_text.txt 1F_VAR2_text.txt 2F_VAR3_text.txt How to switch parts of filenames?
PascalVKooten
  • 20,643
  • 17
  • 103
  • 160
26
votes
2 answers

How do I uncompress/unzip within Emacs

I would like to run unzip (or even zip) within dired or a dired-like buffer. Is there anything like this? I would like something similar as in the Nautilus file manager: i.e., selecting files and then pressing a keystroke to get these files into a…
Damien Cassou
  • 2,555
  • 1
  • 16
  • 21
24
votes
3 answers

How to pick directory (not file) in IDO mode, emacs-24

IDO mode is awesome. It's essential to know the basic shortcuts, especially the escape hatch Ctrl-f (introduction-to-ido-mode/) which gets you out of ido-mode. In dired, if I want to copy a file to a directory, I can't seem to use ido to pick the…
justingordon
  • 12,553
  • 12
  • 72
  • 116
23
votes
2 answers

How to change directory in Emacs dired

In dired+ in Emacs 23.2.1, how do I navigate to a different directory ("change directory")? I know how to move up a directory with ^ and how to move to different directory lines with < and >, but I have been unable to find a command which allows me…
SabreWolfy
  • 5,392
  • 11
  • 50
  • 73
22
votes
5 answers

error in dired sorting on OS X

On OS X 10.5 Emacs 23.2, in dired-mode, if I try to sort by dired-sort-toggle-or-edit with prefix argument --sort=extension or -X, I get: insert-directory: Listing directory failed but `access-file' worked and the dired buffer becomes empty. I…
hatmatrix
  • 42,883
  • 45
  • 137
  • 231
21
votes
4 answers

Emacs dired: too much information

I'm trying to use Emacs and everything is fine, but the information about every file in my directory is too comprehensive. How can I tell it to show only file name (and maybe filesize in human readable format)? I tried options like…
Valentin Golev
  • 9,965
  • 10
  • 60
  • 84
21
votes
8 answers

How to avoid pop-up of *Async Shell Command* buffer in Emacs?

My ~/.emacs contains the following settings for opening certain files with certain applications (Ubuntu 12.10; Emacs 24): (setq dired-guess-shell-alist-user '(("\\.pdf\\'" "okular ? &") ("\\.djvu\\'" "okular ? &") ("\\.mp3\\'" "vlc…
Marius Hofert
  • 6,546
  • 10
  • 48
  • 102
16
votes
2 answers

How to sort files in emacs dired?

Emacs dired mode is an easy to use text-based file manager. By default, files are displayed in alphabetical order. Is there a way to sort the files by file size descending order?
Nick
  • 8,451
  • 13
  • 57
  • 106
15
votes
4 answers

is there an emacs tool to show a directory structure as a tree?

I am aware of Speedbar (I prefer the structure in the same frame as the rest of my work), and dired shows too much information. I'm after something like the svn-status tree representation. Is there anything like that? Thank you. EDIT: Here's what I…
Dervin Thunk
  • 19,515
  • 28
  • 127
  • 217
1
2 3
13 14