File: dired.el.html

This is a major mode for directory browsing and editing.

It is documented in the Emacs manual.

Rewritten in 1990/1991 to add tree features, file marking and sorting by Sebastian Kremer <sk@thp.uni-koeln.de>. Finished up by rms in 1992.

Defined variables (94)

dired-actual-switchesThe value of ‘dired-listing-switches’ used to make this buffer’s text.
dired-after-readin-hookHook run after each time a file or directory is read by Dired.
dired-always-read-filesystemNon-nil means revert buffers visiting files before searching them.
dired-auto-revert-bufferAutomatically revert Dired buffers on revisiting their directory.
dired-auto-toggle-b-switchWhether to automatically add or remove the ‘b’ switch.
dired-before-readin-hookThis hook is run before a Dired buffer is read in (created or reverted).
dired-buffersAlist of expanded directories and their associated Dired buffers.
dired-check-symlinksWhether symlinks are checked for validity.
dired-chmod-programName of chmod command (usually ‘chmod’).
dired-chown-programName of chown command (usually ‘chown’).
dired-clean-confirm-killing-deleted-buffersIf nil, don’t ask whether to kill buffers visiting deleted files.
dired-clean-up-buffers-tooNon-nil means offer to kill buffers visiting files and dirs deleted in Dired.
dired-click-to-select-mapKeymap placed on files under ‘dired-click-to-select’ mode.
dired-click-to-select-modeNon-nil if Dired-Click-To-Select mode is enabled.
dired-click-to-select-mode-hookHook run after entering or leaving ‘dired-click-to-select-mode’.
dired-copy-dereferenceIf non-nil, Dired dereferences symlinks when copying them.
dired-copy-preserve-timeIf non-nil, Dired preserves the last-modified time in a file copy.
dired-del-markerCharacter used to flag files for deletion.
dired-directoryThe directory name or wildcard spec that this Dired directory lists.
dired-directory-faceFace name used for subdirectories.
dired-dnd-protocol-alistThe functions to call when a drop in ‘dired-mode’ is made.
dired-dwim-targetIf non-nil, Dired tries to guess a default target directory.
dired-enable-globstar-in-shellAlist of (SHELL . COMMAND), where COMMAND enables globstar in SHELL.
dired-filename-display-lengthIf non-nil, restrict the display length of filenames.
dired-flagged-faceFace name used for files flagged for deletion.
dired-font-lock-keywordsAdditional expressions to highlight in Dired mode.
dired-free-spaceWhether and how to display the disk space usage info in Dired buffers.
dired-free-space-argsOptions to use when running ‘directory-free-space-program’.
dired-free-space-programProgram to get the amount of free space on a file system.
dired-garbage-files-regexpRegular expression to match "garbage" files for ‘dired-flag-garbage-files’.
dired-guess-shell-alist-userUser-defined alist of rules for suggested commands.
dired-guess-shell-case-fold-searchIf non-nil, ‘dired-guess-shell-alist-default’ and
dired-guess-shell-gnutarIf non-nil, name of GNU tar executable.
dired-guess-shell-gzip-quietNon-nil says pass -q to gzip overriding verbose GZIP environment.
dired-guess-shell-znew-switchesIf non-nil, then string of switches passed to ‘znew’, example: "-K".
dired-header-faceFace name used for directory headers.
dired-hide-details-hide-absolute-locationNon-nil means ‘dired-hide-details-mode’ hides directory absolute location.
dired-hide-details-hide-information-linesNon-nil means ‘dired-hide-details-mode’ hides all but header and file lines.
dired-hide-details-hide-symlink-targetsNon-nil means ‘dired-hide-details-mode’ hides symbolic link targets.
dired-hide-details-modeNon-nil if Dired-Hide-Details mode is enabled.
dired-hide-details-mode-hookHook run after entering or leaving ‘dired-hide-details-mode’.
dired-hide-details-preserved-columnsList of columns which are not hidden in ‘dired-hide-details-mode’.
dired-ignored-faceFace name used for files suffixed with ‘completion-ignored-extensions’.
dired-initial-position-hookHook used to position point in a new Dired listing display.
dired-jump-mapKeymap to repeat ‘dired-jump’. Used in ‘repeat-mode’.
dired-keep-marker-copyControls marking of copied files.
dired-keep-marker-hardlinkControls marking of newly made hard links.
dired-keep-marker-relsymlinkControls marking of newly made relative symbolic links.
dired-keep-marker-renameControls marking of renamed files.
dired-keep-marker-symlinkControls marking of newly made symbolic links.
dired-kill-when-opening-new-dired-bufferIf non-nil, kill the current buffer when selecting a new directory.
dired-listing-switchesSwitches passed to ‘ls’ for Dired. MUST contain the ‘l’ option.
dired-load-hookRun after loading Dired.
dired-ls-F-marks-symlinksInforms Dired about how ‘ls -lF’ marks symbolic links.
dired-ls-sorting-switchesString of ‘ls’ switches (single letters) except "t" that influence sorting.
dired-make-directory-clickableWhen non-nil, make the directory at the start of the Dired buffer clickable.
dired-mark-faceFace name used for Dired marks.
dired-mark-regionDefines what commands that mark files do with the active region.
dired-marked-faceFace name used for marked files.
dired-marker-charIn Dired, the current mark character.
dired-maybe-use-globstarIf non-nil, enable globstar if the shell supports it.
dired-mode-hookRun at the very end of ‘dired-mode’.
dired-mode-immediate-menuImmediate menu for Dired mode.
dired-mode-mapLocal keymap for Dired mode buffers.
dired-mode-mark-menuMark menu for Dired mode.
dired-mode-operate-menuOperate menu for Dired mode.
dired-mode-regexp-menuRegexp menu for Dired mode.
dired-mode-subdir-menuSubdir menu for Dired mode.
dired-mouse-drag-filesIf non-nil, allow the mouse to drag files from inside a Dired buffer.
dired-mouse-drag-files-mapKeymap applied to file names when ‘dired-mouse-drag-files’ is enabled.
dired-move-to-filename-regexpRegular expression to match up to the file name in a directory listing.
dired-movement-styleNon-nil means point skips empty lines when moving in Dired buffers.
dired-no-confirmDired commands for which Dired should not popup list of affected files, or t.
dired-perm-write-faceFace name used for permissions of group- and world-writable files.
dired-permission-flags-regexpRegular expression to match the permission flags in ‘ls -l’.
dired-re-inode-sizeRegexp for optional initial inode and file size as made by ‘ls -i -s’.
dired-re-no-dotRegexp matching any file name except "." and "..".
dired-recursive-copiesWhether Dired copies directories recursively.
dired-recursive-deletesWhether Dired deletes directories recursively.
dired-regexp-historyHistory list of regular expressions used in Dired commands.
dired-sort-by-date-regexpRegexp recognized by Dired to set ‘by date’ mode.
dired-sort-by-name-regexpRegexp recognized by Dired to set ‘by name’ mode.
dired-sort-inhibitNon-nil means the Dired sort command is disabled.
dired-subdir-alistAlist of listed directories and their buffer positions.
dired-subdir-alist-pre-RValue of ‘dired-subdir-alist’ before -R switch added.
dired-subdir-regexpRegexp matching a maybe hidden subdirectory line in ‘ls -lR’ output.
dired-subdir-switchesIf non-nil, switches passed to ‘ls’ for inserting subdirectories.
dired-switches-alistKeeps track of which switches to use for inserted subdirectories.
dired-switches-in-mode-lineHow to indicate ‘dired-actual-switches’ in mode-line.
dired-symlink-faceFace name used for symbolic links.
dired-touch-programName of touch command (usually ‘touch’).
dired-trivial-filenamesRegexp of files to skip when finding first file of a directory.
dired-use-ls-diredNon-nil means Dired should pass the "--dired" option to "ls".
dired-warning-faceFace name used for a part of a buffer that needs user attention.

