Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

31
votes
5answers
3k views

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 ...
8
votes
3answers
1k views

How to use “o” to open from dired/ibuffer into another frame

I have two windows open and split vertically (single frame): A) contains my work B) contains either dired or ibuffer. I would like to be able to navigate to a file/buffer in pane B and hit "o" ...
19
votes
7answers
1k views

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 ...
8
votes
3answers
547 views

Search and replace through a multifile project in AUCTeX?

I am about to adopt Emacs to be the only editor I use in all what I am writing including LaTeX documents. I came from WYSIWYG editor which served that purpose fairly nice, namely TexStudio or TXS for ...
38
votes
7answers
14k views

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 ...
21
votes
8answers
3k views

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?
10
votes
2answers
442 views

Programmatically insert files into Dired buffer

I have a list of file names (with full path) and I want to create a Dired buffer listing this set of files. How would I go about doing that? How do I create a Dired buffer from a list of file names? ...
7
votes
4answers
753 views

The C-x C-j binding for dired-jump stopped working

I used to have a keyboard shortcut for the following action: "Open the folder containing this file in Dired+, and place point (cursor) on the file" I believe it was C-x C-j, and I don't recall ...
4
votes
2answers
322 views

After enabling ivy-mode, `dired-create-directory' does not allow me to choose an entry not in the completion list

Is there any way to allow me to type in a new dir name that is not in the completion list generated by ivy-mode?
2
votes
1answer
125 views

Cherry-pick columns to display in Dired or Dired+

I would like to customize the amount of detail displayed in Dired. Basically I would like to cherry-pick the "columns" to display. More precisely, I would like to hide the "owner group" information. ...
0
votes
2answers
78 views

dired+ not open in same buffer

Windows 10 (64 bit), Emacs 26.1, dired+-20170818.1411 I want (in dired mode) to open all folders in ONE buffer when press Enter. So in my init.el (diredp-toggle-find-file-reuse-dir 1) But it not ...
41
votes
1answer
12k views

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? ...
9
votes
4answers
2k views

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/...
8
votes
1answer
2k views

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 (...
8
votes
4answers
924 views

How can I run a keyboard macro in selected buffers from Ibuffer or selected files from dired?

If I have to do some variable name refactoring, I use ag and multiple-cursors. But when I have to do some code block removal/addition/moving, I use keyboard macros. But I need to switch to each ...
17
votes
2answers
2k views

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 ...
12
votes
1answer
1k views

how to deal with ZIP archives in DIRED?

I want to work easier with archives in Emacs dired-mode. And I think that my needs are not only mine. What I want? Two things in Dired: z to zip file or dir on cursor (or all marked files/dirs if ...
6
votes
3answers
273 views

Dired heading directory with text-properties to jump to parent directories

Speedbar has a nice feature wherein the directory heading at the top of a files/directory buffer contains various text properties for the user to jump to any of the parent directories by placing the ...
5
votes
1answer
153 views

Can I yank the names of all marked files from a dired buffer?

I'm working on several files in sequence and want to build a buffer of file names to log my progress.
1
vote
2answers
390 views

speedbar — mark/unmark directories/files — `speedbar-get-marked-files`

Q: Is there a publicly available plugin/modification for the speedbar.el library to mark/unmark and essentially implement speebar-get-marked-files similar to dired-mode's dired-get-marked-files? If ...
5
votes
2answers
858 views

Windows: Open files by default application

Windows 10, Emacs 25.1, Dired+ In my folder "test" I have different file: So I want when press Enter on file 97_things_for_programmer.pdf to open this pdf file by my default application - Adobe ...
5
votes
1answer
696 views

Is there a way for magit to display the branch in the dired buffer mode line for a given directory?

I'm moving to emacs from shell/Vim and I'm very used to seeing the branch I'm working in when I'm at the project level. Is there any way to get the Git branch name to display in the dired buffer mode ...
4
votes
1answer
316 views

Openwith doesn't work in dired

Here is my openwith settings: (require 'openwith) (setq openwith-associations '(("\\.mov\\'" "smplayer" (file)))) (openwith-mode t) When I press enter in dired mode on a .mov file, it still open it ...
3
votes
2answers
384 views

Dired: Open files by external application in Linux

I want to open several types of files in Dired by different external applications. For example: .doc files with LibreOffice .pdf files with evince .jpg files with pinta etc... How do i configure ...
2
votes
2answers
894 views

How to edit and save an extremely stubborn read-only file

I am trying to edit the file /etc/postfix/main.cf but this applies to any file. Currently its permission bits are set to -rw-r--r-- I want to open, edit and save this file when operating as a ...
1
vote
1answer
45 views

Dired / Wdired: How to test whether a filename is relative / absolute

I am creating a dired-mode buffer with: (dired (directory-files-recursively default-directory "")) This gives me absolute paths for each file, which is great. I am still unsure how the default-...
1
vote
1answer
109 views

How can I highlight cursor or line in unselected frames?

Prelude Let me start by mentioning the scenario where the problem arises. I see that 2-3 variables are always used together in a system. I need to add yet another one that will be used along with ...
1
vote
1answer
224 views

How to search for files from a root directory and get the results as a dired buffer?

I have a directory which contains directories with many music albums, and I'm doing a selection of songs according a list I found on the Internet. What I'm doing is splitting windows with the ...
0
votes
0answers
26 views

Jump to bookmars - how show only last folder?

windows 10, emacs 26.1 In my init.el (diredp-toggle-find-file-reuse-dir 1) As result when I press Enter in helm-mini buffer show only last opened folder. Nice. This exactly what I need. But... ...
0
votes
3answers
105 views

Dired+ key binding issues in terminal emacs

Using the Dired+ library, and running Emacs in a terminal, all arrow keys in dired buffers invoke M-O (which is bound to diredp-chown-this-file) instead of correct <left> <right> <up&...
0
votes
0answers
65 views

Dired-K: Not change color of file name (change by date)

Windows 10, Emacs 25.1, Dired+, Dired-K Suppose current time is 20:31 Here my init.el (require 'dired+) (require 'dired-k) (define-key dired-mode-map (kbd "K") 'dired-k) (define-key dired-mode-map ...
0
votes
0answers
22 views

Why “dired-jump” open folder in dired mode with split mode?

windows 10 (64 bit), Emacs 25.1, dired+ I open my init.el. The I press C-x C-j (dired-jump) as result open folder d:/Programs/Emacs/.emacs.d/" in dired mode with split vertically. Why? I need to ...
0
votes
0answers
32 views

dired: different action from same bind based on file type (extension), maybe hydra?

i really would love to have the option to launch different apps for a specific file type. for example if i have a .jpeg file i would want an option to launch in gimp, inkscape etc. Ideally i would ...
0
votes
1answer
302 views

prelude-ivy: How to select and open multiple files

I have installed Ivy (along with Swiper and Counsel) as part of Prelude by doing a (require 'prelude-ivy) in my prelude-modules.el file. It seems to work, but I am not able to figure out how to do ...