Skip to main content

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

Change escape characters of substitutions in dired-do-shell-command

I've recently found nushell and made it my default shell, and in many ways it's great, but the syntax does differ a bit from bash, and that causes substitutions to be wrong when I use dired-do-shell-...
Alexander Praehauser's user avatar
0 votes
0 answers
13 views

projectile not showing files under a .git directory

I had a directory structure like this: .projectile lots of folders onefolder/nested/.git onefolder/bunch of other stuff when locked into the top-level project, none of the files under the .git ...
user129393192's user avatar
0 votes
0 answers
51 views

Add a shell command to dired mode

I want to add a command to dired-mode, which executes a shell command on the highlighted file. For example, from Bash, I can run qvm-copy {FILENAME}. I would like to replicate this behavior, but from ...
ch-pub's user avatar
  • 220
0 votes
1 answer
27 views

How can I jump to a file in dired after M-x locate?

If I M-x locate a file, then want to open it in dired, there's no function to jump directly to the file. I can only hit V, which opens the directory, but it does not highlight the file.
Jason Hunter's user avatar
1 vote
1 answer
35 views

Can `dired-do-compress` unzip to a different directory by default?

If I try to unzip a file, it will put the unzipped file in the same directory as the zip file. Is there any way to make it uncompress to a particular directory all the time?
Jason Hunter's user avatar
0 votes
1 answer
81 views

"Aliasing" `ls` to `gls`

gls not ls: My system has two forms of ls, the standard "old school" version of ls, and GNU ls which is available as gls. In my shell, I simply created an alias to use gls, but I have not ...
Anoduck's user avatar
0 votes
0 answers
51 views

Opening any 2mb jpg image in dired freezes emacs

Viewing any .jpg image > 1MB makes emacs unresponsive for over a minute. <200KB .jpg work instantly. Any ideas where to start investigating? Hitting RET on this 2.8MB.jpg. Profiler (cpu+mem) ...
jjk's user avatar
  • 744
0 votes
0 answers
14 views

Setting `scroll-conservatively` to 101 causes `dired` buffer can not be recentered when revert

When I set scroll-conservatively to 101 as recommended from many scrolling packages. But I find that in a dired buffer containing many files, revert-buffer (g) will not recenter the point to center ...
Saddle Point's user avatar
0 votes
1 answer
52 views

How can I directly org-attach from M-x locate results?

What I'm trying to do is use org-attach-dired-to-subtree when I find something I'm looking for with M-x locate. That doesn't work, cause M-x locate results is not a dired buffer.
Jason Hunter's user avatar
0 votes
0 answers
41 views

dired-do-rename and last path in minibuffer

When attempting to move a file in Dired using dired-do-rename, the prompt in the minibuffer currently defaults to the directory from which the files are being moved. It would be beneficial if Dired ...
Edman's user avatar
  • 1,229
1 vote
1 answer
349 views

How do I customize the icons used in nerd-icons package

I'm new to emacs and installed the nerd-icons.el package along with the package nerd-icons dired. The problem is I don't like the icons set as default. Even though i've read the nerd-icons GitHub page,...
RedRocket's user avatar
0 votes
1 answer
124 views

How do I hide dotfiles only in the home directory in dired buffers?

