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
1 answer
52 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
  • 103
0 votes
1 answer
22 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
  • 115
0 votes
1 answer
24 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
  • 115
0 votes
1 answer
81 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
  • 115
0 votes
0 answers
31 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
  • 115
0 votes
0 answers
13 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
85 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
118 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
  • 115
0 votes
0 answers
72 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
32 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
  • 301
1 vote
1 answer
40 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
43 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
  • 115
0 votes
0 answers
202 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
  • 301
0 votes
0 answers
33 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
  • 421
0 votes
0 answers
20 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
28 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
62 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
53 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
33 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,177
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
0 answers
19 views

macos, terminal emacs overwrite ui emacs' buffer history (and probably other things)

I am a macos & spacemacs user and installed my emacs through https://emacsformacosx.com/. For UI based emacs I just click on the emacs icon. For terminal I run this command: alias emacs='$(/...
spacegoing's user avatar
0 votes
1 answer
61 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
79 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
78 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
210 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 Nicolardi's user avatar
1 vote
2 answers
102 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,220
1 vote
3 answers
32 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
0 answers
10 views

Dired+ - Only one buffer "Recently visited Directories"?

Linux Mint 21 Emacs 27.1 package Dired+, Version: 2023.01.14 I use the next commands MANY times: 1. M-x diredp-dired-recent-dirs 2. Dired (buffer name): press ENTER Here result: As you can see ...
a_subscriber's user avatar
  • 3,926
0 votes
1 answer
17 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
  • 3,926
2 votes
1 answer
37 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
  • 3,926
1 vote
1 answer
47 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
  • 421
1 vote
1 answer
30 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
29 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
82 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
  • 589
0 votes
2 answers
50 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
201 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
  • 589
1 vote
1 answer
38 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
  • 786
0 votes
1 answer
30 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
2 votes
1 answer
156 views

How to have Dired always list only the files that have extension `.org`, for a particular directory?

I use C-x d *.org to list only files with .org extension. Is there a way to make this permanent for that directory? I have to do this every time I open that directory, it would be nice to have it ...
zeynel's user avatar
  • 301
0 votes
0 answers
44 views

dired-do-find-regexp-and-replace function error in dired -> emacs is looking for 'project--files-in-directory' which doesn't exist

I have a problem with dired-do-find-regexp-and-replace in dired (by default mapped to 'Q'). I mark the applicable files as required, hit 'Q', enter my search and replacement strings and then get this ...
Amorpheuses's user avatar
4 votes
1 answer
69 views

Isearch + Dired fast navigation

After seeing this post and one of its comments, I am trying to implement the following convenient search pattern in dired: Press C-s to start isearch Type the substring I am looking for Possibly jump ...
unvarnished's user avatar
0 votes
1 answer
46 views

spacemacs/dired-aux rename file to similar name without ivy/counsel trying to rename to same file name

In spacemacs I find that two ways to get a new copy of a file with a slightly different filename both suffer from the same completion problem: C-x C-w (write-file) dired-aux's dired-do-rename (bound ...
Croad Langshan's user avatar
1 vote
1 answer
57 views

From the minibuffer, how can I get the file pointed to in dired?

I'd like to write elisp function with the following functionality: It can be invoked from the minibuffer, and it will then relate to the latest selected window buffer. If the selected buffer is in ...
Dov Grobgeld's user avatar
1 vote
1 answer
302 views

Key sequence for going up in the directory tree with Dired?

When Dired is open, It would be cool if I could press one key and go up in the directory tree, to the parent directory. I have this feature in vim with netrw and I'd like to recreate it. I'd like to ...
Vinn's user avatar
  • 283
0 votes
0 answers
21 views

Issue seeing files in dired directory or shell on remote machine

This used to work fine but seems to have broken today and I have not knowingly made any explicit changes to configuration. If I use a standard terminal (mac) and ssh into my server I can visit a path ...
user27815's user avatar
  • 239
1 vote
0 answers
71 views

How do I start emacs with two horizontal windows one of which is dired?

How do I write a function and call it in my init script so that when I open a file, I have two horizontal windows, the left one being dired mode and about 25% of the total emacs screen, while the ...
Aaron's user avatar
  • 111
0 votes
0 answers
29 views

Turn directory to file in dired

I often make the mistake of creating a directory instead of a file in Dired (by hitting +). I then have to delete it and recreate the file, with the same name. Sometimes, I tried to edit the d file ...
smonff's user avatar
  • 1,575
2 votes
1 answer
180 views

Failed to trash remote directories over tramp

With (setq delete-by-moving-to-trash t), deleting a non-empty directory in a remote dired buffer fails with message file-error: Couldn’t delete /ssh:server:/home/user/Downloads/some_directory. I tried ...
Saddle Point's user avatar
1 vote
1 answer
64 views

Using `ls' Switches Instead of Omit Mode

As per this page An alternative to using Omit mode: Use C-u s to change the ls switches and immediately refresh. (C-u s refreshes also, so there is very little typing involved.) You can remove -a ...
zeynel's user avatar
  • 301
1 vote
1 answer
121 views

How can I get the name of the file on the current Dired line?

I'm running emacs on WSL. The following function launches the binary file marked in dired: (defun wsl/execute () "execute file at point in dired" (interactive) (dired-do-shell-command ...
eatloaf's user avatar
  • 145

1
2 3 4 5
10