workflow/usecase for dired-do-redisplay in emacs?

59 Views Asked by At

What is the use case of dired-do-redisplay? I am reading the Emacs Dired documentation and trying to understand the usecases/workflow. See Dired Documentation

1

There are 1 best solutions below

0
Drew On

The doc string (C-h f) makes clear what the command is for, I think:

,----
| `dired-do-redisplay` is an interactive autoloaded compiled Lisp function
| in `dired-aux.el`.
| 
| It is bound to l.
| 
| `(dired-do-redisplay &optional ARG TEST-FOR-SUBDIR)`
| 
| Redisplay all marked (or next `ARG`) files.
| If on a subdir line, redisplay that subdirectory.  In that case,
| a prefix arg lets you edit the `ls' switches used for the new listing.
| 
| Dired remembers switches specified with a prefix arg, so that reverting
| the buffer will not reset them.  However, using `dired-undo` to re-insert
| or delete subdirectories can bypass this machinery.  Hence, you sometimes
| may have to reset some subdirectory switches after a `dired-undo`.
| You can reset all subdirectory switches to the default using
| `M-x dired-reset-subdir-switches`.
| See Info node `(emacs)Subdir switches` for more details.
`----

Dired displays do not automatically update to reflect changes outside Emacs, for example (unless you set an option for automatic reverting). This command essentially reverts only the listings for certain files, or for a subdirectory listing. And for a subdir listing it lets you provide different ls switches, so you can relist with those specified switches.