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
0
votes
0answers
7 views

Error in dired-find-file-place when saving

I've been an Emacs user for 30 years. This week I'm switching to a new machine with Ubuntu 21.10 installed. Now when I save a file, it always errors out with the error message: "Error in dired-...
3
votes
1answer
40 views

How to not hide Dired details initially, with Dired+?

I have GNU Emacs 27.2 (of 2021-11-18; on macOS 12.1) and updated dired+.el from dired+ just now (to fix a bug, so I can't go back to the old version of dired+.el I had). Before the update, dired-mode ...
2
votes
1answer
49 views

Save excursion not working for dired-find-file-other-window

I wrote this function to basically bring my cursor back to the dired buffer, after opening the file in another window. This is so that I can scroll down the buffer, pressing o to keep previewing the ...
2
votes
1answer
40 views

Deleting a file to ~/.Trash produces "File already exists..." if a file of that name is there [duplicate]

I have (setq trash-directory "~/.Trash") and (setq delete-by-moving-to-trash t) in .emacs to be able to have files moved to ~/.Trash via d and then x in dired-mode. (This is in macOS.) But ...
0
votes
1answer
22 views

Problems saving files and creating directory

I have recently set-up a new Emacs on my OSx 10.15. Every time I try to create a directory in Dired with + I got a warning telling the files already exist. Another strange result I got when I try to ...
-1
votes
2answers
25 views

Not correct reverse sort in dired mode

Linux Mint 20.2 Emacs 27.2 Installed packages: dired+ dired-hacks-utils-20201005.2318 dired-k-20200322.2035 dired-narrow-20181114.1723 dired-quick-sort-20201221.403 dired-recent-20211004.1924 dired-...
0
votes
0answers
14 views

dired: read/write access to local folder contents (root/wheel), similar to "sudo -s" [duplicate]

The local folder /private/var/root (owner: root / group: wheel) on OSX (El Capitan) contains certain data that I would like to have "read/write" access; e.g., /private/var/root/Library/...
1
vote
2answers
31 views

Exotic dired-based window-splitting mode

NOTE: I added more info to this query. Initially, I didn't mention dired, but after experimenting, I see that it needs to be explicitly discussed here, because of how it manages buffers. I'm using ...
2
votes
1answer
38 views

How to create independent Dired buffers for the same directory?

I'm trying to programmatically define the windows in my frame. I have 4 windows, two with dired buffers in them so that I can select the file I want to visit. (delete-other-windows) (split-window-...
0
votes
0answers
33 views

Dired: open file in another frame, but reuse an already existing one

I use a two-screen setup, and I like to have a frame with dired on one screen and another frame on the second screen. When I want to work on a specific file, I usually copy the file path from dired ...
0
votes
2answers
48 views

How to debug error in process sentinel?

I've recently switched to doom emacs, and for the most part it's working great. However, when I'm looking at a folder in dired-mode, if I copy a file using C the file is copied but *Messages* contains ...
0
votes
0answers
18 views

gzip: stdin: unexpected end of file

Linux Mint 20.1 Emacs 27.1 I connect to remote Linux host by tramp mode. Success connect. Nice. But when in dired mode I try to open log file (press Enter) I get the next message: gzip: stdin: ...
1
vote
1answer
43 views

dired-do-delete fails to delete file

In Dired, with point on a file name, I invoke dired-do-delete and confirm. The line disappears, as it normally does when a file is deleted. But the file is not in fact deleted, as I can see by e.g. ...
0
votes
2answers
17 views

Unable to remap mouse under dired in macos emacs

I'm not sure whether this should be considered an appropriate post for emacs.stackexchange, or whether this should go to some sort of macos forum. Please let me know if I need to ask the following ...
0
votes
1answer
43 views

How do you target the present directory, once in a while, with do-what-I-mean enabled?

After setting Dired do-what-I-mean (setq dired-dwim-target t) which, quoting the man pages If non-nil, Dired tries to guess a default target directory. This means: if there is a Dired buffer ...
0
votes
1answer
24 views

How can I prevent ` running timer: (void-function vc-git-root)` error

vc-git-root walks up the tree until it finds the directory that contains the .git subdir and declares that to be the root of the repo. But if there is not .git folder in the root directory, (vc-git-...
0
votes
0answers
46 views

`void-variable: Symbol’s value as variable is void: v` when deleting remote directory in dired

This recently started happening. Whenever I try to recursively delete any remote directory from dired (i.e. D over the dired entry), I get this after Emacs asks me for confirmation: void-variable: ...
0
votes
1answer
58 views

Search and Replace for a block on many lines in a dozen files

I have a a bunch of HTML files and in each of them I want to replace a fixed block of approx 30 lines with a one liner. Is there an Emacs command or package which makes this easier? Using e.g. dired-...
0
votes
3answers
98 views

How can I recursively find and replace in the current git repository

I am working inside a git-repo. Here I want to apply my search operation based on the root directory of the git repo that current buffer is open. Here I do: find-dired "~/my_project" ... in ...
1
vote
4answers
34 views

How to programmatically mark files in dired based on file modification time?

I'd like to write a bit of elisp to mark all files in a dired buffer that are "old": the files were last modified more than 10 days ago, say. What would be a good way to do that? It seems ...
0
votes
0answers
29 views

dired+: Not correct show marked files/dirs in doom-modeline

Linux Mint 20.2 Emacs 27.2 Install packages: dired, dired+, doom-modeline. If I use doom-modeline and when I mark files/dirs in mode line not correct show marked files. But if I'm not use dired+ - ...
1
vote
0answers
15 views

dired-icon not show icons in dired-subtree

Linux Mint 20 Emacs 27.1 package: dired, dired+, dired-icon dired-icon In folder Temp has: Folder: MyFolder Files: someFile.txt someFile2.txt In folder MyFolder has: Folders: mySubFolder_1 ...
1
vote
1answer
28 views

How not select dot and double dots in dired mode

Linux Mint 20 Emacs 27 package dired, dired+ In folder Downloads I has: one folder and two files. I want to delete all content of folder Downloads So as result on Dired mode I press t. Here result: ...
0
votes
1answer
15 views

How to show recent directories on separate lines in echo area?

Linux Mint 20, Emacs 27.2 Install package dired, dired+ I want to show recent directories visited in the minibuffer. Something like this: I tried this: (defun my-recent-dir () (interactive) ...
0
votes
1answer
28 views

How to see all recent directories?

Linux Mint 20 Emacs 27 package: dired, diredp (https://www.emacswiki.org/emacs/dired%2b.el) Jump to bookmark. Input Temp Press ENTER. As result open folder MyFolder Press ENTER. As result open ...
0
votes
1answer
25 views

dired-recent - not show correct recent visited directories

Linux Mint 20 Emacs 27 dired, dired-recent Steps: 1. "recentf-mode" is turn on 2. Go to directory "Download". Use "Jump to bookmark" (C-x r b). Input "Download"...
0
votes
0answers
12 views

dired--unhide: Buffer is read-only: #<buffer bufferName> when set bookmark in a dired buffer

When I use C-x r m in a Dired buffer to add this directory to my bookmark, it complains: dired--unhide: Buffer is read-only: # The enabled minor modes in this buffer include: Async-Bytecomp-Package ...
1
vote
2answers
334 views

Dired mode: Toggle show hidden files/folders by keyboard shortcut

I am using Emacs 27.1 (GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian) with "default" dired mode. There are no ...
3
votes
1answer
73 views

How can I set the ls program dired uses only for local directories

I have set the ls program dired uses via (setq insert-directory-program "gls")) (so that I can specify --group-directories-first in dired-listing-switches). Trouble is when I browse a ...
0
votes
1answer
40 views

Searching in Dired for content in files while filtering files

From Dired, I'd like to be able to search for content pretty much like I do on my MAC Finder, while showing the files that match the criteria/regular expression (and no other files). I don't want the ...
1
vote
1answer
95 views

How can I load Dired+ only if I actually use Dired?

I'm loading dired+ from a file ( as it has been removed from Melpa ), but it won't load when I try to make it conditional of opening a dired buffer. ;; ---- Dired + -------- ;; Loads Dired+ (use-...
0
votes
0answers
28 views

Plus symbols near some directory names in dired?

I've noticed in recent versions of emacs that some directoies in a dired listing have + "plus" symbols near them (see image). Would someone be so kind as to explain the meaning? I have not ...
0
votes
1answer
48 views

Git track flag in Dired

How can I show an additional column in Dired, where I can see if the file is tracked or not by git in the current branch?
1
vote
1answer
30 views

Can't unbind mouse button from keymap

This is more of an academic question than a practical one, as I've already worked around it. However, the curiosity / mystery is killing me. I'm about 10 days into emacs, so new to a lot of this. As I'...
1
vote
2answers
84 views

Dired: How to open file with ace-window while keeping focus on dired buffer?

I have this Elisp code that allows me to use ace-window to open a file in a selected window from Dired: (defun find-file-dired-ace-window () "Use ace window to select a window for opening a ...
2
votes
2answers
67 views

Open recent directories like Ido opens files

When I want to open a recent file, I use ido-find-find (C-x C-f) or ido-switch-buffer (C-x b) and type a few characters and Ido automatically finds the right file among the recent files I have visited....
3
votes
3answers
174 views

Copy a file content to clipboard with dired

I would like to emulate the fonctionnality of xclip in dired. That is, copying file content to clipboard (but without opening it in Emacs). Sadly, using dired-do-async-shell-command and xclip does not ...
0
votes
1answer
72 views

Pseudo-terminal will not be allocated because stdin is not a terminal. ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory

CentOS 7, Emacs 27.1 Here content of file myFile.sh: ssh myuser@10.111.11.111 So when in vterm mode I use this: ./myFile.sh then I success connect to the remote machine (ip = 10.111.11.111) by ...
0
votes
0answers
75 views

Not work C-t (tab-new) in the dired mode

Linux Mint 20, Emacs 27.2 Here my keybinding ;; You can run the command ‘tab-new’ with C-x t 2 (global-set-key (kbd "C-t") 'tab-new) (global-set-key (kbd "C-<tab>") 'tab-next)...
0
votes
2answers
61 views

How to remove gray color in Dired mode?

Linux Mint , Emacs 27.2 Dired, Dired+, Dired-k As a result here is the dired mode view As you can see, the names of files: to.do.org to.do.org_archive_2017 to.do.org_archive_2019 are gray. Can I ...
2
votes
1answer
76 views

How do I get all marked files from all Dired buffers?

I'm trying to write a function that opens all marked files externally in their default programs. I've tried using (dired-get-marked-files) to get the filepaths, but that only returns the marked files ...
1
vote
3answers
76 views

Append some text to multiple files in a directory

I want to append some text to multiple files in a directory. So, I opened the directory in dired buffer and selected the files. After this, is there any shortcut/ command to append some text to these ...
0
votes
1answer
100 views

Doom emacs dired +ranger not obeying evil-mode

I am using doom emacs and in my init file I have (dired +ranger) The problem is when I open dired, I cannot press tab to select for example. I have first to toggle off evil-mode. If I do, I lose all ...
1
vote
1answer
56 views

Omit files in a certain directory

I'm trying to omit html files from a certain directory when using dired. For all directories I could do it like so; (setq dired-omit-files "\\.html$") I only want to hide html files from my ...
1
vote
1answer
16 views

Emacs: DiredSort : can't sort by size

Linux Mint 20.1 Emacs 26.1 Install dired+ package. Also install DiredSort from here https://www.emacswiki.org/emacs/DiredSort I try to sort by size. dired-sort-size But I get error on empty screen: ...
1
vote
0answers
45 views

dired-quick-sort - sort by name not working

Linux Mint 20.1 Emacs 26.3 In folder temp I have some files. Here is what it looks like (sort by name) in file manager Nemo Sort by name: how.build.txt is first. Nice. Now same folder in dired mode ...
0
votes
0answers
33 views

How to use Dired in multiple directories when open a project?

I'm using spacemacs on macOS. When I open a project with Dired, the first time it can list a target directory. But if I change the dired directory by using C-x d again, whenever I switch to an another ...
0
votes
1answer
124 views

Why in sizes of files not show in human-readable format?

Linux Mint 20 Emacs 26.3 I install packaged dired-k And set this param in my init.el '(dired-k-human-readable t) But it not work in dired mode. Here example As you can see size of files not show ...
1
vote
1answer
32 views

Tramp with Dired produces unwanted //DIRED// line

Connected via Tramp to an old remote system, when I list a directory using Dired, I get: /plink:user@example.com:/tmp: total used in directory 549 available 114.7 MiB drwxrwxrwt 3 root ...
3
votes
3answers
87 views

Dired+ doesn’t work on old remote system

When connected to an old remote system with Tramp 2.4.3.27.1, the buffer shows no files. With tramp-verbose set to 6, I looked at the Tramp debug buffer, then found (anonymized): 13:27:21.657267 tramp-...

1
2 3 4 5
9