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
3
votes
2answers
384 views

How show size in KB in dired mode?

Windows 10 (64 bit), Emacs 25.1, package dired+. In dired mode files size show in bytes. But I want to show in KB.
1
vote
0answers
61 views

emacs dired ignores LC_COLLATE=C when using sudo?

My emacs dired changes sort order from ASCII to case-insensitive whenever I view a directory listing under sudo::. Checking getenv on LC_COLLATE shows that emacs still thinks the value is 'C'; and ls -...
1
vote
1answer
155 views

How to rsync/fetch/download the folder open with ssh/tramp

I work in a folder on the server, peyote2 in this case. I can edit files there etc, we all know that. However I have there a pdb file (RNA 3D structure) that to view I have to download it to my ...
2
votes
0answers
74 views

Dired: use dimmed face for file details (permissions, ownership, etc.)?

I'd like to customize dired so the non-filename details (permissions, ownership, etc.) are slightly dimmed, putting visual emphasis on the filenames themselves. I like having the details present (I ...
1
vote
1answer
142 views

Cannot use find-dired: setq: Searching for program: is a directory,

The error is raised by shell-command--shell-command-with-editor-mode. But further stack trace is obfuscated by bytecompiled output. Recently I had to set (setq explicit-shell-file-name "bash") to be ...
2
votes
1answer
161 views

dired copy files without overwriting?

Q: how do I use dired to copy/move files without overwriting? I'd like to use dired to copy (or move) files from directory A to directory B. However, I only want to copy files in A that do not ...
2
votes
0answers
81 views

Accidentally visiting a FIFO

I'm in Dired, and one of the files in the current directory is a named pipe (FIFO) prw-r--r--+ 1 ivan staff 0 Feb 6 11:13 some_pipe If I (accidentally) visit it (with dired-visit-file), ...
1
vote
1answer
51 views

string splitting (renaming files)

new user here. I am wondering- can somebody walk me through how to do the following: In a given directory I have files that look like this fluc_sk2_556.png even_sk2_922.png I would like, with ...
1
vote
1answer
94 views

Match blank lines at end of file

How can I match – in, for example, a group of files from a Dired buffer – all files that have one or more blank lines at the end of the file? The specific need that prompts this question is to remove ...
0
votes
1answer
72 views

void-variable dired-after-readin-hook in emacs 25

I've get emacs 25 build ppa taken from this ask ubuntu answer and I have this functions and macro: (defun remove-lambda-helper (list matcher) "function that remove lambda from a list if match the ...
0
votes
2answers
120 views

Hide symlink destination in ls-lisp output?

By default Emacs' ls-lisp shows the symlink destination in its output like this: /tmp: total used in directory 2 available 12933091 lrwxr-xr-x 40 02-07 16:12 foo -> bar -rw-r--r-- 0 03-06 14:45 ...
2
votes
2answers
897 views

(Evil) “General” leader key (SPC) not working in some modes (dired, *Messages*)

I use Evil, and I'm using the General package to set my custom keybindings. I'm using SPC as a leader key. The trouble is, I find that SPC is not interpreted as my leader key in some modes, namely ...
2
votes
2answers
561 views

How to show MS Windows drives in dired?

I'm beginning to think that dired (+ extensions) is the file browser I've always been looking for. Under Windows, however, dired does not allow to switch to other drives easily. While most things are ...
3
votes
1answer
109 views

How do I convert .doc file to plain text on demand?

I would like to convert .doc files to plain text when opening them in Emacs. The command line tool antiword can read Word files. How do I pass them to antiword and then get the result in an emacs ...
1
vote
2answers
141 views

Eshell and Dired are unable to extract port number from authinfo file

My default-directory is: /ssh:lawlist@12.34.567.89#2222:/home3/lawlist My .authinfo file contains: machine 12.34.567.89 login lawlist password abcdefg The above-combination works just fine. ...
2
votes
1answer
116 views

Writing a complex dired function to open xterm and execute a command on all current marked files in dired

I'm trying to write a complex (to me) dired function, where I want to open a xterm window which will launch an application (fbot) with many arguments and input all marked dired files into that ...
4
votes
2answers
179 views

Use shift-up/down keys to mark/unmark lines in dired?

The default in dired is to mark files and folders with m, and to unmark them with u. Instead of this, I'd rather like to use shift-up and shift-down for marking or unmarking lines (in a DWIM fashion). ...
6
votes
3answers
687 views

How to grep marked files in the dired mode of emacs?

I hope it's a simple problem.. I'd like to search for the regexp 'thisWord' only in the marked files of a dired buffer. Usually I used in the dired buffer: M-x grep and then in the mini-buffer grep ...
1
vote
2answers
110 views

multiple marked files in `dired-do-async-shell-command ` open seperate instances of app (picard)..how does one pass them as a list?

So I'm trying to send a bunch of marked files to picard with dired's '&' (dired-do-async-shell-command). In the normal command line this opens one instance of picard with all the selected files: ...
7
votes
2answers
402 views

How to always kill dired buffer when deleting a folder?

If I'm in dired and have a subfolder with another dired buffer (a common situation when navigating up/down directory) and want to delete a folder, I hit Dx to mark for deletion, then execute. Emacs ...
0
votes
0answers
26 views

dired function i wrote passes only current marked folder at point, can i send all marked folder?

i have this simple function i wrote (tbh i have zero coding skills.i gathered stuff from the web :)): (defun z/dired-media-filebot (file) (interactive (list (expand-file-name (dired-file-name-at-...
2
votes
1answer
452 views

Dired search and replace is throwing no results

I am trying to quickly search and replace in multiple files using dired. The steps I follow are from this question (Chris Conway's and Frank Henard's answers), I am pretty sure the instructions are ...
4
votes
1answer
65 views

How to run `find-dired` and toggle all files?

This is what I have so far: (defun find-and-toggle () (interactive) (find-dired "~/my-project" "-name *.py") (dired-toggle-marks)) This switches to the find-dired buffer, but dired-toggle-...
1
vote
1answer
156 views

How to know when dired is done if called async?

If I am copying files using dired having previously called (dired-async-mode) to make it copy asynchronously, how do I know when it has successfully finished copying the files?
4
votes
1answer
200 views

Dired up to parent directory on symlink

I have a symlink ~/link -> ~/a/really/long/path When I press ^ in the buffer, it takes me to ~ but I want to go to ~/a/really/long Is there a right way to do this? Another question is, if I'...
1
vote
2answers
443 views

On orgmode link- dired like open with or open in dired current link?

I sometimes need to open links in org (mainly for image link) in an external editor (let's say gimp). Is there any way to do that? That is, instead of the default open link, add a open with option or ...
3
votes
0answers
59 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
77 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 ...
2
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
442 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 ...
2
votes
1answer
652 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
147 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
387 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?
6
votes
2answers
2k 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
311 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 ...
2
votes
1answer
142 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
527 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
194 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 ...
3
votes
2answers
205 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 ...
6
votes
1answer
670 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
345 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
339 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
76 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
283 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
37 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
48 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
707 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
156 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
36 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?