Defined functions (165)

dired(DIRNAME &optional SWITCHES)
dired--align-all-files()
dired--display-filename-with-newline-warning(DIR)
dired--filename-with-newline-p()
dired--find-file(FIND-FILE-FUNCTION FILE)
dired--find-hidden-pos(START END)
dired--find-possibly-alternative-file(FILE)
dired--get-ellipsis-length()
dired--get-filename-display-length()
dired--hidden-p(&optional POS)
dired--hide(START END)
dired--insert-disk-space(BEG FILE)
dired--move-to-next-line(ARG JUMPFUN)
dired--need-align-p()
dired--remove-b-switch()
dired--set-auto-toggle-b-switch(SYMBOL VALUE)
dired--toggle-b-switch()
dired--trivial-next-dirline(ARG &optional OPOINT)
dired--trivial-next-line(ARG)
dired--unhide(START END)
dired-align-file(BEG END)
dired-alist-add-1(DIR NEW-MARKER)
dired-buffer-more-recently-used-p(BUFFER1 BUFFER2)
dired-buffer-stale-p(&optional NOCONFIRM)
dired-buffers-for-dir(DIR &optional FILE)
dired-buffers-for-dir-or-subdir(DIR)
dired-build-subdir-alist(&optional SWITCHES)
dired-change-marks(OLD NEW)
dired-check-switches(SWITCHES SHORT &optional LONG)
dired-clean-up-after-deletion(FN)
dired-click-to-select-mode(&optional ARG)
dired-context-menu(MENU CLICK)
dired-copy-filename-as-kill(&optional ARG)
dired-current-directory(&optional LOCALP)
dired-delete-entry(FILE)
dired-delete-file(FILE &optional RECURSIVE TRASH)
dired-desktop-buffer-misc-data(DIRNAME)
dired-desktop-save-p()
dired-directory-changed-p(DIRNAME)
dired-display-file()
dired-dnd-do-ask-action(URI)
dired-dnd-handle-file(URI ACTION)
dired-dnd-handle-local-file(URI ACTION)
dired-do-delete(&optional ARG)
dired-do-eww()
dired-do-flagged-delete(&optional NOMESSAGE)
dired-do-info()
dired-do-man()
dired-enable-click-to-select-mode(EVENT)
dired-file-marker(FILE)
dired-file-name-at-point()
dired-filename-update-invisibility-spec()
dired-find-alternate-file()
dired-find-buffer-nocreate(DIRNAME &optional MODE)
dired-find-file()
dired-find-file-other-window()
dired-flag-auto-save-files(&optional UNFLAG-P)
dired-flag-backup-files(&optional UNFLAG-P)
dired-flag-file-deletion(ARG &optional INTERACTIVE)
dired-flag-files-regexp(REGEXP)
dired-flag-garbage-files()
dired-format-columns-of-files(FILES)
dired-fun-in-all-buffers(DIRECTORY FILE FUN &rest ARGS)
dired-get-file-for-visit()
dired-get-filename(&optional LOCALP NO-ERROR-IF-NOT-FILEP)
dired-get-marked-files(&optional LOCALP ARG FILTER DISTINGUISH-ONE-MARKED ERROR)
dired-get-subdir-max(ELT)
dired-get-subdir-min(LIST)
dired-glob-regexp(PATTERN)
dired-goto-file(FILE)
dired-goto-file-1(FILE FULL-NAME LIMIT)
dired-grep-read-files()
dired-hide-details-mode(&optional ARG)
dired-in-this-tree(FILE DIR)
dired-in-this-tree-p(FILE DIR)
dired-initial-position(DIRNAME)
dired-insert-directory(DIR SWITCHES &optional FILE-LIST WILDCARD HDR)
dired-insert-old-subdirs(OLD-SUBDIR-ALIST)
dired-insert-set-properties(BEG END)
dired-internal-do-deletions(L ARG &optional TRASH)
dired-internal-noselect(DIR-OR-LIST &optional SWITCHES MODE)
dired-jump(&optional OTHER-WINDOW FILE-NAME)
dired-jump-other-window(&optional FILE-NAME)
dired-log(LOG &rest ARGS)
dired-log-summary(STRING FAILURES)
dired-make-absolute(FILE &optional DIR)
dired-make-relative(FILE &optional DIR)
dired-map-over-marks(BODY ARG &optional SHOW-PROGRESS DISTINGUISH-ONE-MARKED)
dired-mark(ARG &optional INTERACTIVE)
dired-mark--region-beginning()
dired-mark--region-end()
dired-mark--region-use-p()
dired-mark-directories(UNFLAG-P)
dired-mark-executables(UNFLAG-P)
dired-mark-files-containing-regexp(REGEXP &optional MARKER-CHAR)
dired-mark-files-in-region(START END)
dired-mark-files-regexp(REGEXP &optional MARKER-CHAR)
dired-mark-for-click(EVENT)
dired-mark-if(PREDICATE MSG)
dired-mark-pop-up(BUFFER-OR-NAME OP-SYMBOL FILES FUNCTION &rest ARGS)
dired-mark-prompt(ARG FILES)
dired-mark-remembered(ALIST)
dired-mark-symlinks(UNFLAG-P)
dired-mode(&optional DIRNAME SWITCHES)
dired-mode-immediate-menu(ARG1)
dired-mode-mark-menu(ARG1)
dired-mode-operate-menu(ARG1)
dired-mode-regexp-menu(ARG1)
dired-mode-subdir-menu(ARG1)
dired-mouse-drag(EVENT)
dired-mouse-find-file(EVENT &optional FIND-FILE-FUNC FIND-DIR-FUNC)
dired-mouse-find-file-other-frame(EVENT)
dired-mouse-find-file-other-window(EVENT)
dired-move-to-end-of-filename(&optional NO-ERROR)
dired-move-to-filename(&optional RAISE-ERROR EOL)
dired-next-dirline(ARG &optional OPOINT)
dired-next-line(ARG)
dired-next-marked-file(ARG &optional WRAP OPOINT)
dired-next-subdir(ARG &optional NO-ERROR-IF-NOT-FOUND NO-SKIP)
dired-normalize-subdir(DIR)
dired-noselect(DIR-OR-LIST &optional SWITCHES)
dired-number-of-marked-files()
dired-other-frame(DIRNAME &optional SWITCHES)
dired-other-tab(DIRNAME &optional SWITCHES)
dired-other-window(DIRNAME &optional SWITCHES)
dired-plural-s(COUNT)
dired-post-do-command()
dired-prev-dirline(ARG)
dired-prev-marked-file(ARG &optional WRAP)
dired-previous-line(ARG)
dired-read-dir-and-switches(STR)
dired-read-regexp(PROMPT &optional DEFAULT HISTORY)
dired-readin()
dired-remember-hidden()
dired-remember-marks(BEG END)
dired-remove-entry(FILE)
dired-repeat-over-lines(ARG FUNCTION)
dired-replace-in-string(REGEXP NEWTEXT STRING)
dired-restore-desktop-buffer(FILE-NAME BUFFER-NAME MISC-DATA)
dired-restore-positions(POSITIONS)
dired-revert(&optional ARG NOCONFIRM)
dired-safe-switches-p(SWITCHES)
dired-save-positions()
dired-sort-R-check(SWITCHES)
dired-sort-other(SWITCHES &optional NO-REVERT)
dired-sort-set-mode-line()
dired-sort-toggle-or-edit(&optional ARG)
dired-string-replace-match(REGEXP STRING NEWTEXT &optional LITERAL GLOBAL)
dired-subdir-hidden-p(DIR)
dired-subdir-index(DIR)
dired-summary()
dired-switches-escape-p(SWITCHES)
dired-switches-recursive-p(SWITCHES)
dired-toggle-marks()
dired-toggle-read-only()
dired-unadvertise(DIR)
dired-uncache(DIR)
dired-undo()
dired-unmark(ARG &optional INTERACTIVE)
dired-unmark-all-files(MARK &optional ARG)
dired-unmark-all-marks()
dired-unmark-backward(ARG)
dired-up-directory(&optional OTHER-WINDOW)
dired-view-file()
dired-why()

Defined faces (12)

dired-broken-symlinkFace used for broken symbolic links.
dired-directoryFace used for subdirectories.
dired-flaggedFace used for files flagged for deletion.
dired-headerFace used for directory headers.
dired-ignoredFace used for files suffixed with ‘completion-ignored-extensions’.
dired-markFace used for Dired marks.
dired-markedFace used for marked files.
dired-perm-writeFace used to highlight permissions of group- and world-writable files.
dired-set-idFace used to highlight permissions of suid and guid files.
dired-specialFace used for sockets, pipes, block devices and char devices.
dired-symlinkFace used for symbolic links.
dired-warningFace used to highlight a part of a buffer that needs user attention.