6.1 Dired Mode

  • 6.1.1 Inspecting Directories
  • 6.1.2 Deleting Files
  • 6.1.3 Undeleting Files
  • 6.1.4 Expunging and Quitting
  • 6.1.5 Copying Files
  • 6.1.6 Renaming Files
  • Hemlock provides a directory editing mechanism. The user can flag files and directories for deletion, undelete flagged files, and with a keystroke read in files and descend into directories. In some implementations, it also supports copying, renaming, and a simple wildcard feature. [annotate]

    6.1.1 Inspecting Directories

    Dired with Pattern  (bound to C-x C-M-d) [Command]
              

    This command prompts for a directory and a pattern that may contain at most one wildcard, an asterisk, and it fills a buffer with a verbose listing of the files in the directory matching the pattern. When the prefix argument is supplied, this includes Unix dot files. If a dired buffer already exists for this directory, this switches to the buffer and makes sure it displays dot files if appropriate. [annotate]

    [annotate]

    Dired from Buffer Pathname   [Command]
              

    This command invokes Dired on the directory name of the current buffer's pathname. [annotate]

    [annotate]

    Dired Help  (bound to Dired: ?) [Command]
              

    This command pops up a help window listing the various Dired commands. [annotate]

    [annotate]

    Dired View File  (bound to Dired: Space) [Command]
    Dired Edit File  (bound to Dired: e) [Command]
              

    These command read in the file on the current line with the point. If the line describes a directory instead of a file, then this command effectively invokes Dired on the specification. This associates the file's buffer with the Dired buffer. [annotate]

    Dired View File reads in the file as if by View File, and Dired Edit File as if by Find File. [annotate]

    Dired View File always reads into a newly created buffer, warning if the file already exists in some buffer. [annotate]

    [annotate]

    Dired Up Directory  (bound to Dired: ^) [Command]
              

    This command invokes Dired on the directory up one level from the current Dired buffer. This is useful for going backwards after repeatedly invoking Dired View File and descending into a series of subdirectories. Remember, Dired only generates directory listings when no buffer contains a dired for the specified directory. [annotate]

    [annotate]

    Dired Update Buffer  (bound to Dired: H-u) [Command]
              

    This command is useful when the user knows the directory in the current Dired buffer has changed. Hemlock cannot know the directory structure has changed, but the user can explicitly update the buffer with this command instead of having to delete it and invoke Dired again. [annotate]

    [annotate]

    Dired Next File   [Command]
    Dired Previous File   [Command]
              

    These commands move to next or previous undeleted file. [annotate]

    [annotate]

    6.1.2 Deleting Files

    Dired Delete File and Down Line  (bound to Dired: d) [Command]
              

    This command marks for deletion the file on the current line with the point and moves point down a line. [annotate]

    [annotate]

    Dired Delete File with Pattern  (bound to Dired: D) [Command]
              

    This command prompts for a name pattern that may contain at most one wildcard, an asterisk, and marks for deletion all the names matching the pattern. [annotate]

    [annotate]

    Dired Delete File  (bound to Dired: C-d) [Command]
              

    This command marks for deletion the file on the current line with the point without moving the point. [annotate]

    [annotate]

    6.1.3 Undeleting Files

    Dired Undelete File and Down Line  (bound to Dired: u) [Command]
              

    This command unmarks for deletion the file on the current line with the point and moves point down a line. [annotate]

    [annotate]

    Dired Undelete File with Pattern  (bound to Dired: U) [Command]
              

    This command prompts for a name pattern that may contain at most one wildcard, an asterisk, and unmarks for deletion all the names matching the pattern. [annotate]

    [annotate]

    Dired Undelete File  (bound to Dired: C-u) [Command]
              

    This command unmarks for deletion the file on the current line with the point without moving the point. [annotate]

    [annotate]

    6.1.4 Expunging and Quitting

    Dired Expunge Files  (bound to Dired: !) [Command]
    Dired File Expunge Confirm  (initial value t) [Variable]
    Dired Directory Expunge Confirm  (initial value t) [Variable]
              

    This command deletes files marked for deletion, asking the user for confirmation once for all the files flagged. It recursively deletes any marked directories, asking the user for confirmation once for all those marked. Dired File Expunge Confirm and Dired Directory Expunge Confirm when set to nil individually inhibit the confirmation prompting for the appropriate deleting. [annotate]

    [annotate]

    Dired Quit  (bound to Dired: q) [Command]
              

    This command expunges any marked files or directories as if by Expunge Dired Files before deleting the Dired buffer. [annotate]

    [annotate]

    6.1.5 Copying Files

    Dired Copy File  (bound to Dired: c) [Command]
              

    This command prompts for a destination specification and copies the file on the line with the point. When prompting, the current line's specification is the default, which provides some convenience in supplying the destination. The destination is either a directory specification or a file name, and when it is the former, the source is copied into the directory under its current file name and extension. [annotate]

    [annotate]

    Dired Copy with Wildcard  (bound to Dired: C) [Command]
              

    This command prompts for a name pattern that may contain at most one wildcard, an asterisk, and copies all the names matching the pattern. When prompting for a destination, this provides the Dired buffer's directory as a default. The destination is either a directory specification or a file name with a wildcard. When it is the former, all the source files are copied into the directory under their current file names and extensions. When it is the later, each sources file's substitution for the wildcard causing it to match the first pattern replaces the wildcard in the destination pattern; for example, you might want to copy "*.txt" to "*.text". [annotate]

    [annotate]

    Dired Copy File Confirm  (initial value t) [Variable]
              

    This variable controls interaction with the user when it is not obvious what the copying process should do. This takes one of the following values: [annotate]

    t
    When the destination specification exists, the copying process stops and asks the user if it should overwrite the destination. [annotate]
    nil
    The copying process always copies the source file to the destination specification without interacting with the user. [annotate]
    :update
    When the destination specification exists, and its write date is newer than the source's write date, then the copying process stops and asks the user if it should overwrite the destination. [annotate]

    [annotate]

    6.1.6 Renaming Files

    Dired Rename File  (bound to Dired: r) [Command]
              

    Rename the file or directory under the point [annotate]

    [annotate]

    Dired Rename with Wildcard  (bound to Dired: R) [Command]
              

    Rename files that match a pattern containing ONE wildcard. [annotate]

    [annotate]

    Dired Rename File Confirm  (initial value t) [Variable]
              

    When non-nil, Dired will query before clobbering an existing file. [annotate]

    [annotate]