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.

Filter by
Sorted by
Tagged with
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 ...
55
votes
5answers
11k views

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 ...
8
votes
3answers
2k 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
2k 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
575 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 ...
5
votes
2answers
422 views

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

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?
39
votes
7answers
16k 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 ...
48
votes
1answer
13k 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? ...
23
votes
8answers
4k 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
491 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
810 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 ...
2
votes
1answer
179 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
3answers
116 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 ...
10
votes
1answer
3k 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
1k 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 ...
18
votes
2answers
3k 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 ...
13
votes
1answer
2k 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
316 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 ...
4
votes
1answer
176 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
0answers
57 views

Adding another column of information to dired (text snippets by Gnome Tracker)

I have a small Emacs Lisp function which calls Gnome Tracker's FTS Search via D-Bus and display results in a dired buffer. [ https://gist.github.com/vishalbelsare/4f78722856a6bca7faf1f73353892025 ] ...
1
vote
2answers
426 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
1answer
792 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 ...
5
votes
2answers
1k 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 ...
4
votes
1answer
390 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
674 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
1answer
339 views

emacs-25: mailcap settings for dired-view-file

I like to view pdf file in a dired buffer using xpdf. The following code in my ~/.emacs works fine for emacs-24. Just hitting "v" launches the xpdf with file (I stipulated xpdf in my ~/.mailcap file). ...
2
votes
2answers
1k 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 ...
2
votes
1answer
161 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
2answers
56 views

Copy all dirs exclude all subdirs with name “build”

emacs 26.1 dired+ I have dir my_dir. This dir contains 10 subdirs. In every of those dirs there are 2 subdirs: src build I need to copy in DIRED MODE all dirs and files from my_dir to my_dir2 and ...
1
vote
1answer
51 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
135 views

Why does emacs dired not display the same files as the Windows “Explorer” (e.g. Windows/System32/config)

(Emacs 24.3.1 i386-mingw-nt6.1.7601 of 2013-03-17 on MARVIN) Emacs dired of C:Windows/System32/config displays only the directories: '..' 'systemprofile' '.' 'TxR' 'RegBack' 'Journal' in the ...
1
vote
1answer
238 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
3answers
121 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
1answer
516 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 ...
0
votes
0answers
33 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
0answers
94 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 ...