Stack Exchange Network

Stack Exchange network consists of 174 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.

4
votes
2answers
281 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?
7
votes
2answers
1k views

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?
3
votes
3answers
243 views

list marked files in dired in another buffer

I want to list particular files in a buffer, with each file on its own line. I want to be able to choose the files to list from a Dired buffer. I tried copying file names to the clipboard, and then ...
3
votes
1answer
128 views

Way to make a file read-only from dired?

Is there a way to make a file read-only from dired? This, this, and this are unclear to me. The manual has lots to say about marking/flagging via dired as well as operating on files, but I can't ...
5
votes
0answers
525 views

Controlling window locations for files visited by Dired [duplicate]

Very often I need to open a file in dired in other window and for that dired-find-file-other-window comes handy, but sometimes I want to open file in specific split - vertical or horizontal. So if I ...
1
vote
1answer
178 views

change default action of opening multiple files in dired

Having marked a bunch of files in dired-mode, if I wanted to open all them at once, I press F. But, the problem is, all the selected files opens in their own separate window and now i've at least as ...
4
votes
2answers
166 views

dired+ does not respect listing dired-listing-switches

I'm having problems getting dired to list directory contents correctly after I install dired+. To demonstrate, below is an example of how dired lists directory contents before installing dired+: This ...
5
votes
1answer
448 views

dired - sort and hide by default

