5 votes
Accepted

Check if there are marked files in dired buffer

One quick way is to just use this, since you apparently don't want to consider the file of the current line as marked if it's not: (dired-remember-marks (point-min) (point-max)) A more general answer ...
Drew's user avatar
  • 77.5k
4 votes
Accepted

How to save a register with a dired buffer?

It turns out you have to use the "file" command and simply specify a directory. It will open dired outomatically. As in: (set-register ?o (cons 'file "path/to/directory")) C-h v ...
Peter Petigru's user avatar
4 votes
Accepted

dired - view file in other window?

The default keybinding C-o bound to the command dired-display-file, which displays the file in another window without changing focus. [The list of all the major-mode keybindings is displayed on ...
Y. E.'s user avatar
  • 767
4 votes

Nordic characters rendered incorrectly in non-file buffers

The fact that you could paste the characters in to your question and have them show up exactly the same as in your screenshot shows us exactly what is going on. Unicode has two diaeresis characters. ...
db48x's user avatar
  • 18k
3 votes

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

Instead of bothering with using dired-omit-mode to hide dot files, just use the ls switches that give you that behavior (pretty much anything other than switch -a). And do that only in a particular ...
Drew's user avatar
  • 77.5k
2 votes
Accepted

How to overwrite protected files in dired

I can reproduce the problem with Emacs 28.3 / Tramp 2.5.4-pre. Running the very same recipe with Emacs 29.0.90 / Tramp 2.6.0.29.1 works as expected. Emacs 29.1 is in pretest. So I recommend for the ...
Michael Albinus's user avatar
2 votes

Check if there are marked files in dired buffer

dired-number-of-marked-files returns a string and is most useful interactively because of that. But its implementation uses dired-get-marked-files which returns a list of marked files - if there are ...
NickD's user avatar
  • 29.8k
2 votes

Getting dired to open an xterm instance without waiting

I finally found an answer here: one just has to add a & at the end of the command!
Alexander Praehauser's user avatar
2 votes

Nordic characters rendered incorrectly in non-file buffers

As @db48x says, the core problem is in the input method you use. Instead of creating precomposed Unicode characters, you keep producing the decomposed character pairs. This should not happen if your ...
Heikki's user avatar
  • 3,066
1 vote

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

No. But if you want to move it to a different directory, just use R after you dired-do-compress. This works whether you are (un)zipping one file or a thousand files (the marked files in the dir). Both ...
Drew's user avatar
  • 77.5k
1 vote
Accepted

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

C-h m in the *Locate* buffer says: V visits the directory of the file on the current line. This function runs ‘locate-mode-hook’ before returning. so you could (possibly - I have not tried it) even ...
NickD's user avatar
  • 29.8k
1 vote
Accepted

Dired shell command with parameters

In Dired, you can use dired-file-name-at-point to get the name of the executable at point as a string. Then you can prompt for additionnal arguments and build the command. Here is an example. (require ...
Tristan Riehs's user avatar
1 vote

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

If you use library find-dired+.el (see also Locate Files Anywhere), then you can exclude any number of paths, and you can limit the depth. find-grep-dired is an interactive compiled Lisp function in ...
Drew's user avatar
  • 77.5k
1 vote

How to bind dired-up-directory to key

You need to provide the command that you want to bind to that key, as the second argument to global-set-key: (global-set-key (kbd "<f6>") #'dired-up-directory). Your sexp isn't even ...
Drew's user avatar
  • 77.5k
1 vote

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

I can't use this string in a shell command C-hf shell-quote-argument is the function which performs shell-specific escaping. Any time you're building a shell command programmatically, you should ...
phils's user avatar
  • 51.1k
1 vote
Accepted

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

isn't the init file also loaded once? Yes, it is loaded once. Loaded when you launch Emacs. See <https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html>. Why is the ...
shynur's user avatar
  • 5,288
1 vote

dired, zip as a directory

This is built-in for some systems. Refer to: C-hig (tramp)Archive file names TRAMP offers also transparent access to files inside file archives. This is possible only on hosts which have installed ...
phils's user avatar
  • 51.1k
1 vote

How to set up a custom effortless navigation in dired?

See below, for correction after understanding that by previous/next you meant navigation history and not movement to previous/next line. (define-key dired-mode-map (kbd "M-<left>") #'...
Drew's user avatar
  • 77.5k

Only top scored, non community-wiki answers of a minimum length are eligible