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.

3
votes
1answer
170 views

Dired+. Is it possible to change color of recent created/edit files/folders?

Windows 10, Emacs 25.1, Dired+ I use file manager Total Commander. And I set them to show different color (blue) for recent(e.g 1 hour) created/edited files/folder. It's very comfortably. Here ...
2
votes
1answer
55 views

How to revert a buffer using the “g” shortcut

I can refresh my dired buffer using M-x revert-buffer and I've seen multiple places that I can do this more easily using g but don't understand how that would be run. Does it mean M-x g or running g &...
0
votes
2answers
29 views

How to automatically enable a mode for only one specfic type of buffer?

I user dired to browse file, and I would like to use hl-line-mode which highlights the currents line, but I only want it to be enabled automatically when using dired
0
votes
0answers
28 views

Don't use completion text

When i am trying to rename a file in dired-mode, for just find a file with (C-x f), it uses auto-completion to help me out. Most of the time this is super useful. However when I am trying to rename a ...
0
votes
1answer
39 views

Dired buffer's cursor change of behavior in dired+

I have in the past been using (require 'dired) (require 'dired-x) quite happily. Recently I've been even happier after switching to (require 'dired) (require 'dired-x) (require 'dired+) (require '...
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 ...
2
votes
1answer
20 views

How to redisplay dired buffer after changing listing-switches

This sample code doesn't work: (defun toggle-hidden-in-dired () (interactive) (setq dired-listing-switches (if (equal dired-listing-switches "-l --group-directories-first") "-...
1
vote
1answer
38 views

How to hide all dired buffers in ibuffer?

I want to hide all Dired buffers as major mode in Ibuffer. But (add-to-list 'ibuffer-never-show-predicates "magit*") ibuffer-never-show-predicates accepts a regexp and a function. How can I hide ...
1
vote
1answer
22 views

Switch from Dired to Wdired rename file and directory errors when using “-F” or “--classify” ls switch regex help

If you set -F or --classify in the dired-actual-switches then it places a / at the end of directory names and * at the end of executables. When you finish renaming the files, these characters are ...
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 ...
2
votes
2answers
147 views

Find files like in Nautilus' search

I occasionally find myself using Nautilus instead of dired to search for files and would like to change that. When looking for a file, I often don't know the capitalization of its name which is why I ...
1
vote
1answer
31 views

Package to help display status of each git repo contained in a common directory

I have a directory and in the directory is a rather long list of git repositories. Is there a package or options where a dired listing of the directory would also add in the status of each git repo ...
6
votes
3answers
1k views

Open file from dired in the same window — using the mouse

How do you configure emacs to open a file in the current window -- using the mouse -- when it is selected from a dired buffer? That is, when I open a directory and then select a file with the mouse ...
5
votes
1answer
270 views

Dired+. Mouse click - open folder in the same window

Windows 10, Emacs 25.1, Dired+ When I open folder by press "Enter" it's open in the same window: OK. But when I try to open folder by click mouse -> it's open in anoter window. But I need to open ...
1
vote
1answer
21 views

Is there a way to make dired buffers created by lists behave more like traditional dired?

For example, when doing: (dired '("custom-buffer" "~/.emacs.d" "/Volumes" "~/.bash_profile")) I cannot sort, and when changing a name of a file it will not reappear in the buffer. An additional ...
4
votes
1answer
48 views

Mark files whose name starts by a given prefix

I'm using Dired+. In folder1 I have 200 files. 30 files start with 15_02_xxx, 46 files start with 16_02_xxx and the rest have other names. I want to copy from folder folder1 to folder2 only files ...
0
votes
0answers
29 views

Dired-sidebar displays icons twice

I installed dired-sidebar but for some reason, icons are displayed twice, it goes back to normal when I refresh it though with g . Code in init file: (use-package dired-sidebar :bind (("s-t" ...
2
votes
1answer
38 views

Custom comment in dired

I create around 50 folders in a day. I use dired. I need to add custom comments such as New (N), old (o) and Review (R) to analyse my days work. Is adding the comments in dired possible?
1
vote
2answers
22 views

advice-add FOR function dired-do-copy

I got a problem for an advice-add inside Dired's copy function (dired-do-copy). My object is it to filter all marked files/directories in Dired, which should be copied to an other location within ...
13
votes
3answers
2k views

Dired+ missing from MELPA

I am trying to install dired+ from MELPA but it seems that it no longer is listed. I also checked here: https://melpa.org/ Is this normal?
2
votes
2answers
50 views

Rename file from space to underscore in dired just the filename. Xah function for this also renames all parent directories

I found this function by xah to do this but it also looks at the parent directories. Ideally, this would just look at the filename not including the parent name or parent directories. Something along ...
0
votes
1answer
41 views

Dired: How exclude dot from sort

Emacs 26.1, Windows 10. Dired+ Here some folder: I want to reverse sort. So I press s And here result: I don't want to sort symbols: dot and 2 dots. I want to sort ONLY file names. Is it ...
1
vote
0answers
47 views

org-attach from a Dired buffer

I want to be able to attach files to a sub-tree from a Dired buffer. The org-mode manual gives instructions on how to do this in the link below: https://orgmode.org/manual/Attachments.html At the ...
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 ...
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 ...
1
vote
1answer
63 views

How run bat, exe files?

Windows 10 (64 bit), Emacs 26.1 Here my init.el (require 'openwith) ;; Settings for package "openwith" (when (require 'openwith nil 'noerror) (setq openwith-associations (list (list (...
0
votes
1answer
28 views

helm-mode-dired folder name completion selection without buffer opening

I use dired with helm a lot. Let's say I want to go to /foo/bar/baz folder. I press C-x d to start minibuffer prompt for directory. I type /f and I get 5 suggestions. When I C-n to the one that I need ...
2
votes
1answer
30 views

Viewing the number of words in org or text files in one of the details columns in Emacs Dired

Is there a way to display the number of words in org or text files in one of the details columns in Dired? This would save having to open each file individually and count the words by selecting the ...
1
vote
2answers
126 views

How can I use Regexp to rename files in Dired mode?

I've have some videos (.mp4) with subtitles files (.SRT) that I need to rename. These files have long names so I can only rename them manually. I've tried Python to rename them, but it fails. I've ...
1
vote
2answers
25 views

Unbind CUA <C-return> key only in dired mode

Goal: unbind <C-return> key ONLY in dired mode in order to rebind it to dired-w32explore. My configuration is using use-package with something like this: (use-package dired :init (unbind-...
6
votes
4answers
562 views

Quickly jump to favorite folders

What I actually want I have deep folder structures and use about a dozen folders pretty far down the directory tree a lot. In Nautilus, I use bookmarks to get to them quickly. I want the same thing ...
6
votes
3answers
1k views

How can I visualize VCS status in dired?

I'm particularly concerned with git, but I imagine this is a good place to use vc. I want to emulate Atom's git integration with its file explorer: How can I get something like this in dired? I ...
3
votes
1answer
138 views

Dired+. Autorefresh after copy files

Windows 10, Emacs 25.1, Dired+. I copy file from one folder to another. Here screens: After copy I get the next result: As you can see the bottom buffer is not refresh. So I need to go to bottom ...
4
votes
1answer
78 views

Overwriting files in an emacs dired buffer using move or copy

When copying or moving a file/files in a dired buffer sometimes the file already exists in the location one is moving or copying to. Emacs then prompts the user and asks whether to "overwrite" the ...
4
votes
1answer
203 views

Show git branch in dired modeline

I would like to see the git branch shown in the dired mode-line at least for the top directory of git projects. Anyone done this or know how to?
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 ...
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 ...
5
votes
1answer
486 views

Customize dired's display

This might seem like a duplicate of How to customize dired's display. However, I did not find a satisfactory answer there. Consider the following picture: It has many columns: permissions, user, ...
0
votes
0answers
52 views

How quick jump to desire folder in dired mode?

windows 10, Emacs 26.1 Suppose I open folder test in dired mode. Smt like this: Suppose in kill-ring I has full path to another folder.E.g. d:/dev/tests/wiremock/ Now I want quick jump to d:/dev/...
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
89 views

Emacs mark and copy/move to buffers or bookmarked directories

Is there a way to use bookmarks or the buffer list of open buffers to efficiently copy/move marked files/directories to another directory? As an example, imagine I want to copy the files foo.txt and ...
2
votes
2answers
458 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 ...
1
vote
1answer
63 views

Tool to work with archive?

Windows 10, Emacs 26.1 I need the archive tool that in dired mode that can: work with many archive: zip, 7z, gzip and so on create archive from selected files in dired mode and folders (with ...
1
vote
1answer
89 views

Dired: How to find all files under a directory that match a glob pattern (wildcards)?

Emacs 26.1, Windows 10 In my directory: d:/TEMP/test/ I has 2 text files. Also in subdirectories I has 2 text files. If I want to find all files in directory d:/TEMP/test/ I do: C-x d d:/TEMP/test/*...
0
votes
1answer
45 views

How open all folders only in one buffer in dired mode? [duplicate]

Windows 10, Emacs 26.1 When in dired mode when I press Enter over folder it's open in separate buffer. So after input in 10 folder the Emacs open 10 buffers. I know about press "a". But it not ...
0
votes
0answers
28 views

How quick search folder/file only by letters only?

Emacs 26.1, Window 10 If I want to find in dired mode some file/folder I : C-s Input file/folder name Here result: OK. It's work. But it slow. Is it possible to search file/folder only by input ...
1
vote
2answers
132 views

Disable ivy for find-file

Is it possible to disable ivy-mode for file prompts? In a past I used find-file to copy current file name or path to file. dired-do-rename also is broken by Ivy: no default completion for current ...
0
votes
1answer
67 views

Dired: File open using external viewers, based on filetype, and without prompting

When I hit RETURN on a filename in Dired, I'd like Emacs to automatically do one of several things, depending on the file's type: 1 - If it's a text file, I'd like to open the file in a new buffer in ...
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. ...
1
vote
2answers
81 views

dired-hide-details show size and date [duplicate]

I can't see that there is anyway in dired to hide permissions and ownership, but show size and date. As the only user on the system and using a version control system, my files generally belong to me ...