More often than not, when I open a dired buffer, I press ( to run dired-hide-details-mode s to rundired-sort-toggle-or-edit What's a good way to have these done automatically every time I open a ...
1
vote
2answers
297 views

Hide dired buffers from IBuffer list?

I have a dired workflow that I like. From a file-visiting buffer, I'll use dired-jump to pop up to the containing directory. Dired renders the directory in a new buffer with the cursor on the file-...
3
votes
2answers
250 views

Batch rename files to numeric sequence in dired?

I have the following files in a directory: CIMG4879.JPG CIMG4880.JPG CIMG4881.JPG ... I want to rename them all with a numeric sequence such that: 01.jpg 02.jpg 03.jpg ... In bash, I could convert ...
1
vote
1answer
71 views

How do I control the directory that emacs starts in?

M-x dired = defaults me to C:\emacs\bin/ C-x d = defaults me to C:\home\files\ My init file is in C:\home\ and seems to work. I have read the relevant manual sections several times, and I can't ...
7
votes
1answer
233 views

Insert all subdirectories in Dired

How can I insert all the subdirectories of the toplevel directory in Dired? And how can I insert the whole directory tree, i.e. all the subdirectories recursively? I don't want to change the default ...
0
votes
0answers
35 views

Dired stopped working (trace with debug-on-error)

I just installed Emacs on a new laptop, moved over my init files, and all of a sudden Dired+ stopped working. With: (setq debug-on-error t) I see: Debugger entered--Lisp error: (wrong-type-...
2
votes
1answer
47 views

Supplying suggested destination directories to dired

When I rename files to move them I have a handful of popular destinations that I would like to see in the (pseudo)history so that I can just cursor up to choose one. What I'm thinking is something ...
4
votes
1answer
545 views

Why doesn't (use-package dired) work for me?

(use-package dired) complains: Debugger entered--Lisp error: (error "Package ‘dired-’ is unavailable") But I see others' emacs configurations do use (use-package dired), for example: https://github....
0
votes
2answers
139 views

How to change the mark (*) color in dired mode

I am using the cyberpunk-theme, the * are show in light green and is not visible in hightlighted line. I tried to set dired-mark-face to white. Is there other variables I can set?
1
vote
0answers
29 views

Manage freedesktop trashcan with dired mode

Trashed files are stored in the FreeDesktop standard location: ~/.local/share/Trash/files. How do I restore or permanently delete files in that folder using dired?
2
votes
2answers
811 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
1k views

(wrong-type-argument stringp nil)-error when starting dired

Dired used to run fine on my machine (Ubuntu 14.04). But for a while now, i keep running into the error (wrong-type-argument stringp nil). This does not only happen with dired but also with other ...
6
votes
4answers
362 views

Copy all file names that match regexp

In a dired buffer of a directory, how do I copy the file names of all files matching [tT]ypolog[yi]? Getting them from an elisp list format, \n separated format or otherwise into a python list format ...
0
votes
1answer
61 views

is there a dired-like mode that behaves like XEmacs' dired

Having mostly switched to Emacs, I still sorely miss the dired mode of XEmacs. As far as I can tell, XEmacs' dired started from dired-x (not Emacs' dired) many years ago and then drifted away, so I ...
1
vote
1answer
62 views

help with writing a dired function to convert md to org with pandoc CLI..started but stuck

im trying to write a function that will be used in dired where i would launch it on the file at point and it will convert it using pandoc. i have the following code chunk (warning: my coding skills ...
0
votes
1answer
526 views

Move folder using spacemacs with emacs command

I am a beginner using spacemacs and also new to emacs. What I try is to use the command M-x R new RET (dired-do-rename). Though everytime I type M-x, which is the same as SPC : I end up with helm-M-x. ...
3
votes
2answers
273 views

emacs list files with less information

Hi How can I use emacs find to list files without their detailed information? C-x C-f What I got: -r--r--r-- user 3845 Apr 10 2014 ua.cpp -r--r--r-- user 3845 Apr 10 2014 ub.cpp -r--r--r-- user ...
4
votes
1answer
37 views

Per-directory local settings in Dired, to sort folders differently

I was wondering if one can have a set of definitions in dired to sort (and maybe also filter) that are per directory. this would be also saved for all future sessions. any one knows of such a method?
0
votes
1answer
181 views

How to dired-find-file for ONLY directories in Dired?

I want to add keybinding to Dired mode for entering directory, and ONLY directory. By default enter key is bound to function dired-find-file. The problem with it is that its or opening new dired ...
0
votes
0answers
90 views

How to change ranger current line face?

I can not figure out how to change current line bg in ranger - I'm unable to find customize group for that, is that possible at all? Maybe its inherited from other dired face, can somebody point me ...
1
vote
1answer
140 views

help with dired function i wrote..how to insert current file at point into buffer?

i have zero coding skills but somehow (mainly goggle) managed to write this script (defun z/dired-shell-other-window-beets () "Open a shell with dired path in a new window and issue beet import on ...
2
votes
0answers
126 views

Ranger: cleanup doesn't work

I started using ranger and it's awesome, but one thing bothers me: It keeps every visited folder open in a buffer, so it floods my buffer list. There are two options that seem to be made to solve ...
0
votes
0answers
30 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 ...
2
votes
2answers
629 views

automatically use evil for ibuffer and dired

I am switching from vim to emacs and have evil installed. Mostly evil runs perfectly, but after starting emacs the first time and running ibuffer or dired I have to turn on evil-mode (C-z). This is ...
0
votes
1answer
103 views

Quicklook in dired-mode using a process/sentinel with external viewer

In dired-mode, I use an external quicklook tool on OSX called qlmanage, which pops open a window displaying a human readable image of the file with mouse scrolling capabilities. If I hit the space ...
7
votes
1answer
140 views

Marking files in dired with subdirectories

I'm trying to mark a set of files (including subdirectories' files) in dired matching a regex, so I do: C-U C-x d -alR RET e:/ RET Followed by %m and enter my regex. No matches. If, however, I ...
3
votes
2answers
290 views

Dired: group directories and symlinks to directories first

Is there a way to make dired group directories and symlinks to directories first? If I add --group-directories, like this: (setq dired-listing-switches "--group-directories-first -al") then it ...
0
votes
0answers
43 views

Open files with Dired recursively but exclude one top level dir

So I open all files matching a patter frequently using C-u C-x d, add the R switch etc. (Recursively open files matching regexp in marked directories). But what I need to do is exclude one top level ...
6
votes
1answer
134 views

How to move marked files or file under point in dired to a pre-defined directory?

I am trying to create a simple function for dired where I would be able to call the function on current (or marked) files and then quick move the current (or marked) files to a pre-defined directory. ...
3
votes
1answer
249 views

Dired reuse buffer on mouse click

I am currently using the diredp-toggle-find-file-reuse-dir feature of Dired+ so that selecting a directory in a dired buffer opens the directory in the current buffer as described here. However, it ...
5
votes
3answers
859 views

Expanding Dired to show subdirectories/files?

One of the biggest things I miss from other editors (e.g. Sublime, Intellij) is the ability to see the project structure, and expand/minimize directories as needed so I can see what I care about. Is ...
3
votes
1answer
105 views

Can pdf be previewed in dired+/peep-dired in the same way as jpg?

I use emacs (v 25.0.93.1) on windows 10, and I am impressed by all the funtionality of dired+. One function I use often is peep-dired, so I can preview my text files when scrolling down my files in ...
1
vote
1answer
215 views

Run org-store-link after renaming file with dired?

When in a dired buffer, I use R or dired-do-rename to move files from one directory to another (typically my "refile" directory to where the file(s) actually belong(s)). When I do this I'd like to ...
0
votes
0answers
45 views

quick insert pre stored commands to dired-do-async-shell-command

Does anyone know or has coded some mechanism (using helm/swiper/other) to quickly insert complex commands when issuing dired-do-async-shell-command? For example I want to stand on a folder and issue: ...
0
votes
1answer
67 views

Dired, colorize (change face) marked files/folder and save between sessions

I was wondering if anyone knew a way to mark some files/folder in dired and then colorize (change face for BG/FG) them. this would also need to be saved even after Emacs restarts.
0
votes
0answers
342 views

How to fix Slow emacs access of host mounted drive on Windows 7 under VirtualBox?

I'm setting up a virtual Windows 7 machine on my Mac OSX El Capitan using VirtualBox. The windows 7 install seems to work well, however, when launching Emacs 24.1 it is extremely slow on all file ...
5
votes
1answer
180 views

Combine two directories into a virtual directory and bookmark it?

How can I define two separate directories, create a virtual directory out of them in dired, and also bookmark that? I want to launch the bookmark and get the combined view. I know dired+ has ...
3
votes
3answers
619 views

dired alternative to openwith: how to open file per extension?

openwith seems to kill replying in mu4e. Is there a similar/alternative solution for easy defining default apps per extensions in dired?
0
votes
1answer
166 views

diff marked files in Dired+

If I have marked a couple files in different directories using Dired+ is there a way to see the diff? I was looking at dired-diff and diredp-diff, but they both take the file at point. Granted that ...
5
votes
1answer
144 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.
0
votes
2answers
109 views

Modification of Jim Blandy's `dired-tar` — Emacs for MS Windows

I enjoy using Jim Blandy's dired-tar library for Emacs built on *nix systems: https://www.emacswiki.org/emacs/DiredTar I am seeking to modify that library to support both *nix and MS Windows -- i.e.,...
0
votes
1answer
191 views

cant' create file with the same name in different directory in dired

I'm trying to create the new empty file Tried 'c' Tried C-x C-f when I type "mixins.py" Find file always suggest me to open the file in other directory with the same name, so I'm forced to create ...
2
votes
1answer
35 views

`+` in dired-mode with icicles and ido enabled raises an error

I just installed icicles. I use ido-mode for the minibuffer. In a dired buffer, when I press + (bound to dired-create-directory), here is what happens: the first time, the error icicle-restore-...