I would like to hide dotfiles only in the home directory in dired buffers, but I do not know how to achieve this. I have been trying with the following: (use-package dired :ensure nil :commands (...
najjt's user avatar
  • 33
2 votes
2 answers
84 views

Nordic characters rendered incorrectly in non-file buffers

I am having trouble with nordic characters (å, ä and ö) not rendering correctly in Emacs. In text files, they render correctly, but in dired and other non-file buffers (like counsel-find-file) they ...
najjt's user avatar
  • 33
0 votes
1 answer
43 views

Can I add options to dired-rsync?

I recently installed dired-rsync which is exciting, but I immediately could not figure out how to add options when using it, like -a or -u, etc. Is it possible to use such options and if so, how?
kηives's user avatar
  • 103
0 votes
1 answer
74 views

Faster way to go from directory bookmark to file heading?

I currently have a dired bookmark set to a directory. So in order to access a particular heading, the sequence is as follows: Bookmarks keybind, type initial letters of directory bookmark. (Dired ...
shintuku's user avatar
  • 121
0 votes
1 answer
53 views

diff two files in two windows

After creating a split window and using dired in each, how do I run diff to compare two files? I have looked but haven't found any clear explanation.
balanga's user avatar
  • 135
0 votes
1 answer
47 views

Emacs macro variables

Does Emacs have 'macro variables'? Midnight Commander allows the use of macro substitution expressions like %f %D %t which can be use when running commands. eg %f is the name of the current file in a ...
balanga's user avatar
  • 135
1 vote
1 answer
137 views

Dired shell command with parameters

I want to provide additional command line options to a command in dired marked with '!', eg how do I add '-V' to something like 'less'?
balanga's user avatar
  • 135
1 vote
0 answers
105 views

How to enable preview in dired-preview

Having watched https://www.youtube.com/watch?v=_2NAbPp_0zY I came across the option of Previewing a directory in dired mode and would like to implement this feature but can't work out how to do it. I ...
balanga's user avatar
  • 135
0 votes
0 answers
23 views

How can emacs preview java jmod file like jar file from dired?

They are both zip file actually. I can preview jar file directly from dired, but not for jmod files. I tried adding jmod to dired-compress-file-suffixes, not working. (add-to-list 'dired-compress-...
Wenpin CHOU's user avatar
1 vote
1 answer
118 views

How to save a register with a dired buffer?

I'm new to Emacs. I saw that you could have registers with special files. I really like that feature, and I was wondering if I could get the same functionality with a Dired buffer. For example, the ...
Peter Petigru's user avatar
3 votes
1 answer
181 views

dired - view file in other window?

Is there some way to have two windows open with a dired buffer in one and a file view of current file in the other? v loads the file into the dired buffer. o loads the file into the other window but ...
balanga's user avatar
  • 135
0 votes
0 answers
431 views

Doom Emacs : Creating project using dired not working

I'm a new to emacs. So I just try to learn by using it. And What I'm trying to do is just making simple project. I make a directory in dired using + command. And inside that directory I create ....
codeDog's user avatar
1 vote
1 answer
75 views

How to ignore some directories with find-grep-dired?

When I search with find-grep-dired it also searches /Library/ directory and finds hundreds of cached links. Is there a way to ignore /Library/ directory? I found this : M-x customize-option <return&...
zeynel's user avatar
  • 371
1 vote
1 answer
52 views

Getting dired to open an xterm instance without waiting

I like to use dired-do-shell-command to open audio and video files in an independent terminal using the default command gnome-terminal -- mplayer * and this works great. But now I've changed my ...
Alexander Praehauser's user avatar
0 votes
1 answer
71 views

How to bind dired-up-directory to key

I'm tryng to bind F6 to dired-up-directory using (global-set-key (kbd "<f6>") but when I use this in dired-mode, I get <f6> is undefined. What have I done wrong?
balanga's user avatar
  • 135
0 votes
0 answers
347 views

error in process sentinel: Wrong type argument: integer-or-marker-p, nil

I get this error when I search dired with M-x find-name-dired: error in process sentinel: Wrong type argument: integer-or-marker-p, nil The search finds the files then ends with this error. I'm not ...
zeynel's user avatar
  • 371
0 votes
0 answers
37 views

Is there a way to customize dired so that it exclusively shows the file size, as well as the month and day of creation, for each item in the listing?

I've added an image to provide visual clarity. The portion highlighted in red is the area I intend to keep. I'm aware that there's a method to completely remove all detailed information and display ...
Zoli's user avatar
  • 441
1 vote
1 answer
49 views

Strange issue with dired-subtree

This is my simple config: (use-package dired-subtree :ensure t :bind (:map dired-mode-map ("<tab>" . dired-subtree-toggle))) The first time the ...
user129393192's user avatar
0 votes
1 answer
51 views

In elisp, how can I convert a string to an escaped string?

In DirEd, when I copy a filename, using C-u 0 w , it's copied fine, but I can't use this string in a shell command, cause it's not escaped. Is there a function to convert a string to an escaped ...
Jason Hunter's user avatar
0 votes
1 answer
100 views

Why is 'eval-after-load' required here?

(eval-after-load "dired" '(progn (define-key dired-mode-map "c" 'dired-create-empty-file) (define-key dired-mode-map "r" 'dired-do-compress-to))) Why is the ...
user129393192's user avatar
0 votes
0 answers
103 views

"touch file" in dired mode

I found this answer: (eval-after-load 'dired '(progn (define-key dired-mode-map (kbd "c") 'my-dired-create-file) (defun create-new-file (file-list) (defun exsitp-untitled-...
user129393192's user avatar
0 votes
0 answers
36 views

Emacs not automatically adding / when finding paths in Dired

When I move or copy a file in Emacs dired I am prompted to choose a directory. If it is a directory I have just created, dired will guess it when I invoke dired-do-rename and then hit tab. I have ...
Edman's user avatar
  • 1,229
0 votes
0 answers
16 views

How to get `C-h m` to show its output in the same window?

When I type C-h m in dired mode, it opens in a different window. I'd like it to open in the same. How can I do this? In the future, is there an internal reference for questions like this that is quick ...
cspurposesonly's user avatar
0 votes
1 answer
85 views

dired, zip as a directory

With archivemount, one can mount a zip file. Is there any way to treat a zip file just like a directory in dired? The we wouldn't have to unzip the archive, which takes time and you probably need to ...
Jason Hunter's user avatar
1 vote
1 answer
87 views

How to overwrite protected files in dired

I was trying to copy my some of my config folders to another system which was mounted with root privileges using dired. I opened both surrounding folders using /sudo::/... and tried to copy my files ...
Alexander Praehauser's user avatar
0 votes
0 answers
107 views

In Doomemacs how to get "SPC q l" to automatically run the moment doom loads after I run "emacs .&" from command line

On my linux box when I run emacs .& from the command line, inside a folder it opens up and displays that folders contents via Dired. I need to either: display the Doom landing screen instead of ...
thefonso's user avatar
  • 101
3 votes
2 answers
240 views

Check if there are marked files in dired buffer

How can I check, with a function, if there are marked files in a dired buffer? Edit. The issue with dired-get-marked-files is that if the user moves the cursor on a "current file name" the ...
Gabriele's user avatar
  • 1,662
1 vote
2 answers
165 views

How to set up a custom effortless navigation in dired?

I would like to configure dired so its navigation would behave as classic file managers do. I.e. binding M-<left> to go backward in navigation history, while staying within the current dired ...
crocefisso's user avatar
  • 1,363
1 vote
3 answers
49 views

emacs -nw: how can I turn off the reverse video for directories in dired?

How can I turn off the reverse video for directories in dired? As you see emacs -Q -nw --color=never . has still too much color: The only thing I want to have with white background is my cursor. ...
Dan Jacobson's user avatar
0 votes
1 answer
18 views

Dired+: diredp-dired-recent-dirs not working correctly

Linux Mint 21 Emacs 27.1 package Dired+, Version: 2023.01.14 1. M-x diredp-dired-recent-dirs 2. Dired (buffer name): my-buffer Here result: As you can see the count of recent folders = 10. OK. Now I ...
a_subscriber's user avatar
  • 4,174
2 votes
1 answer
43 views

Dired+ : Not change foreground color of compress files

Emacs 27.1 package Dired+, Version: 2023.01.14 Here screen As you can see the foreground of suffix compress file is correct (orange). Nice. But the foreground of name compress file is not change (...
a_subscriber's user avatar
  • 4,174
1 vote
1 answer
97 views

Dired format on Linux and Windows (dired-listing-switches)

I'm using the following on Linux: (setq dired-listing-switches "-agho --group-directories-first") and the files show like this: -rw-r--r--. 1 2.1K Mar 16 03:19 test.org -rw-r--r--. 1 ...
Zoli's user avatar
  • 441
1 vote
1 answer
45 views

Why doesn't my dired+ configuration of default applications through dired-guess-shell-alist-user work?

I'd like to configure dired+ to use default applications and read that I should put these configurations into the dired-guess-shell-alist-user variable. I've tried a few variations but, even though I'...
Alexander Praehauser's user avatar
0 votes
1 answer
37 views

How does one configure the function called on an orgmode link such as file:~/Dropbox/ToProcess?

I am using Org mode version 9.3 under GNU Emacs 27.1 (under Linux Debian). Typing enter on links such as file:~/Dropbox/ToProcess/ used to open the directory in dired-mode: I have a bunch of text ...
J..y B..y's user avatar
  • 158
1 vote
1 answer
144 views

In Dired, How to disable (or unmap) SPC from executing dired-next-line?

What I want: While in dired, want to disable/unbind <SPC> from dired-next-line Reason: I use j or <C-n> to dired-next-line in dired, I never use <SPC> as to go next line. I use &...
Garid's user avatar
  • 686
0 votes
2 answers
53 views

Is there a way to get a toggle-able dired window?

I'd like to have Dired pop up, either as a side window (like Treemacs) or just to switch to its buffer (in the main window) with a keystroke. I've already changed its behavior to reuse the same buffer ...
user39849's user avatar
1 vote
1 answer
315 views

How to change icon associated with a file-extension in Dired and all-the-icons?

I use dired with (all-the-icons-dired which uses all-the-icons). Current State: .m file presented with apple logo. Goal: Change (override) icon of .m file to same as icon of .matlab file extension. ...
Garid's user avatar
  • 686
1 vote
1 answer
51 views

How to programmatically find buffer visiting specific directory

I'm looking for something similar to (find-buffer-visiting FILENAME &optional PREDICATE) that would find a dired-mode buffer visiting a specified directory. Something like: (find-buffer-visiting-...
PRouleau's user avatar
  • 831
0 votes
1 answer
35 views

Compare recursive flattened/"branch view" list of files between two directories in emacs/linux

I have two folders, "old" and "new". The "new" folder includes files from "old" that have been copied into subfolders by a program. [-] Test |--[-] New | |--...
student's user avatar
  • 33

1
2 3 4 5
11