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
4
votes
2answers
70 views

Count the total no. of lines for a set of marked files in dired

I would like to be able to return the total no. of lines for a set of marked files in dired. i.e. if I marked 3 text files: file 1 contains 100 lines file 2 contains 50 lines file 3 contains 60 ...
0
votes
1answer
62 views

C-x C-q wants to quit Emacs

I want to use C-x C-q to make the Dired buffer editable, however, this key combination seems to be bound to quitting Emacs for some reason. I did not bind this key combination somewhere in my config. ...
1
vote
1answer
43 views

How to drill back up a folder in Dired?

In Dired, I'm able to drill down folders with the key i, but how can I unfold a folder that was once opened, that is, go to its parent folder?
0
votes
0answers
17 views

Can image-dired track renamed files?

I would like to view images using image-dired, then rename them. What I do at the moment: Open image-dired with my directory of choice. Mark an image that I want to rename. In the corresponding dired+...
1
vote
1answer
53 views

Why can't I list the contents of Desktop on macos using dired?

When I do C-x C-f on ~/Desktop/ in macos Catalina, I get the following error. Listing directory failed but 'access-file' worked I can list the directory for just ~. I'm new to Emacs and know little ...
1
vote
1answer
33 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 ...
2
votes
1answer
94 views

can I use .dir-locals.el to set a default mode for files, and still allow dired?

