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
1
vote
2answers
42 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 ...
0
votes
1answer
18 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) ))) ...
0
votes
1answer
25 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 ...
0
votes
1answer
17 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 ...
0
votes
1answer
14 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. ...
-1
votes
2answers
28 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 ...
2
votes
1answer
33 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
0answers
26 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
115 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
27 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
47 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 ...
0
votes
0answers
9 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
30 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
41 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.
2
votes
1answer
59 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 . ...
2
votes
1answer
28 views

How to use `recover-session` and `dired-omit-mode`?

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-locals.el containing ((...
4
votes
1answer
24 views

Default file extension for `dired-do-rename`

I am wondering how to make renaming files in dired to use the current file extension as the default. For example, imagine I run dired-do-rename on the file foo.bar and then type foo2 and press Enter....
1
vote
1answer
50 views

How to return focus to dired window after killing buffer opened from dired?

Sometimes I use dired to view or edit several files in one folder, one after the other. Dired is open in one window, and I open the files in another window by typing o in dired. When I finish with one ...
0
votes
0answers
42 views

Force opening file in new buffer

Is there a way in emacs to open a file (or a dired directory) in a new buffer, even if there's a buffer with the same file (or directory)? find-file and find-alternate-file always return the open ...
1
vote
1answer
39 views

Search files in folder

Windows 10, Emacs 26.1 dired+ I want in dired mode find files by names, content Approach#1 - use external tools. What tools you can suggest? Approach#2 - use only built-in Emacs function on ...
3
votes
2answers
59 views

Is it possible to show all files in all subfolders in one buffer?

Emacs 26.1, Windows 10, dired+ Suppose I has folder with 2 subfolders. In every folders has files. Is it possible , to show all files in one buffers. Smt like this: P.S. If I use "i" (dired-maybe-...
0
votes
1answer
56 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 ...
1
vote
1answer
118 views

How show hidden and system folder/files?

Emacs 26.1. , Dired+ Here content folder TraderMonitor in Total Commander: and here how look same folder (TraderMonitor) in Emacs, dired mode: How show hidden/system folders: .git .idea and file: ...
2
votes
1answer
74 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
30 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
41 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 ...
2
votes
1answer
27 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
47 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
42 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 ...
1
vote
1answer
26 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 ...
1
vote
1answer
22 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 ...
0
votes
0answers
59 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?
4
votes
1answer
50 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
1answer
43 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
61 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
51 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

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
32 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
26 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 ...
1
vote
2answers
30 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-...
4
votes
1answer
102 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 ...
0
votes
0answers
56 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/...
2
votes
1answer
108 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 ...
1
vote
1answer
92 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 ...
0
votes
1answer
48 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 ...
2
votes
1answer
140 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
0answers
29 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
194 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 ...
1
vote
2answers
115 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 ...