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.

4
votes
0answers
58 views

Does Dired have something like “New Folder with Selection” of macOS Finder?

I want to create new folder then move file that is marked to that folder in emacs dired mode. In macOS Finder, you can use the new folder with selection. Is there a feature like this in emacs or ...
0
votes
0answers
71 views

copy (clone) a file into same dired buffer

Im looking for a way to copy (clone) a file into same dired buffer. For example if i have a test.zip file in ~ i would issue it and it would copy test.zip file to ~. a bonus would be if one can ...
3
votes
2answers
65 views

simple function in dired to create a dir with current date?

so im trying to create a simple script to create a directory in dired with a pre defined string (the current date). i have another script that inputs the current date in a format i want (defun z-...
10
votes
1answer
393 views

How to stop dired printing “Reverting buffer …”

After setting dired-auto-revert-buffer to t, even when I'm working on a buffer of file that may produce some results, the message keep printing if there is a dired buffer behind current buffer. This ...
3
votes
1answer
587 views

How can I open an url file in emacs dired?

When using dired in emacs, how can I open an url file in a web browser outside emacs?
2
votes
3answers
1k views

How to sort directories first in dired?

I add (setq dired-listing-switches "-lXGh --group-directories-first") in my init.el But when I go into dired mode. ls does not support --dired; see ‘dired-use-ls-dired’ for more details. insert-...
0
votes
2answers
133 views

print absolute path of symlink?

Is there any function that can print a symlink's full path in dired mode? Alternatively is there any function that can print an arbitrary buffers' full path?
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?
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
265 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
132 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
182 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
181 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
534 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
325 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
288 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
73 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
259 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
36 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 ...
5
votes
1answer
603 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
143 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
31 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
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 ...
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
372 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
62 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
67 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
559 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. ...
4
votes
2answers
307 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
38 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
189 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
92 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
142 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
131 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
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 ...
2
votes
2answers
666 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
108 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
153 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
306 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 ...
6
votes
1answer
139 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
258 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 ...
6
votes
3answers
924 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
118 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
225 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
68 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.
5
votes
1answer
190 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
689 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?