I have a directory that is all little shell code snippets for being sourced. Tried creating an auto-mode-alist, that does not seem to be effective, so tried creating a .dir-locals.el thusly: ((nil . ...
1
vote
0answers
27 views

Sorting org files in Emacs Dired on the basis of the org time stamp in the file itself

Is there a way of sorting org files (.org) in Emacs Dired on the basis of the org time stamp in the file itself. With every org file I create, I insert an org time stamp near the top of the file. This ...
4
votes
2answers
87 views

Is it possible to have multiple *Find* buffers in emacs?

If I execute a M-x find-name-dired command the output is a *Find* buffer containing the results. However if I perform a subsequent find-name-dired the contents of the *Find* buffer are overwritten ...
0
votes
0answers
24 views

Why dired buffer is gone after open file?

dired+ emacs 26.1 suppose I open folder d:/temp/test_this in dired mode and here list of buffers (C-x C-b) OK. As you can see the buffer test_this is in the buffer's list. Nice. Now I open file 3....
1
vote
1answer
18 views

Why dired+ not save sort mode?

windows 10, Emacs 26.1, Dired+ Suppose I has 3 files and sort it by name in dired mode. Smt like this: OK. Now I sort it by date, press s Here result: OK. Now I edit file 3.txt and after save ...
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 ...
1
vote
2answers
44 views

Why in dired+ mode some text is strikethrough?

Windows 10, Emacs 26.1, Dired+ (download from here https://www.emacswiki.org/emacs/download/dired%2b.el) Open some directory: Here result: Why some text is strikethrough?
1
vote
1answer
28 views

Can't mark specific folder in all subfolders in dired mode

Emacs 26.1 Windows 10, Dired Show content of folder "myproject". All files and subfolders. M-x dired-maybe-insert-subdir (C-u i) -R and here result Nice. Now I want to mark only folder build %m ^...
1
vote
0answers
52 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?
1
vote
1answer
11 views

Why in diredp-dired-recent-files show folder in title?

Emacs 26.1 Dired+ I'm in folder d:/temp/test and use command "diredp-dired-recent-files" here steps: And here result: As you can see the frame's title is correct: Recently visited files Nice. ...
0
votes
0answers
12 views

Using find-name-dired on ms-windows in spacmacs not linking to full filename when using C-c l for org-store-link

How to get link to file when using find-name-dired on MS-Windows? I am using MS-Windows and spacemacs. I am use org mode files to manage information. I also have a directories with many reference ...
0
votes
1answer
46 views

In Dired, how can I color the names of files younger than 1 hour?

windows 10, Emacs 26.1 , Dired+ I install dired+ from here https://www.emacswiki.org/emacs/DiredPlus Here example of some dir in the dired+ mode Is it possible to change color of file names that ...
1
vote
1answer
39 views

How to format shell commands run from Dired?

I want to execute a formatted shell command on a file from within Dired. I am aware that I can use dired-do-shell-command to run a shell command on a selected file file by entering ! <command> ...
0
votes
0answers
53 views

Using dired via tramp on a remote machine

Maybe I am missing something rather simple but I completely fail to use dired on a remote machine. I can connect via ssh directly without emacs and I can edited a file using Tramp on the remote ...
2
votes
1answer
47 views

How to use `recover-session` and `dired-omit-mode` in Emacs 26 and lower?

Using Emacs 26.1, I have enabled dired-omit-mode globally with (add-hook 'dired-mode-hook #'dired-omit-mode). When using recover-session, I don't see any files. How to fix this? Creating a .dir-...
1
vote
1answer
26 views

image-dired: Change thickness of cursor

On a hires screen I find it really hard to see on which image the cursor currently is, because the rectangle around the image is very thin. Is it possible to increase the line width of that rectangle? ...
1
vote
2answers
37 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 ...
0
votes
1answer
33 views

How delete folder named “build” in all subfolders?

Emacs 26.1, Dired+, Windows 10 Suppose I has the next dir tree: myproject myproject\app\ myproject\app\build myproject\app\src myproject\lib\build myproject\lib\src myproject\lib2\build myproject\...
0
votes
1answer
72 views

How to define a custom function that runs a command twice?

In dired mode, 'm trying to make a function that runs dired-next-line twice and then bind to SPC so that I navigate files faster in dired mode. I tried to add this in my dired.el file but it didn't ...
0
votes
1answer
38 views

dired-do-copy in tramp does not go to local when `\ C-j` is pressed. File path stays in the same directory

I am using dired-do-copy to copy a file from remote using tramp to local. When Copy file to path is promted. I used / C-j to go to local path but the path stays in the same directory , does not go to ...
1
vote
0answers
66 views

set `all-the-icons-dired` to use consistent directory icon?

I installed all-the-icons-dired package from melpa, however, it does not use consistent icons for directories. Some directories have their own special icon. Example, these are two directories: The ....
3
votes
1answer
169 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 ...
2
votes
1answer
34 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") "-...
0
votes
3answers
115 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 ...
2
votes
2answers
1k 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 ...
0
votes
1answer
31 views

How can I open dired with reversed sorting of name, and with the cursor on the first line?

I use the following initial code to open one om my frequently used folders: (global-set-key (kbd "C-6") (lambda() (interactive) (find-file (format "C:/Users/%s/notes" user-login-name) ))) ...
3
votes
1answer
225 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
49 views

How can I set color for listing executable files in Dired Mode?

Trying here to set color for executable files, as it is for ls command! How can I do that? I've already managed to set color for certains file extensions, using Diredful package, but couldn't do it ...
1
vote
1answer
74 views

Why so strange sort in dired mode?

windows 10, emacs 26.1, dired+ here myfolder in dired mode sort by name (by default): Now I want to sort by date (inverse mode). I press s and here result: why file new.txt is above two dots? The ...
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
57 views

How can I start dired in omit mode?

I use the following code for including dired omit mode: (require 'dired-x) (setq dired-omit-files "^\\...+$") (add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1))) ;(dired-omit-mode 1) When I ...
3
votes
1answer
74 views

Enable follow-mode in dired

Upon working on org agenda, it's super convenient to employ (org-agenda-follow-mode) The Org Manual: Agenda Commands It display the original contents on other window instantly while scrolling ...
0
votes
1answer
19 views

Compare files in dired mode: Cannot operate on ‘.’ or ‘..’

windows 10 (64 bit) Emacs 26.1, Dired+ I need tool that can compare files by content with highlight different symbols. Example: As you can see I mark two files. Is it possible to compare this ...
-1
votes
2answers
34 views

What tool can I use to compare files by content in dired mode? [closed]

windows 10 (64 bit) Emacs 26.1, Dired+ I need tool that can compare files by content with highlight different symbols. Example: As you can see I mark two files. Is it possible to compare this ...
0
votes
1answer
15 views

Remove the auto-generated marks from dired buffer

Upon invoking dired with C-x d, it display Five of the files have already been marked automatically , Consult with the manual of operation on files Strik U and * u to remove the mark but failed. ...
0
votes
0answers
31 views

How to have list of program on `dired-do-shell-command` with Emacs server started by systemd

I'm using Emacs as a server started by the systemd user unit. And on any dired buffer when i try to do dired-do-shell-command or dired-do-async-shell-command I cannot autocomplete any program and ...
2
votes
1answer
131 views

Chown with dired over Tramp, from Windows machine

I launch dired over Tramp (from Win machine to Linux server): C-x d /plink:user@server|su:root@server:/path-to-folder-controlled-by-root/ Then I type "O" to chown a folder, but I get chown not ...
0
votes
1answer
49 views

Show powerline git information in dired

Powerline shows git branch information for a buffer that are under version control vc-mode. Only when vc-mode is set for a buffer the Git branch information is displayed. When inside dired there is no ...
1
vote
0answers
56 views

Short key to run a binary in dired-mode

In dired-mode I can type ! to use the selected file as an argument for a command. For instance, if I type ! rm <RET> it will run the command rm filename. What I wanted is a short-key to run the ...
1
vote
1answer
141 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 ...
0
votes
0answers
19 views

Async Rsync Dired error on tramp file not found

I am trying to copy files from one directory on a remote computer to another directory on the same remote computer. Using Dired I can open up the two directories, mark the files I want to copy and ...
2
votes
1answer
37 views

Can flymake or flycheck mark in dired (or in buffer lists) files with errors?

It would be nice if, in addition to flymake/flycheck marking errors in particular files, they could somehow mark files with errors in dired (or maybe just in the open-buffers list). The goal would be ...
1
vote
0answers
43 views

opening org link in dired

[[D:/dev::line][code]] stores the link to my code directory. How can i used dired to open it in emacs. Currently with this code explorer opens the directory. I'm using Windows 7.
3
votes
2answers
459 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.