emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/cpio-mode 6c0fa51 38/61: version 0.04


From: Stefan Monnier
Subject: [elpa] externals/cpio-mode 6c0fa51 38/61: version 0.04
Date: Fri, 11 Jan 2019 15:25:29 -0500 (EST)

branch: externals/cpio-mode
commit 6c0fa517bce1975e4ddefc9853bde96653d9d6f6
Author: dlewan <address@hidden>
Commit: GitHub <address@hidden>

    version 0.04
    
    Post development clean-up after finishing the initial development for newc 
archives.
---
 cab-test.el                 |   13 +-
 configure.ac                |    4 +-
 cpio-affiliated-buffers.el  |   36 +-
 cpio-dired-test.el          | 1931 +++++++++++++++++++++++++++++++++++++++++--
 cpio-dired.el               |  407 +++------
 cpio-entry-contents-mode.el |   19 +-
 cpio-generic-tests.el       |    5 +-
 cpio-generic.el             |  287 +------
 cpio-modes-test.el          |   13 +-
 cpio-modes.el               |   23 +-
 cpio-newc.el                |  173 +---
 cpio.el                     |  101 +--
 12 files changed, 2051 insertions(+), 961 deletions(-)

diff --git a/cab-test.el b/cab-test.el
index 3334ab6..47d9b8f 100644
--- a/cab-test.el
+++ b/cab-test.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cab-text.el --- brief description
-;      $Id: cab-test.el,v 1.1.2.14 2018/03/08 06:10:11 doug Exp $      
+;      $Id: cab-test.el,v 1.1.2.15 2018/05/11 20:13:12 doug Exp $      
 
 ;; COPYRIGHT
 
@@ -554,17 +554,6 @@
     (message "%s(): Leaving." fname)))
 
 
-;; 
-;; Commands
-;; 
-
-
-;; 
-;; Mode definition (IF APPROPRIATE)
-;; 
-
-
-
 (provide 'cab-test)
 ;;; cab-test.el ends here
 
diff --git a/configure.ac b/configure.ac
index ad9a279..77d78ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-dnl    $Id: configure.ac,v 1.2.2.4 2018/04/26 18:10:29 doug Exp $      
+dnl    $Id: configure.ac,v 1.2.2.5 2018/05/11 20:13:12 doug Exp $      
 
 # 
 # Copyright © 2015, 2017, 2018 Douglas Lewan, address@hidden
@@ -20,7 +20,7 @@ dnl   $Id: configure.ac,v 1.2.2.4 2018/04/26 18:10:29 doug 
Exp $
 # 
 
 dnl Autoconf requirements
-AC_INIT(cpio-mode, 0.03, address@hidden)
+AC_INIT(cpio-mode, 0.04, address@hidden)
 AC_PREFIX_DEFAULT(${HOME}/local)
 dnl information on the package
 dnl checks for programs
diff --git a/cpio-affiliated-buffers.el b/cpio-affiliated-buffers.el
index fcc6178..258f103 100644
--- a/cpio-affiliated-buffers.el
+++ b/cpio-affiliated-buffers.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-affiliated-buffers.el --- Establish and manage buffers affiliated 
with each other.
-;      $Id: cpio-affiliated-buffers.el,v 1.1.2.13 2018/04/26 14:15:30 doug Exp 
$       
+;      $Id: cpio-affiliated-buffers.el,v 1.1.2.14 2018/05/11 20:13:12 doug Exp 
$       
 
 ;; COPYRIGHT
 
@@ -112,29 +112,6 @@ CONTRACT: BUFFER and PARENT are buffers."
           (mapc 'cab-deregister *cab-subordinates*))
          (t nil))))
 
-(defun OBS-cab-deregister (buffer)
-  "Deregister the given BUFFER as an affiliate of its parent buffer."
-  (let ((fname "cab-deregister")
-       (local-subordinates ())
-       (parent))
-    (if (buffer-live-p buffer)
-       (with-current-buffer buffer
-
-         (setq parent *cab-parent*)
-         (setq *cab-parent* nil)
-         (mapc (lambda (b)
-                 (kill-buffer b))
-               *cab-subordinates*)))
-    (if (buffer-live-p parent)
-       (with-current-buffer parent
-         (mapc (lambda (b)
-                 (if (and (equal b buffer)
-                          (buffer-live-p b))
-                     (remove-hook 'kill-buffer-hook 'cab-deregister 'local)
-                   (if (buffer-live-p b)
-                       (push b local-subordinates))))
-                 *cab-subordinates*)
-         (setq *cab-subordinates* local-subordinates)))))
 
 (defun cab-deregister (&optional buffer)
   "Deregister and kill BUFFER and all its subordinate buffers.
@@ -181,17 +158,6 @@ CAVEAT: This function should disappear as affiliated 
buffer code stabilizes."
          (buffer-list))))
 
 
-;; 
-;; Commands
-;; 
-
-
-;; 
-;; Mode definition (IF APPROPRIATE)
-;; 
-
-
-
 (provide 'cpio-affiliated-buffers)
 ;;; cpio-affiliated-buffers.el ends here
 
diff --git a/cpio-dired-test.el b/cpio-dired-test.el
index 0008db0..7c8be65 100644
--- a/cpio-dired-test.el
+++ b/cpio-dired-test.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-dired-test.el --- Tests of cpio-dired-mode.
-;      $Id: cpio-dired-test.el,v 1.1.4.3 2018/05/11 13:16:59 doug Exp $        
+;      $Id: cpio-dired-test.el,v 1.1.4.4 2018/05/11 20:13:12 doug Exp $        
 
 ;; COPYRIGHT
 
@@ -6742,8 +6742,13 @@ The results are always presented as (string-match 
EXPECTED-RE ACTUAL) on that li
       (while (search-forward "\\n" (point-max) t)
        (replace-match "\n\n"))
       (goto-char (point-min)))
+    
+    ;; (pop-to-buffer "expected")
+    ;; (switch-to-buffer "actual")
+
     (ediff-buffers "actual" "expected")))
 
+
 (defun cdmt-do-cpio-id (where archive)
   "Run cpio(1) on the given ARCHIVE and report the results.
 WHERE Should be a line number."
@@ -6850,7 +6855,7 @@ to help make tests pass correctly."
 (defun cdmt-sweep-catalog ()
   "Clean up a copy of the cpio catalog,
 as presented in an 'actual' buffer (see `cdmt-ediff-results')
-for use in a string-match."
+for use in a string-match-p."
   ;; If this were written in good LISP,
   ;; then it would be a (mapcar)
   ;; over a list of (cons RE replacement)
@@ -6981,6 +6986,1799 @@ cpio-dired-isearch-entry-names-regexp is not yet 
implemented -- expect an error.
   (should-error (cpio-dired-isearch-entry-names-regexp)
      :type 'error))
 
+;;;;;;;; This gets an end-of-buffer error under ERT.
+;;;;;;;; (ert-deftest cdmt-cpio-dired-save-archive-0 () ;✓
+;;;;;;;;   "Test the function of M-x cpio-dired-save-archive."
+;;;;;;;;   (let ((test-name "cdmt-cpio-dired-save-archive")
+;;;;;;;;         (cpio-archive-buffer)
+;;;;;;;;       (cpio-archive-buffer-contents-before)
+;;;;;;;;         (cpio-archive-buffer-contents)
+;;;;;;;;         (cpio-dired-buffer)
+;;;;;;;;         (cpio-dired-buffer-contents-before)
+;;;;;;;;         (cpio-dired-buffer-contents)
+;;;;;;;;         )
+;;;;;;;;     (cdmt-reset 'make)
+
+;;;;;;;;     (progn (goto-char (point-min))
+;;;;;;;;          (re-search-forward " aa$" (point-max))
+;;;;;;;;          (cpio-dired-do-delete 1)
+;;;;;;;;          (setq cpio-archive-buffer-contents-before
+;;;;;;;;                (cdmt-filter-archive-contents (with-current-buffer 
cpio-archive-buffer
+;;;;;;;;                                                
(buffer-substring-no-properties (point-min) (point-max)))))
+;;;;;;;;          (setq cpio-dired-buffer-contents-before (with-current-buffer 
cpio-dired-buffer
+;;;;;;;;                                                    
(buffer-substring-no-properties (point-min) (point-max)))))
+    
+;;;;;;;;     (should (and "Archive buffer should be modified."
+;;;;;;;;                (buffer-modified-p cpio-archive-buffer)))
+;;;;;;;;     (should (and "Archive buffer should be missing exactly the entry 
for aa."
+;;;;;;;;                (string-equal "070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; a     (( filename ))
+
+;;;;;;;; a
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaa   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; aaa
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaa  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; aaaa
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa (( filename ))
+
+;;;;;;;; aaaaa
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; b     (( filename ))
+
+;;;;;;;; b
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000003      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bb    (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; bb
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbb   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; bbb
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbb  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; bbbb
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb (( filename ))
+
+;;;;;;;; bbbbb
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; c     (( filename ))
+
+;;;;;;;; c
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000003      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cc    (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; cc
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccc   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; ccc
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cccc  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; cccc
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc (( filename ))
+
+;;;;;;;; ccccc
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 00000000      (( mode     ))
+;;;;;;;; 00000000      (( uid      ))
+;;;;;;;; 00000000      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 0000000B      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; TRAILER!!!    (( filename ))
+;;;;;;;; 
\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0
 [...]
+;;;;;;;;     (should (and "Checking dired-style buffer before saving."
+;;;;;;;;                (string-match "CPIO archive: alphabet_small.newc.cpio:
+
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} a
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaa
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaa
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} b
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} c
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
+;;;;;;;; " cpio-dired-buffer-contents-before)))
+
+;;;;;;;;     (progn (cpio-dired-save-archive)
+;;;;;;;;          (setq cpio-archive-buffer-contents
+;;;;;;;;                (cdmt-filter-archive-contents 
+;;;;;;;;                 (with-current-buffer cpio-archive-buffer
+;;;;;;;;                   (buffer-substring-no-properties (point-min) 
(point-max)))))
+;;;;;;;;          (setq cpio-dired-buffer-contents
+;;;;;;;;                (with-current-buffer cpio-dired-buffer
+;;;;;;;;                  (buffer-substring-no-properties (point-min) 
(point-max)))))
+    
+;;;;;;;;     ;; (cdmt-do-cpio-id (count-lines (point-min)(point)) 
(file-name-nondirectory *cdmt-small-archive*))
+    
+;;;;;;;;     (should (and "Archive buffer should no longer be modified."
+;;;;;;;;                (not (buffer-modified-p cpio-archive-buffer))))
+;;;;;;;;     (should (and "Checking the archive buffer after saving."
+;;;;;;;;                (string-equal "070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; a     (( filename ))
+
+;;;;;;;; a
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaa   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; aaa
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaa  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; aaaa
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa (( filename ))
+
+;;;;;;;; aaaaa
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; b     (( filename ))
+
+;;;;;;;; b
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000003      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bb    (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; bb
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbb   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; bbb
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbb  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; bbbb
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb (( filename ))
+
+;;;;;;;; bbbbb
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; c     (( filename ))
+
+;;;;;;;; c
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000003      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cc    (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; cc
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccc   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; ccc
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cccc  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; cccc
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc (( filename ))
+
+;;;;;;;; ccccc
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 00000000      (( mode     ))
+;;;;;;;; 00000000      (( uid      ))
+;;;;;;;; 00000000      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 0000000B      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; TRAILER!!!    (( filename ))
+;;;;;;;; 
\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0
 [...]
+
+;;;;;;;;     (should (and "Checking the dired-style buffer after saving."
+;;;;;;;;                (string-match "CPIO archive: alphabet_small.newc.cpio:
+
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} a
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaa
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaa
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} b
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} c
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
+;;;;;;;; " cpio-dired-buffer-contents)))
+
+;;;;;;;;     ;; The archive strings should be identical up to the TRAILER!!! 
padding.
+;;;;;;;;     ;; NO! Padding after any added, deleted or changed entry will 
also change.
+;;;;;;;;     ;; (string-match "TRAILER!!!" cpio-archive-buffer-contents-before)
+;;;;;;;;     ;; (setq cpio-archive-buffer-contents-before (substring 
cpio-archive-buffer-contents-before 0 (match-end 0)))
+;;;;;;;;     ;; (string-match "TRAILER!!!" cpio-archive-buffer-contents)
+;;;;;;;;     ;; (setq cpio-archive-buffer-contents (substring 
cpio-archive-buffer-contents 0 (match-end 0)))
+;;;;;;;;     ;; (should (string-equal cpio-archive-buffer-contents-before 
cpio-archive-buffer-contents))
+
+;;;;;;;;     (should (and "The dired style buffer should not have changed."
+;;;;;;;;                (string-equal cpio-dired-buffer-contents-before 
cpio-dired-buffer-contents)))
+
+;;;;;;;;     (cdmt-reset)
+
+;;;;;;;;     (progn (goto-char (point-min))
+;;;;;;;;          (re-search-forward " aaaa$" (point-max))
+;;;;;;;;          (setq unread-command-events (listify-key-sequence "dddd\n"))
+;;;;;;;;          (cpio-dired-do-rename 1)
+;;;;;;;;          (cpio-dired-save-archive)
+;;;;;;;;          (setq cpio-archive-buffer-contents
+;;;;;;;;                (cdmt-filter-archive-contents
+;;;;;;;;                 (with-current-buffer cpio-archive-buffer
+;;;;;;;;                   (buffer-substring-no-properties (point-min) 
(point-max)))))
+;;;;;;;;          (setq cpio-dired-buffer-contents
+;;;;;;;;                (with-current-buffer cpio-dired-buffer
+;;;;;;;;                  (buffer-substring-no-properties (point-min) 
(point-max)))))
+
+;;;;;;;;     ;; (cdmt-do-cpio-id (count-lines (point-min) (point-max)) 
(file-name-nondirectory *cdmt-small-archive*))
+    
+;;;;;;;;     (should (and "Expecting the standard archive with aaaa moved to 
ddddd."
+;;;;;;;;                (string-equal "070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; a     (( filename ))
+
+;;;;;;;; a
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaa   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; aaa
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa (( filename ))
+
+;;;;;;;; aaaaa
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; b     (( filename ))
+
+;;;;;;;; b
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000003      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bb    (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; bb
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbb   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; bbb
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbb  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; bbbb
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb (( filename ))
+
+;;;;;;;; bbbbb
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; c     (( filename ))
+
+;;;;;;;; c
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+
+;;;;;;;; 00000003      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cc    (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; cc
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccc   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; ccc
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cccc  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; cccc
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc (( filename ))
+
+;;;;;;;; ccccc
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; dddd  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; aaaa
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 00000000      (( mode     ))
+;;;;;;;; 00000000      (( uid      ))
+;;;;;;;; 00000000      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 0000000B      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; TRAILER!!!    (( filename ))
+;;;;;;;; 
\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0
 [...]
+
+;;;;;;;;     (should (and "Expecting a dired style buffer without aaaa."
+;;;;;;;;                (string-match "CPIO archive: alphabet_small.newc.cpio:
+
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} a
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaa
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} b
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} c
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} dddd
+;;;;;;;; " cpio-dired-buffer-contents)))
+    
+;;;;;;;;     (cdmt-reset)
+    
+;;;;;;;;     (progn (goto-char (point-min))
+;;;;;;;;          (re-search-forward " b$" (point-max))
+;;;;;;;;          (cpio-dired-mark 4)
+;;;;;;;;          (setq unread-command-events (listify-key-sequence "d\n"))
+;;;;;;;;          (cpio-dired-do-rename 1)
+;;;;;;;;          (cpio-dired-save-archive)
+;;;;;;;;          (setq cpio-archive-buffer-contents
+;;;;;;;;                (cdmt-filter-archive-contents
+;;;;;;;;                 (with-current-buffer cpio-archive-buffer
+;;;;;;;;                   (buffer-substring-no-properties (point-min) 
(point-max)))))
+;;;;;;;;          (setq cpio-dired-buffer-contents
+;;;;;;;;                (with-current-buffer cpio-dired-buffer
+;;;;;;;;                  (buffer-substring-no-properties (point-min) 
(point-max)))))
+
+;;;;;;;;     ;; (cdmt-do-cpio-id (count-lines (point-min) (point-max)) 
(file-name-nondirectory *cdmt-small-archive*))
+
+;;;;;;;;     (should (and "Expecting a small archive with d/b, d/bb, d/bbb, 
d/bbbb."
+;;;;;;;;                (string-equal "070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; a     (( filename ))
+
+;;;;;;;; a
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaa   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; aaa
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa (( filename ))
+
+;;;;;;;; aaaaa
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb (( filename ))
+
+;;;;;;;; bbbbb
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; c     (( filename ))
+
+;;;;;;;; c
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000003      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cc    (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; cc
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccc   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; ccc
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cccc  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; cccc
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc (( filename ))
+
+;;;;;;;; ccccc
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; dddd  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; aaaa
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000007      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; d/bbbb        (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; bbbb
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; d/bbb (( filename ))
+
+;;;;;;;; bbb
+
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; d/bb  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; bb
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000004      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; d/b   (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; b
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 00000000      (( mode     ))
+;;;;;;;; 00000000      (( uid      ))
+;;;;;;;; 00000000      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 0000000B      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; TRAILER!!!    (( filename ))
+;;;;;;;; 
\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0
 [...]
+
+;;;;;;;;     ;; (cdmt-do-cpio-id (count-lines (point-min) (point-max)) 
(file-name-nondirectory *cdmt-small-archive*))
+
+;;;;;;;;     (should (and "Looking for a small dired-style buffer with d/b, 
d/bb, d/bbb, d/bbbb"
+;;;;;;;;                (string-match "CPIO archive: alphabet_small.newc.cpio:
+
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} a
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaa
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} c
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} dddd
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} d/bbbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} d/bbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} d/bb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} d/b
+;;;;;;;; " cpio-dired-buffer-contents)))
+
+;;;;;;;;     (cdmt-reset)
+
+;;;;;;;;     (progn (cpio-dired-mark-entries-regexp "\\`...\\'")
+;;;;;;;;          (setq unread-command-events (listify-key-sequence 
"newDirectory\n"))
+;;;;;;;;          ;; HEREHERE This rename does something wrong.
+;;;;;;;;          (cpio-dired-do-rename 1)
+;;;;;;;;          (cpio-dired-save-archive)
+;;;;;;;;          (setq cpio-archive-buffer-contents
+;;;;;;;;                (cdmt-filter-archive-contents
+;;;;;;;;                 (with-current-buffer cpio-archive-buffer
+;;;;;;;;                   (buffer-substring-no-properties (point-min) 
(point-max)))))
+;;;;;;;;          (setq cpio-dired-buffer-contents
+;;;;;;;;                (with-current-buffer cpio-dired-buffer
+;;;;;;;;                  (buffer-substring-no-properties (point-min) 
(point-max)))))
+
+;;;;;;;;     ;; (cdmt-do-cpio-id (count-lines (point-min) (point-max)) 
(file-name-nondirectory *cdmt-small-archive*))
+
+;;;;;;;;     (should (string-equal "070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; a     (( filename ))
+
+;;;;;;;; a
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa (( filename ))
+
+;;;;;;;; aaaaa
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; aaaaa.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb (( filename ))
+
+;;;;;;;; bbbbb
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; bbbbb.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000002      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; c     (( filename ))
+
+;;;;;;;; c
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000003      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cc    (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; cc
+
+;;;;;;;; \\0\\0\\0070701       (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; cccc  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; cccc
+
+;;;;;;;; \\0070701     (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000008      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000006      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc (( filename ))
+
+;;;;;;;; ccccc
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000041ED      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000002      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000008      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; ccccc.d       (( filename ))
+;;;;;;;; \\0\\0070701  (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000005      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; dddd  (( filename ))
+;;;;;;;; \\0
+;;;;;;;; aaaa
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000007      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000012      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; newDirectory/bbbb     (( filename ))
+
+;;;;;;;; bbbb
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000011      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; newDirectory/bbb      (( filename ))
+;;;;;;;; \\0
+;;;;;;;; bbb
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000005      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000010      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; newDirectory/bb       (( filename ))
+;;;;;;;; \\0\\0
+;;;;;;;; bb
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000004      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 0000000F      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; newDirectory/b        (( filename ))
+;;;;;;;; \\0\\0\\0
+;;;;;;;; b
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000011      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; newDirectory/ccc      (( filename ))
+;;;;;;;; \\0
+;;;;;;;; ccc
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 000081A4      (( mode     ))
+;;;;;;;; 000003E8      (( uid      ))
+;;;;;;;; 000003E8      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000006      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 00000011      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; newDirectory/aaa      (( filename ))
+;;;;;;;; \\0
+;;;;;;;; aaa
+
+;;;;;;;; 070701        (( magic    ))
+;;;;;;;; DEADBEEF      (( ino      ))
+;;;;;;;; 00000000      (( mode     ))
+;;;;;;;; 00000000      (( uid      ))
+;;;;;;;; 00000000      (( gid      ))
+;;;;;;;; 00000001      (( nlink    ))
+;;;;;;;; DEADBEEF      (( mtime    ))
+;;;;;;;; 00000000      (( filesize ))
+;;;;;;;; DEADBEEF      (( dev maj  ))
+;;;;;;;; DEADBEEF      (( dev min  ))
+;;;;;;;; DEADBEEF      (( rdev maj ))
+;;;;;;;; DEADBEEF      (( rdev min ))
+;;;;;;;; 0000000B      (( namesize ))
+;;;;;;;; 00000000      (( chksum   ))
+;;;;;;;; TRAILER!!!    (( filename ))
+;;;;;;;; 
\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0
 [...]
+
+;;;;;;;;     (should (= 0 1))
+
+;;;;;;;;     ;; (cdmt-do-cpio-id (count-lines (point-min) (point-max)) 
(file-name-nondirectory *cdmt-small-archive*))
+
+;;;;;;;;     (should (string-match "CPIO archive: alphabet_small.newc.cpio:
+
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} a
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aaaaa.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} bbbbb.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} c
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
+;;;;;;;;   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} dddd
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} newDirectory/bbbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} newDirectory/bbb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} newDirectory/bb
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} newDirectory/b
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} newDirectory/ccc
+;;;;;;;;   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        6 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} newDirectory/aaa
+;;;;;;;; " cpio-dired-buffer-contents))
+
+;;;;;;;;     (should (= 0 1))
+
+;;;;;;;;     ;; (cdmt-do-cpio-id (count-lines (point-min) (point-max)) 
(file-name-nondirectory *cdmt-small-archive*))
+
+;;;;;;;;     ))
 
 (ert-deftest cdmt-cpio-describe-mode ()
   "Test cpio-describe-mode.
@@ -7571,7 +9369,7 @@ cpio-dired-do-async-shell-command) ; is not yet 
implemented -- expect an error."
         (cpio-dired-buffer-contents)
        (cpio-catalog-contents-before)
        (cpio-catalog-contents-after))
-
+    
     (cdmt-reset 'make)
     
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
@@ -7585,7 +9383,7 @@ cpio-dired-do-async-shell-command) ; is not yet 
implemented -- expect an error."
                 (with-current-buffer cpio-dired-buffer
                   (buffer-substring-no-properties (point-min) (point-max))))
           (setq cpio-catalog-contents-after (format "%s" (pp (cpio-catalog)))))
-
+    
     (should (and "Expecting the first entry to have mode -rwxr-xr-x."
                 (string-match "CPIO archive: alphabet_small.newc.cpio:
 
@@ -8311,12 +10109,12 @@ TRAILER!!!     (( filename ))
                 (with-current-buffer cpio-dired-buffer
                   (buffer-substring-no-properties (point-min) (point-max))))
           (setq cpio-catalog-contents-after (format "%s" (pp (cpio-catalog)))))
-     (should (and "Expecting all the above mode changes in the archive buffer."
-                 "• a has mode 0100755 (000081ED)."
-                 "• aaa, aaaa, aaaaa have mode 0100600 (00008180)."
-                 "• aaaaa.d has mode 040600 (00004180)."
-                 "• ... have mode 0660 (000081B0 for files or 000041B0 for 
directories)."
-                 (string-equal "070701 (( magic    ))
+    (should (and "Expecting all the above mode changes in the archive buffer."
+                "• a has mode 0100755 (000081ED)."
+                "• aaa, aaaa, aaaaa have mode 0100600 (00008180)."
+                "• aaaaa.d has mode 040600 (00004180)."
+                "• ... have mode 0660 (000081B0 for files or 000041B0 for 
directories)."
+                (string-equal "070701  (( magic    ))
 DEADBEEF       (( ino      ))
 000081ED       (( mode     ))
 000003E8       (( uid      ))
@@ -8648,11 +10446,11 @@ DEADBEEF       (( rdev min ))
 TRAILER!!!     (( filename ))
 
\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0
 [...]
 " cpio-archive-buffer-contents)))
-     (should (and "Expecting all the above mode changes in the archive buffer."
-                 "• a has mode -rwxr-xr-x"
-                 "• aaa, aaaa, aaaaa, aaaaa.d have mode -rw-r--r--"
-                 "• ... have mode -rw-rw----"
-                 (string-match "CPIO archive: alphabet_small.newc.cpio:
+    (should (and "Expecting all the above mode changes in the archive buffer."
+                "• a has mode -rwxr-xr-x"
+                "• aaa, aaaa, aaaaa, aaaaa.d have mode -rw-r--r--"
+                "• ... have mode -rw-rw----"
+                (string-match "CPIO archive: alphabet_small.newc.cpio:
 
   -rwxr-xr-x   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} a
   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aa
@@ -8673,13 +10471,13 @@ TRAILER!!!     (( filename ))
   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
 " cpio-dired-buffer-contents)))
-     (should (and "Expecting all the above mode changes in the archive buffer."
-                 "• a has mode 33261."
-                 "• aaa, aaaa, aaaaa have mode 33152."
-                 "• aaaaa.d has mode 16768."
-                 "• ... have mode 33200 for files."
-                 "                16816 for directories."
-                 (string-match "((\"a\" \.
+    (should (and "Expecting all the above mode changes in the archive buffer."
+                "• a has mode 33261."
+                "• aaa, aaaa, aaaaa have mode 33152."
+                "• aaaaa.d has mode 16768."
+                "• ... have mode 33200 for files."
+                "                16816 for directories."
+                (string-match "((\"a\" \.
   \[\[[[:digit:]]+ 33261 [[:digit:]]+ [[:digit:]]+ 1
              ([[:digit:]]+ [[:digit:]]+)
              4 [[:digit:]]+ [[:digit:]]+ [[:digit:]]+ [[:digit:]]+ 2 nil \"a\" 
nil 116\]
@@ -8771,7 +10569,7 @@ TRAILER!!!       (( filename ))
    #<marker at 2077 in alphabet_small\.newc\.cpio> #<marker at 2197 in 
alphabet_small\.newc\.cpio>\]))
 " cpio-catalog-contents-after)))
 
-     (cdmt-test-save)))
+    (cdmt-test-save)))
 
 (ert-deftest cdmt-cpio-dired-do-chown () ;✓
   "Test the function of M-x cpio-do-chown."
@@ -11431,7 +13229,6 @@ cpio-dired-do-copy-regexp is not yet implemented -- 
expect an error."
     (cdmt-reset 'make)
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
-          (cpio-dired-move-to-first-entry)
           (cpio-dired-do-delete 1)
           (setq cpio-archive-buffer-contents
                 (cdmt-filter-archive-contents
@@ -12530,10 +14327,10 @@ cpio-dired-do-redisplay is not yet implemented -- 
expect an error."
         (cpio-dired-buffer-contents)
        (cpio-catalog-contents-before)
        (cpio-catalog-contents-after))
+
     (cdmt-reset 'make)
     
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
-          ;; (cpio-dired-goto-entry "a")
           (setq unread-command-events (listify-key-sequence "d\n"))
           (cpio-dired-do-rename 1)
           (setq cpio-archive-buffer-contents
@@ -12813,8 +14610,8 @@ cpio-dired-do-redisplay is not yet implemented -- 
expect an error."
     (should (and "Expecting an as yet unchanged archive."
                 (string-equal *cdmt-untouched-small-archive* 
cpio-archive-buffer-contents)))
 
-    ;;(should (and "Expecting a dired buffer with \`...\' all under 
newDirectory-1."
-    (should (string-match "CPIO archive: alphabet_small.newc.cpio:
+    (should (and "Expecting a dired buffer with \`...\' all under 
newDirectory-1."
+                (string-match "CPIO archive: alphabet_small.newc.cpio:
 
   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} d
   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aa
@@ -12834,8 +14631,9 @@ cpio-dired-do-redisplay is not yet implemented -- 
expect an error."
   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        7 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} cccc
   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
   drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
-" cpio-dired-buffer-contents))
-    (should (string-match "((\"d\" \.
+" cpio-dired-buffer-contents)))
+    (should (and "Expecting a catalog with \`...\' entries in newDirectory-1."
+                (string-match "((\"d\" \.
   \[\[[[:digit:]]+ 33188 [[:digit:]]+ [[:digit:]]+ 1
              ([[:digit:]]+ [[:digit:]]+)
              4 [[:digit:]]+ [[:digit:]]+ [[:digit:]]+ [[:digit:]]+ 2 nil \"d\" 
nil 116\]
@@ -12925,7 +14723,7 @@ cpio-dired-do-redisplay is not yet implemented -- 
expect an error."
              ([[:digit:]]+ [[:digit:]]+)
              0 [[:digit:]]+ [[:digit:]]+ [[:digit:]]+ [[:digit:]]+ 8 nil 
\"ccccc\.d\" nil 120\]
    #<marker at 2077 in alphabet_small\.newc\.cpio> #<marker at 2197 in 
alphabet_small\.newc\.cpio>\]))
-" cpio-catalog-contents-after))
+" cpio-catalog-contents-after)))
 
     (cdmt-test-save)))
 
@@ -13737,9 +15535,9 @@ D -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|de
                 (with-current-buffer cpio-dired-buffer
                   (buffer-substring-no-properties (point-min) (point-max))))
           (setq cpio-catalog-contents-after (format "%s" (pp (cpio-catalog)))))
-     (should (and "Expecting an archive with entries for suffixes"
-                 "    aux bak dvi log orig reg toc."
-                 (string-equal "070701 (( magic    ))
+    (should (and "Expecting an archive with entries for suffixes"
+                "    aux bak dvi log orig reg toc."
+                (string-equal "070701  (( magic    ))
 DEADBEEF       (( ino      ))
 000081A4       (( mode     ))
 000003E8       (( uid      ))
@@ -14182,10 +15980,10 @@ aa
 
 \\0\\0\\0
 " cpio-archive-buffer-contents)))
-     (should (and "Expecting a dired-style buffer with marked entries"
-                 "    for the suffixes"
-                 "    aux bak dvi log orig reg toc."
-                 (string-match "CPIO archive: alphabet_small.newc.cpio:
+    (should (and "Expecting a dired-style buffer with marked entries"
+                "    for the suffixes"
+                "    aux bak dvi log orig reg toc."
+                (string-match "CPIO archive: alphabet_small.newc.cpio:
 
   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        4 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} a
   -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aa
@@ -14213,7 +16011,7 @@ D -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|de
 D -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aa.rej
 D -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} aa.toc
 " cpio-dired-buffer-contents)))
-     (should (and "Expecting a catalog with entries with the suffixes"
+    (should (and "Expecting a catalog with entries with the suffixes"
                 "    aux bak dvi log orig reg toc."
                 (string-match "((\"a\" \.
   \[\[[[:digit:]]+ 33188 [[:digit:]]+ [[:digit:]]+ 1
@@ -14341,7 +16139,7 @@ D -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|de
              5 [[:digit:]]+ [[:digit:]]+ [[:digit:]]+ [[:digit:]]+ 7 nil 
\"aa\.toc\" nil 116\]
    #<marker at 2965 in alphabet_small\.newc\.cpio> #<marker at 3085 in 
alphabet_small\.newc\.cpio>\]))
 " cpio-catalog-contents-after)))
-     (cdmt-test-save)))
+    (cdmt-test-save)))
 
 (ert-deftest cdmt-cpio-dired-goto-entry ()
   "Test cpio-dired-goto-entry.
@@ -14556,12 +16354,12 @@ cpio-dired-mouse-find-entry-other-window is not yet 
implemented -- expect an err
 
     (should (and "The current entry should be aaaaa.d"
                 (string-equal "aaaaa.d" entry-name)))
-    ;; (should (and "The archive should be untouched."
-;;    (should "Expecting an untouched large archive buffer."
-    (should (string-equal *cdmt-untouched-large-archive-buffer* 
cpio-archive-buffer-contents))
+    (should (and "Expecting an untouched large archive buffer."
+                (string-equal *cdmt-untouched-large-archive-buffer* 
cpio-archive-buffer-contents)))
     (should (and "The dired style buffer should be untouched."
                 (string-match *cdmt-untouched-large-dired-buffer* 
cpio-dired-buffer-contents)))
-    (should (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after))
+    (should (and "Expecting an unchanged catalog."
+                (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after)))
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
           (cpio-dired-next-dirline 2)
@@ -14581,7 +16379,8 @@ cpio-dired-mouse-find-entry-other-window is not yet 
implemented -- expect an err
                 (string-equal *cdmt-untouched-large-archive-buffer* 
cpio-archive-buffer-contents)))
     (should (and "The dired style buffer should be untouched. (1)"
                 (string-match *cdmt-untouched-large-dired-buffer* 
cpio-dired-buffer-contents)))
-    (should (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after))
+    (should (and "Expecting an unchanged catalog."
+                (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after)))
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
           (cpio-dired-next-dirline 4)
@@ -14601,7 +16400,8 @@ cpio-dired-mouse-find-entry-other-window is not yet 
implemented -- expect an err
                 (string-equal *cdmt-untouched-large-archive-buffer* 
cpio-archive-buffer-contents)))
     (should (and "The dired style buffer shouold be untouched (2)"
                 (string-match *cdmt-untouched-large-dired-buffer* 
cpio-dired-buffer-contents)))
-    (should (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after))
+    (should (and "Expecting an unchanged catalog."
+                (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after)))
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
           (cpio-dired-next-dirline 8)
@@ -14621,7 +16421,8 @@ cpio-dired-mouse-find-entry-other-window is not yet 
implemented -- expect an err
                 (string-equal *cdmt-untouched-large-archive-buffer* 
cpio-archive-buffer-contents)))
     (should (and "The dired style buffer should be untouched. (3)"
                 (string-match *cdmt-untouched-large-dired-buffer* 
cpio-dired-buffer-contents)))
-    (should (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after))
+    (should (and "Expecting an unchanged catalog."
+                (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after)))
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
           (cpio-dired-next-dirline 16)
@@ -14641,7 +16442,8 @@ cpio-dired-mouse-find-entry-other-window is not yet 
implemented -- expect an err
                 (string-equal *cdmt-untouched-large-archive-buffer* 
cpio-archive-buffer-contents)))
     (should (and "The dired style buffer should be untouched. (4)"
                 (string-match *cdmt-untouched-large-dired-buffer* 
cpio-dired-buffer-contents)))
-    (should (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after))
+    (should (and "Expecting an unchanged catalog."
+                (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after)))
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
           (cpio-dired-next-dirline 1)
@@ -14661,7 +16463,8 @@ cpio-dired-mouse-find-entry-other-window is not yet 
implemented -- expect an err
                 (string-equal *cdmt-untouched-large-archive-buffer* 
cpio-archive-buffer-contents)))
     (should (and "The dired style buffer should be untouched. (5)"
                 (string-match *cdmt-untouched-large-dired-buffer* 
cpio-dired-buffer-contents)))
-    (should (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after))))
+    (should (and "Expecting an unchanged catalog."
+                (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after)))))
 
 (ert-deftest cdmt-cpio-dired-next-line () ;✓
   "Test the function of M-x cpio-dired-next-line."
@@ -15208,6 +17011,7 @@ F -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|de
 \\* -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
 \\* drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
 " cpio-dired-buffer-contents)))
+    
     (should (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after))
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
@@ -15245,6 +17049,7 @@ F -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|de
 \\* -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        8 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc
 \\* drwxr-xr-x   2  [[:digit:]]+  [[:digit:]]+        0 
\\(?:a\\(?:pr\\|ug\\)\\|dec\\|feb\\|j\\(?:an\\|u[ln]\\)\\|ma[ry]\\|nov\\|oct\\|sep\\)
 [[:digit:]]\\{2\\} [[:digit:]]\\{2\\}:[[:digit:]]\\{2\\} ccccc.d
 " cpio-dired-buffer-contents)))
+
     (should (string-equal cpio-catalog-contents-before 
cpio-catalog-contents-after))
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
@@ -15385,6 +17190,7 @@ F -rw-r--r--   1  [[:digit:]]+  [[:digit:]]+        5 
\\(?:a\\(?:pr\\|ug\\)\\|de
         (cpio-dired-buffer-contents)
        (cpio-catalog-contents-before)
        (cpio-catalog-contents-after))
+
     (cdmt-reset 'make)
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
@@ -15577,6 +17383,32 @@ cpio-mouse-face is not yet implemented -- expect an 
error."
   (should-error (cpio-mouse-face)
      :type 'error))
 
+;;;;;;;; (ert-deftest cdmt-cpio-quit-window () ;✓
+;;;;;;;;   "Test cpio-quit-window.
+;;;;;;;; cpio-quit-window is not yet implemented -- expect an error."
+;;;;;;;;   (let ((test-name "cdmt-cpio-dired-quit-window")
+;;;;;;;;         (cpio-archive-buffer)
+;;;;;;;;         (cpio-archive-buffer-contents)
+;;;;;;;;         (cpio-dired-buffer)
+;;;;;;;;         (cpio-dired-buffer-contents)
+;;;;;;;;       (cpio-archive-window)
+;;;;;;;;       (cpio-dired-window)
+;;;;;;;;         )
+;;;;;;;;     (cdmt-reset 'make)
+
+;;;;;;;;     (setq cpio-dired-window (get-buffer-window (get-buffer 
cpio-dired-buffer)))
+;;;;;;;;     (should (window-live-p cpio-dired-window))
+;;;;;;;;     (setq cpio-archive-window (get-buffer-window (get-buffer 
cpio-archive-buffer)))
+;;;;;;;;     ;; (should (not (window-live-p cpio-dired-window)))
+;;;;;;;;     (should (eq nil cpio-archive-window))
+
+;;;;;;;; This causes an error under ERT.
+;;;;;;;;     (cpio-quit-window)
+
+;;;;;;;;     (setq cpio-dired-window (get-buffer-window (get-buffer 
cpio-dired-buffer)))
+;;;;;;;;     (should (eq nil cpio-dired-window))
+;;;;;;;;     (setq cpio-archive-window (get-buffer-window (get-buffer 
cpio-archive-buffer)))
+;;;;;;;;     (should (eq nil cpio-archive-window))))
 
 (ert-deftest cdmt-revert-buffer ()
   "Test revert-buffer.
@@ -15595,6 +17427,7 @@ revert-buffer is not yet implemented -- expect an 
error."
        (cpio-catalog-contents-after)
        (cpio-archive-window)
        (cpio-dired-window))
+
     (cdmt-reset 'make)
 
     (progn (setq cpio-catalog-contents-before (format "%s" (pp 
(cpio-catalog))))
@@ -16069,8 +17902,6 @@ newDirectory    (( filename ))
 ;; Run tests
 ;;
 
-;; (ert "cdmt-cpio-dired-display-entry")
-;; (ert "cdmt-cpio-dired-save-archive")
 (ert "^cdmt-")
 
 ;;; cpio-dired-test.el ends here.
diff --git a/cpio-dired.el b/cpio-dired.el
index 81f3b47..7b68bf4 100644
--- a/cpio-dired.el
+++ b/cpio-dired.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-dired.el --- UI definition à la dired.
-;      $Id: cpio-dired.el,v 1.1.4.6 2018/05/11 13:17:00 doug Exp $     
+;      $Id: cpio-dired.el,v 1.1.4.7 2018/05/11 20:13:12 doug Exp $     
 
 ;; COPYRIGHT
 
@@ -33,8 +33,11 @@
 ;;; Some design principles:
 
 ;; • UI taken from dired.
-;; • Only saving modifies the archive.
-;; • All other changes apply to the catalog.
+;; • Modifications happen to the catalog
+;;   unless there is an element
+;;   that requires modifying the archive itself.
+;;   An example that includes both the archive and catalog
+;;   is adding a file to the archive.
 
 ;;; Code:
 
@@ -48,8 +51,7 @@ Keep any preceding comments."
   (let ((fname "snarf-defuns")
        (results ())
        (start)
-       (end)
-       )
+       (end))
     (save-excursion
       (goto-char (point-min))
       (while (re-search-forward "^(defun \\([[:graph:]]+\\) " (point-max) t)
@@ -63,38 +65,33 @@ Keep any preceding comments."
          (forward-line -1))
        (push (buffer-substring-no-properties start end) results)
        (goto-char end)))
-    results
-    ))
+    results))
 
 (defun sort-defuns (defuns)
   "Return a copy of the given list of DEFUNS sorted by name."
   (let ((fname "sort-defuns")
        (sortable-list)
-       (sorted-list)
-       )
+       (sorted-list))
     (setq sortable-list
          (mapcar (lambda (d)
-                   (let ((defun-name (and (string-match "(defun 
\\([[:graph:]]+\\) " d)
-                                          (match-string 1 d)))
-                         )
+                   (let ((defun-name (save-match-data
+                                       (and (string-match "(defun 
\\([[:graph:]]+\\) " d)
+                                            (match-string 1 d)))))
                      (cons defun-name d)))
                  defuns))
     (setq sorted-list (sort sortable-list (lambda (l r)
                                            (string-lessp (car l) (car r)))))
-    (mapcar 'cdr sorted-list)
-    ))
+    (mapcar 'cdr sorted-list)))
 
 (defun sort-defuns-in-buffer ()
   "Replace the visible portion of the current buffer with its defuns, but 
sorted."
   (interactive)
   (let ((fname "sort-defuns-in-buffer")
-       (defuns (sort-defuns (snarf-defuns)))
-       )
+       (defuns (sort-defuns (snarf-defuns))))
     (delete-region (point-min) (point-max))
     (mapc (lambda (d)
            (insert d "\n"))
-         defuns)
-    ))
+         defuns)))
 
 
 ;;
@@ -102,7 +99,6 @@ Keep any preceding comments."
 ;; 
 (require 'dired-aux)
 
-
 
 ;; 
 ;; Vars
@@ -171,8 +167,7 @@ Keep any preceding comments."
                                          "\\s-+"
                                          "\\("
                                              "[[:graph:]]+"
-                                         "\\)"
-                                         )
+                                         "\\)")
   "Regular expression to match an entry's line in cpio-dired-mode")
 (setq *cpio-dired-entry-regexp* (concat ".."
                                          "\\("
@@ -198,8 +193,7 @@ Keep any preceding comments."
                                          "\\s-+"
                                          "\\("
                                              "[[:graph:]]+"
-                                         "\\)"
-                                         ))
+                                         "\\)"))
 
 (defvar *cpio-dired-mode-idx*      1
   "Index of the mode match in *cpio-dired-entry-regexp*.")
@@ -261,9 +255,9 @@ This is what the do-commands look for, and what the 
mark-commands store.")
 ;; used to search for next matches, so neither omitting "^" nor
 ;; replacing "^" by "\n" (to make it slightly faster) will work.
 
-(defvar cpio-dired-re-mark "^[^ \n]")
-;; "Regexp matching a marked line.
-;; Important: the match ends just after the marker."
+(defvar cpio-dired-re-mark "^[^ \n]"
+  "Regexp matching a marked line.
+Important: the match ends just after the marker.")
 (defvar cpio-dired-re-maybe-mark "^. ")
 ;; The [^:] part after "d" and "l" is to avoid confusion with the
 ;; DOS/Windows-style drive letters in directory names, like in "d:/foo".
@@ -351,7 +345,8 @@ This is what the do-commands look for, and what the 
mark-commands store.")
    ;;
    ;; Directory headers.
    ;;;; (list cpio-dired-subdir-regexp '(1 cpio-dired-header-face))
-)
+   
+   )
   "Additional expressions to highlight in cpio-dired mode.")
 
 (defvar cpio-entry-name ()
@@ -506,8 +501,7 @@ Run more than one instance of emacs to avoid such 
collisions."
 
 (defun cpio-dired-hide-details-update-invisibility-spec ()
   "Toggle cpio-dired-hide-details-mode."
-  (let ((fname "cpio-dired-hide-details-update-invisibility-spec")
-       )
+  (let ((fname "cpio-dired-hide-details-update-invisibility-spec"))
     (funcall (if cpio-dired-hide-details-mode
                 'add-to-invisibility-spec
               'remove-from-invisibility-spec)
@@ -527,8 +521,7 @@ Run more than one instance of emacs to avoid such 
collisions."
 (defun cpio-dired-find-entry-noselect (entry-name)
   "Read the contents of the given ENTRY-NAME, but don't display it."
   (let ((fname "cpio-dired-find-entry-noselect")
-       (target-buffer (get-buffer-create (cpio-contents-buffer-name 
entry-name)))
-       )
+       (target-buffer (get-buffer-create (cpio-contents-buffer-name 
entry-name))))
     (cond ((and target-buffer (buffer-live-p target-buffer))
           target-buffer)
          (target-buffer
@@ -541,14 +534,12 @@ Run more than one instance of emacs to avoid such 
collisions."
 
 (defun cpio-internal-do-deletions (l)
   "Delete the entries in the list L."
-  (let ((fname "cpio-internal-do-deletions")
-       )
+  (let ((fname "cpio-internal-do-deletions"))
     ;; HEREHERE Debug this.
     (if *cab-parent*
        (with-current-buffer *cab-parent*
          (cpio-internal-do-deletions l))
-      (mapc 'cpio-internal-do-deletion l))
-    ))
+      (mapc 'cpio-internal-do-deletion l))))
 
 (defun cpio-internal-do-deletion (entry-name)
   "Remove the entry with name ENTRY-NAME from a cpio-archive.
@@ -557,8 +548,7 @@ CONTRACT: You're in that archive's buffer."
         (entry-info)
         (start-marker)
         (end-marker)
-        (entry-attrs)
-       )
+        (entry-attrs))
     (if *cab-parent*
        (with-current-buffer *cab-parent*
          (cpio-internal-do-deletion entry-name))
@@ -570,17 +560,14 @@ CONTRACT: You're in that archive's buffer."
       (setq buffer-read-only nil)
       (delete-region start-marker end-marker)
       (setq buffer-read-only t)
-      (setq *cpio-catalog* (delete (assoc entry-name *cpio-catalog*) 
*cpio-catalog*))
-      )
-    ))
+      (setq *cpio-catalog* (delete (assoc entry-name *cpio-catalog*) 
*cpio-catalog*)))))
 
 (defun cpio-dired-marked-entries (char arg)
   "Return a list of entries marked with CHAR, or,
 if none are so marked, then the next ARG entries."
   (let ((fname "cpio-dired-marked-entries")
        (files ())
-       (i 0)
-       )
+       (i 0))
     (save-excursion
       (goto-char (point-min))
       (while (re-search-forward (format "^\\%c" char) (point-max) t)
@@ -591,8 +578,7 @@ if none are so marked, then the next ARG entries."
          (push (cpio-dired-get-entry-name) files)
          (cpio-dired-next-line 1)
          (setq i (1+ i)))))
-    files
-    ))
+    files))
 
 (defun cpio-dired-add-contents (attrs contents &optional cpio-dired-buffer)
   "Add an entry to a cpio archive using the given ATTRS with the given 
CONTENTS.
@@ -606,8 +592,7 @@ to make the recursive call this function inside the archive 
buffer sensible."
        (entry-name (cpio-entry-name attrs))
        (new-catalog-entry)
        (header-start-marker)
-       (contents-start-marker)
-       )
+       (contents-start-marker))
     (if *cab-parent*
        (with-current-buffer *cab-parent*
          (cpio-dired-add-contents attrs contents cpio-dired-buffer))
@@ -640,16 +625,14 @@ to make the recursive call this function inside the 
archive buffer sensible."
          (goto-char (point-max))
          (setq buffer-read-only nil)
          (insert (cpio-dired-format-entry attrs) "\n")
-         (setq buffer-read-only t))))
-    ))
+         (setq buffer-read-only t))))))
 
 (defun cpio-dired-get-marked-entries (&optional arg) ;✓
   "Return a list of the marked entries in the current cpio-dired buffer."
   (let ((fname "cpio-dired-get-marked-entries")
        (results ())
        (regexp (cpio-dired-marker-regexp))
-       (i 0)
-       )
+       (i 0))
     (unless (string-equal mode-name "cpio-dired")
       (error "%s() only makes sense in a cpio-dired buffer." fname))
     ;; Marks win over ...
@@ -670,50 +653,6 @@ to make the recursive call this function inside the 
archive buffer sensible."
          results
        (list (cpio-dired-get-entry-name)))))
 
-;; HEREHERE (cpio-dired-get-marked-entries) is defined twice.
-(defun OBS-cpio-dired-get-marked-entries (&optional arg filter 
distinguish-one-marked)
-  "Return the marked entries' names as a list of strings.
-The list is in the same order as the buffer, that is, the car is the
-  first marked entry.
-Values returned are the entry names as they appear in the archive.
-Optional argument ARG, if non-nil, specifies files near
- point instead of marked files.  It usually comes from the prefix
- argument.
-  If ARG is an integer, use the next ARG files.
-  If ARG is any other non-nil value, return the current file name.
-  If no files are marked, and ARG is nil, also return the current file name.
-Optional third argument FILTER, if non-nil, is a function to select
-  some of the files--those for which (funcall FILTER FILENAME) is non-nil.
-
-If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
-return (t FILENAME) instead of (FILENAME).
-Don't use that together with FILTER."
-  (let ((fname "cpio-dired-get-marked-entries")
-       (results ()))
-    (cond ((and (integerp arg)
-               (> arg 0))
-          (save-excursion
-            (while (< 0 arg)
-              (cpio-dired-next-line 1)
-              (push (cpio-dired-get-entry-name) results)
-              (setq arg (1- arg))))
-          (if (and distinguish-one-marked
-                   (= 1 (length results)))
-              (list t (car results))
-            (nreverse results)))
-         (arg
-          (cpio-dired-get-entry-name))
-         (t
-          (save-excursion
-            (goto-char (point-min))
-            (forward-line 2)
-            (while (re-search-forward "^\*" (point-max) t)
-              (push (cpio-dired-get-entry-name) results)))
-          (if (and distinguish-one-marked
-                   (= 1 (length results)))
-              (list t (car results))
-            (nreverse results))))))
-
 (defun cpio-dired-internal-do-copy (entry target) ;✓
   "Copy the ENTRIES to the TARGET entry.
 CONTRACT: TARGET is the actual TARGET name, not an implied directory entry."
@@ -731,32 +670,27 @@ CONTRACT:
   ;; HEREHERE This has some overlap with (cpio-dired-internal-do-copy).
   (let ((fname "cpio-dired-internal-do-rename")
        (entry (cpio-entry entry-name))
-       (attrs (cpio-entry-attrs entry-name))
-       ;;; (contents (cpio-contents entry-name)))
-       )
+       (attrs (cpio-entry-attrs entry-name)))
     (unless (eq major-mode 'cpio-dired-mode)
       (error "%s(): You're not in a cpio-dired buffer." fname))
     (cpio-set-entry-name attrs target)
     (with-current-buffer *cab-parent*
       (setcar (assoc entry-name *cpio-catalog*) target))
-    ;;; (cpio-dired-add-contents attrs contents)
-    ;;; (cpio-delete-archive-entry entry)
     (save-excursion
       (goto-char (point-min))
       (re-search-forward (concat " \\(" entry-name "\\)$"))
       (setq buffer-read-only nil)
-      ;;; (delete-region (match-beginning 1) (match-end 0))
       (replace-match target 'fixedcase 'literal nil 1)
-      (setq buffer-read-only t)
-      )
-    (cpio-dired-move-to-entry-name)
-    ))
+      (setq buffer-read-only t))
+    (cpio-dired-move-to-entry-name)))
 
 (defun cpio-dired-mark-read-regexp (operation)
   "Read a regular expression to match entries for the given OPERATION."
     (let* ((fname "cpio-dired-mark-read-regexp")
-          (regexp (read-from-minibuffer
-                   (format "s%s entries matching regexp: " operation)))
+          (regexp (read-regexp
+                   (format "%s on entries matching regexp: " operation)
+                   nil
+                   'dired-regexp-history))
           (mark-char (cond ((string-equal operation "Copy")
                             cpio-dired-keep-marker-copy)
                            ((string-equal operation "Rename")
@@ -770,37 +704,32 @@ CONTRACT:
        (gpoto-char (point-min))
        (while (re-search-forward *cpio-dired-entry-regexp* (point-max) t)
          (setq entry-name (cpio-dired-get-entry-name))
-         (if (string-match regexp entry-name)
+         (if (string-match-p regexp entry-name)
              (cpio-dired-mark-this-entry mark-char))))))
 
-
 (defun cpio-dired-replace-dired-line (entry-name)
   "Replace the entry for the given ENTRY-NAME
 with information from the current catalog."
   (let ((fname "cpio-dired-replace-dired-line")
        (attrs (cpio-entry-attrs entry-name))
-       (mark)
-       )
+       (mark))
     (save-excursion
       (cpio-move-to-entry entry-name)
       (setq mark (string-to-char (buffer-substring (line-beginning-position) 
(1+ (line-beginning-position)))))
       (cpio-dired-delete-dired-line entry-name)
       (setq buffer-read-only nil)
       (insert (cpio-dired-format-entry attrs mark))
-      (setq buffer-read-only t))
-    ))
+      (setq buffer-read-only t))))
 
 (defun cpio-dired-delete-dired-line (entry-name)
   "Delete the line of ENTRY-NAME not including the new line."
-  (let ((fname "cpio-dired-delete-dired-line")
-       )
+  (let ((fname "cpio-dired-delete-dired-line"))
     (unless (eq major-mode 'cpio-dired-mode)
       (error "%s(): You're not in a cpio-dired-buffer." fname))
     (cpio-move-to-entry entry-name)
     (setq buffer-read-only nil)
     (delete-region (line-beginning-position) (line-end-position))
-    (setq buffer-read-only t)
-    ))
+    (setq buffer-read-only t)))
 
 ;;
 ;; Commands
@@ -834,9 +763,8 @@ then use the current buffer."
         (header-start-marker)
         (contents-start-marker)
         (header-string)
-        (cpio-dired-buffer (or cpio-dired-buffer (current-buffer)))
-        )
-    (if (string-match "^~/" filename)
+        (cpio-dired-buffer (or cpio-dired-buffer (current-buffer))))
+    (if (string-match-p "^~/" filename)
        (setq filename (expand-file-name filename)))
     (cond (*cab-parent*
           (unless (eq major-mode 'cpio-dired-mode)
@@ -868,8 +796,7 @@ then use the current buffer."
           (with-current-buffer cpio-dired-buffer
             (setq buffer-read-only nil)
             (delete-region (line-beginning-position) (1+ (line-end-position)))
-            (setq buffer-read-only t))))
-    ))
+            (setq buffer-read-only t))))))
 
 ;; * c         dired-change-marks
 (defun cpio-dired-change-marks (old new) ;✓✓
@@ -922,8 +849,7 @@ prefix arg and marked entries are ignored in this case.
 You can then feed the entry name(s) to other commands with C-y."
   (interactive "p")
   (let ((fname "cpio-dired-copy-entry-name-as-kill")
-       (names (reverse (cpio-dired-get-marked-entries arg)))
-       )
+       (names (reverse (cpio-dired-get-marked-entries arg))))
     (unless (eq major-mode 'cpio-dired-mode)
       (error "%s(): You're not in a cpio dired buffer." fname))
     (if names
@@ -935,11 +861,6 @@ You can then feed the entry name(s) to other commands with 
C-y."
          (setq arg (1- arg))
          (forward-line 1))))))
 
-;; (defvar cpio-dired-hide-details-link nil
-;;   ;; I can't tell what this should be.
-;;   ;; The corresponding thing in dired-mode doesn't seem to defined.
-;;   "")
-
 ;; *           Prefix Command
 
 ;; +           dired-create-directory
@@ -952,8 +873,7 @@ This respects umask(1) as available through 
(default-file-modes)."
        (new-catalog-entry)
        (attrs)
        (header-string)
-       (cat-entry)
-       )
+       (cat-entry))
     (cond (*cab-parent*
           (unless (eq major-mode 'cpio-dired-mode)
             (error "%s(): You're not in a cpio dired buffer." fname))
@@ -980,8 +900,7 @@ This respects umask(1) as available through 
(default-file-modes)."
           (setq buffer-read-only nil)
           (insert header-string)
           (setq buffer-read-only t)
-          (cpio-mode)))
-    ))
+          (cpio-mode)))))
 
 ;; =           dired-diff
 (defun cpio-dired-diff (entry &optional switches) ;✓
@@ -1103,20 +1022,15 @@ in the buffer containing the archive."
                             ()))
        (local-group (if group
                         group
-                      (read-from-minibuffer "Group? "
-                                            nil
-                                            nil
-                                            nil
-                                            *cpio-dired-do-chgrp-history*
-                                            nil
-                                            nil)))
+                      (read-string "Group? "
+                                   nil
+                                   *cpio-dired-do-chgrp-history*)))
        (local-cpio-dired-buffer (if cpio-dired-buffer
                                     cpio-dired-buffer
                                   (current-buffer)))
        (i 0)
        (entry)
-       (attrs)
-       )
+       (attrs))
     (unless (or (eq major-mode 'cpio-dired-mode)
                (eq major-mode 'cpio-mode))
       (error "%s(): major mode is [[%s]]." fname (symbol-name major-mode))
@@ -1151,10 +1065,8 @@ in the buffer containing the archive."
                       (delete-region (line-beginning-position)
                                      (line-end-position))
                       (insert (cpio-dired-format-entry attrs))
-                      (setq buffer-read-only t)))
-                  )
-                entry-names)))
-    ))
+                      (setq buffer-read-only t))))
+                entry-names)))))
 
 ;; M           dired-do-chmod
 (defun cpio-dired-do-chmod (&optional arg)     ;✓✓✓
@@ -1184,8 +1096,7 @@ into the minibuffer."
                         (match-string 3 mode-string)))))
         (modes (dired-mark-read-string
                 "Change mode of %s to: "
-                nil 'chmod arg entries default))
-        )
+                nil 'chmod arg entries default)))
     (cond ((or (equal mode-string "")
               (equal mode-string default-mode-value))
           (error "%s(): No entry mode specified." fname))
@@ -1195,8 +1106,7 @@ into the minibuffer."
     (dolist (entry entries)
       (setq entry-type (cpio-numeric-entry-type (cpio-mode-value 
(cpio-entry-attrs entry))))
       (cpio-set-mode (cpio-entry-attrs entry) (logior entry-type 
cpio-mode-value))
-      (cpio-dired-replace-dired-line entry))
-    ))
+      (cpio-dired-replace-dired-line entry))))
 
 ;; O           dired-do-chown
 (defun cpio-dired-do-chown (arg &optional entry-names owner cpio-dired-buffer) 
;✓
@@ -1213,20 +1123,15 @@ into the minibuffer."
                             ()))
        (local-owner (if owner
                         owner
-                      (read-from-minibuffer "Owner? "
-                                            nil
-                                            nil
-                                            nil
-                                            *cpio-dired-do-chown-history*
-                                            nil
-                                            nil)))
+                      (read-string "Owner? "
+                                   nil
+                                   *cpio-dired-do-chown-history*)))
        (local-group)
        (local-cpio-dired-buffer (if cpio-dired-buffer
                                     cpio-dired-buffer))
        (i 0)
        (entry)
-       (attrs)
-       )
+       (attrs))
     (unless (or (eq major-mode 'cpio-dired-mode)
                (eq major-mode 'cpio-mode))
       (error "%s(): You're in neither a cpio-dired buffer nor a buffer in 
cpio-mode ." fname))
@@ -1252,7 +1157,7 @@ into the minibuffer."
             (signal 'void-variable owner))
           (unless cpio-dired-buffer
             (signal 'void-variable cpio-dired-buffer))
-          (cond ((string-match ":" owner)
+          (cond ((string-match-p ":" owner)
                  (setq local-owner (nth 0 (split-string owner ":")))
                  (setq local-group (nth 1 (split-string owner ":"))))
                 (t t))
@@ -1278,10 +1183,8 @@ into the minibuffer."
                       (delete-region (line-beginning-position)
                                      (line-end-position))
                       (insert (cpio-dired-format-entry attrs))
-                      (setq buffer-read-only t)))
-                  )
-                entry-names)))
-    ))
+                      (setq buffer-read-only t))))
+                entry-names)))))
 
 ;; Z           dired-do-compress
 (defun cpio-dired-do-compress (arg)    ;×
@@ -1303,15 +1206,10 @@ that that target should be a directory."
   (let ((fname "cpio-dired-do-copy")
        (entries (cpio-dired-marked-entries cpio-dired-marker-char arg))
        (target)
-       (target-attrs)
-       )
-    (setq target (read-from-minibuffer "Target? "
-                                      nil
-                                      nil
-                                      nil
-                                      *cpio-dired-copy-history*
-                                      nil
-                                      nil))
+       (target-attrs))
+    (setq target (read-string "Target? "
+                             nil
+                             *cpio-dired-copy-history*))
     (cpio-delete-trailer)
     (cond ((> (length entries) 1)
           (setq target (strip-right "/" target 'multiples))
@@ -1341,9 +1239,7 @@ that that target should be a directory."
          (t
           (mapc (lambda (en)
                   (cpio-dired-internal-do-copy en target))
-                entries)))
-    ;; (cpio-insert-trailer) -- only on save.
-    ))
+                entries)))))
 
 ;; % C         dired-do-copy-regexp
 (defun cpio-dired-do-copy-regexp (regexp newname &optional arg whole-name) ;×
@@ -1360,20 +1256,18 @@ Marks win over ARG."
   (interactive "p")
   (let ((fname "cpio-dired-do-delete")
        (entries (cpio-dired-marked-entries cpio-dired-marker-char arg))
-       (i 0)
-       )
+       (i 0))
     (unless (eq major-mode 'cpio-dired-mode)
       (error "%s(): You're not in a cpio-dired buffer." fname))
-    ;; OK, which of these two approaches do I prefer?
-    ;; (mapc 'cpio-do-this-deletion files)
     (mapc (lambda (en)
            (save-excursion
              (goto-char (point-min))
-             ;; This search is guaranteed to succeed because of the 
construction of ENTRIES.
-             (re-search-forward (concat " " en "$"))
+             (re-search-forward (concat " " en "$") (point-max) t)
+
              (setq buffer-read-only nil)
              (delete-region (line-beginning-position) (1+ (line-end-position)))
              (setq buffer-read-only t)
+
              (cpio-internal-do-deletion en)))
          entries)
     (cpio-dired-set-modified)
@@ -1388,8 +1282,7 @@ if there are no flagged entries.
 non-empty directories is allowed."
   (interactive)
   (let ((fname "cpio-dired-do-flagged-delete")
-       (entries (cpio-dired-marked-entries cpio-dired-del-marker 1))
-       )
+       (entries (cpio-dired-marked-entries cpio-dired-del-marker 1)))
     (unless (eq major-mode 'cpio-dired-mode)
       (error "%s(): You're not in a cpio-dired buffer." fname))
     (if (and (null entries)
@@ -1406,8 +1299,7 @@ non-empty directories is allowed."
                    (t t)))
            (cpio-internal-do-deletion en))
          entries)
-    (cpio-dired-set-modified)
-    ))
+    (cpio-dired-set-modified)))
 
 ;; H           dired-do-hardlink
 (defun cpio-dired-do-hardlink (arg)    ;×
@@ -1522,16 +1414,10 @@ of `dired-dwim-target', which see."
   (let ((fname "cpio-dired-do-rename")
        (entries (cpio-dired-marked-entries cpio-dired-marker-char arg))
        (target)
-       (target-attrs)
-       )
-    (setq target (read-from-minibuffer "Target? "
-                                      nil
-                                      nil
-                                      nil
-                                      *cpio-dired-do-rename-history*
-                                      nil
-                                      nil))
-    ;; (cpio-delete-trailer)
+       (target-attrs))
+    (setq target (read-string "Target? "
+                             nil
+                             *cpio-dired-do-rename-history*))
     (cond ((> (length entries) 1)
           (setq target (strip-right "/" target 'multiples))
           ;; First handle the case where the entry exists and looks like a 
directory.
@@ -1563,8 +1449,7 @@ of `dired-dwim-target', which see."
           (mapc (lambda (en)
                   (cpio-dired-internal-do-rename en target))
                 entries))
-                 (cpio-dired-set-modified))
-    ))
+         (cpio-dired-set-modified))))
 
 ;; % R         dired-do-rename-regexp
 ;; % r         dired-do-rename-regexp
@@ -1726,12 +1611,10 @@ Type M-n to pull the entry attributes of the entry at 
point
 into the minibuffer."
   (interactive "p")
   (let* ((fname "cpio-dired-do-touch")
-        (names (cpio-dired-get-marked-entries arg))
-        )
+        (names (cpio-dired-get-marked-entries arg)))
     (error "%s() is not yet implemented" fname)))
 
 
-
 ;; % l         dired-downcase
 (defun cpio-dired-downcase (arg)       ;×
   "Rename all marked (or next ARG) entries to lower case."
@@ -1742,8 +1625,7 @@ into the minibuffer."
 (defun cpio-dired-extract-all ()       ;✓
   "Extract all the entries in the current CPIO arhcive."
   (interactive)
-  (let ((fname "cpio-dired-extract-all")
-       )
+  (let ((fname "cpio-dired-extract-all"))
     (unless (or (eq major-mode 'cpio-dired-mode)
                (eq major-mode 'cpio-mode))
       (error "%s() only makes sense in a cpio-dired buffer." fname))
@@ -1758,8 +1640,7 @@ into the minibuffer."
   (interactive "p")
   (let ((fname "cpio-dired-extract-entries")
        (files (or (cpio-dired-get-marked-entries)
-                  (list (cpio-dired-get-entry-name))))
-       )
+                  (list (cpio-dired-get-entry-name)))))
     (unless (or (eq major-mode 'cpio-dired-mode)
                (eq major-mode 'cpio-mode))
       (error "%s() only makes sense in a cpio-dired buffer." fname))
@@ -1802,19 +1683,17 @@ Return the buffer containing those contents."
   "Flag for deletion entries whos names suggest they are auto save entries.
 A prefix argument says to unmark or unflag those files instead."
   (interactive)
-  (let ((fname "cpio-dired-flag-auto-save-entries")
-       )
+  (let ((fname "cpio-dired-flag-auto-save-entries"))
     (unless (eq major-mode 'cpio-dired-mode)
       (error "%s(): You're not in a cpio-dired style buffer." fname))
     (save-excursion
       (cpio-dired-move-to-first-entry)
       (while (< (point) (point-max))
-       (if (string-match "\\`#" (cpio-dired-get-entry-name))
+       (if (string-match-p "\\`#" (cpio-dired-get-entry-name))
            (if unflag-p
                (cpio-dired-unmark)
              (cpio-dired-mark-this-entry cpio-dired-del-marker))
-         (cpio-dired-next-line 1))))
-    ))
+         (cpio-dired-next-line 1))))))
 
 ;; ~           dired-flag-backup-entries
 (defun cpio-dired-flag-backup-entries (arg) ;×
@@ -1849,10 +1728,9 @@ in the active region."
        (cpio-dired-marker-char cpio-dired-del-marker))
     (cpio-dired-mark arg)))
 
-;; 
 ;; M-s a               Prefix Command
 ;; M-s f               Prefix Command
-;; 
+
 ;; % &         dired-flag-garbage-entries
 (defvar cpio-dired-garbage-entries-regexp dired-garbage-files-regexp
   "Regular expression to match in cpio-dired-flag-garbage-entries.")
@@ -1860,14 +1738,13 @@ in the active region."
   "Flag for deletion all entries that match 
`cpio-dired-garbage-entries-regexp'."
   (interactive)
   (let ((fname "cpio-dired-flag-garbage-entries")
-       (entry-name)
-       )
+       (entry-name))
     (save-excursion
       (cpio-dired-move-to-first-entry)
       (save-match-data
        (while (< (point) (point-max))
          (setq entry-name (cpio-dired-get-entry-name))
-         (if (string-match cpio-dired-garbage-entries-regexp entry-name)
+         (if (string-match-p cpio-dired-garbage-entries-regexp entry-name)
              (cpio-dired-flag-entry-deletion 1)
            (dired-next-line 1)))))))
 
@@ -1876,8 +1753,7 @@ in the active region."
   "Go to line describing entry ENTRY in this Dired buffer."
   (interactive "sGoto entry: ")
   (let ((fname "cpio-dired-goto-entry")
-       (this-entry)
-       )
+       (this-entry))
     (unless (eq major-mode 'cpio-dired-mode)
       (error "%s(): You're not in a cpio-dired buffer." fname))
     (unless (cpio-entry-exists-p entry)
@@ -1927,8 +1803,7 @@ Use M-x dired-hide-all to (un)hide all directories."
 along with it's corresponding archive buffer
 and any affiliated buffers thereof."
   (interactive)
-  (let ((fname "cpio-dired-kill")
-       )
+  (let ((fname "cpio-dired-kill"))
     (if *cab-parent*
        (cond ((buffer-live-p *cab-parent*)
               (if (and (called-interactively-p)
@@ -1942,8 +1817,7 @@ and any affiliated buffers thereof."
               (warn "%s(): Archive buffer [[%s]] is not there." fname 
(file-name-nondirectory (buffer-file-name *cab-parent*)))
               (remove-hook 'kill-buffer-hook 'cab-kill-buffer-hook)
               (kill-buffer)))
-      (kill-buffer))
-    ))
+      (kill-buffer))))
 
 ;; m           dired-mark
 (defun cpio-dired-mark (arg &optional interactive) ;✓
@@ -2016,30 +1890,9 @@ object entries--just `.o' will mark more than you might 
think."
       (cpio-dired-move-to-first-entry)
       (while (< (point) (point-max))
        (setq entry-name (cpio-dired-get-entry-name))
-       (if (string-match regexp entry-name)
+       (if (string-match-p regexp entry-name)
            (cpio-dired-mark 1 marker-char)
          (cpio-dired-next-line 1))))))
-(defun OBS-cpio-dired-mark-entries-regexp (regexp &optional marker-char)
-  "Mark all files matching REGEXP for use in later commands.
-A prefix argument means to unmark them instead.
-
-REGEXP is an Emacs regexp, not a shell wildcard.  Thus, use `\\.o$' for
-object files--just `.o' will mark more than you might think."
-  (interactive "sRegular expression: ")
-  (unless marker-char (setq marker-char cpio-dired-marker-char))
-  (let ((fname "cpio-dired-mark-entries-regexp")
-       (entry-name)
-       )
-    (unless (eq major-mode 'cpio-dired-mode)
-      (error "%s(): You're not in a cpio-dired buffer." fname))
-    (save-excursion
-      (goto-char (point-min))
-      (cpio-dired-next-line *cpio-dired-head-offset*)
-      (while (< (point) (point-max))
-       (setq entry-name (cpio-dired-get-entry-name))
-       (if (string-match regexp entry-name)
-           (cpio-dired-mark-this-entry marker-char))
-       (cpio-dired-next-line 1)))))
 
 ;; * *         dired-mark-executables
 (defun cpio-dired-mark-executables (arg) ;✓✓✓
@@ -2047,8 +1900,7 @@ object files--just `.o' will mark more than you might 
think."
 With prefix argument, unmark or unflag all those entries."
   (interactive "P")
   (let ((fname "cpio-dired-mark-executables")
-       (this-mode)
-       )
+       (this-mode))
     (save-excursion
       (cpio-dired-move-to-first-entry)
       (while (< (point) (point-max))
@@ -2076,15 +1928,13 @@ marks the entries listed in the subdirectory that point 
is in."
            (cpio-dired-mark-this-entry)
          (cpio-dired-next-line 1))))))
 
-
 ;; * @         dired-mark-symlinks
 (defun cpio-dired-mark-symlinks (unflag-p) ;✓✓✓
   "Mark all symbolic links.
 With prefix argument, unmark or unflag all those entries."
   (interactive "P")
   (let ((fname "cpio-dired-mark-symlinks")
-       (this-mode)
-       )
+       (this-mode))
     (save-excursion
       (cpio-dired-move-to-first-entry)
       (while (< (point) (point-max))
@@ -2129,10 +1979,8 @@ 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."
   (interactive)
-  (let ((fname "cpio-dired-maybe-insert-subdir")
-       )
-    (error "%s() is not yet implemented" fname)
-    ))
+  (let ((fname "cpio-dired-maybe-insert-subdir"))
+    (error "%s() is not yet implemented" fname)))
 
 ;; <follow-link>       mouse-face
 ;; <mouse-2>   dired-mouse-find-file-other-window
@@ -2274,8 +2122,7 @@ one.  If non-nil, reset `quit-restore' parameter to nil."
 (defun cpio-dired-save-archive ()      ;✓
   "Save the archive associated with this cpio-dired buffer."
   (interactive)
-  (let ((fname "cpio-dired-save-archive")
-       )
+  (let ((fname "cpio-dired-save-archive"))
     (unless (or (eq major-mode 'cpio-dired-mode)
                (eq major-mode 'cpio-mode))
       (error "%s(): You can only save an archive from a cpio-dired buffer." 
fname))
@@ -2288,14 +2135,13 @@ one.  If non-nil, reset `quit-restore' parameter to 
nil."
           (setq buffer-read-only nil)
           (mapc (lambda (cen)          ;(cons name entry-contents)
                   (let* ((entry-info (cdr cen))
-                         (attrs (aref entry-info 0))
+                         (attrs (aref entry-info 
*cpio-catalog-entry-attrs-idx*))
                          (header-start (marker-position
                                         (aref entry-info 1)))
                          (header-end   (marker-position
                                         (aref entry-info 2)))
                          (header-string (cpio-make-header-string
-                                         attrs))
-                         )
+                                         attrs)))
                     (goto-char header-start)
                     (delete-region header-start header-end)
                     (set-marker (aref entry-info 1) (point)) ;Redundant?
@@ -2305,20 +2151,18 @@ one.  If non-nil, reset `quit-restore' parameter to 
nil."
                     (set-marker (aref entry-info 2) (point))
                     (forward-char (cpio-entry-size attrs))
                     (while (looking-at-p "\0")
-                      (delete-char 1))
-                  ))
+                      (delete-char 1))))
                 ;; Do the adjustments backwards to ensure that the resulting 
markers are correct.
                 (reverse *cpio-catalog*))
           ;; Adjust all the entry padding.
           (mapcar (lambda (cen)
             (let* ((entry-info (cdr cen))
-                   (attrs (aref entry-info 0))
-                   (header-start (marker-position (aref entry-info 1)))
-                   (entry-start  (marker-position (aref entry-info 2)))
+                   (attrs                         (aref entry-info 
*cpio-catalog-entry-attrs-idx*))
+                   (header-start (marker-position (aref entry-info 
*cpio-catalog-entry-header-start-idx*)))
+                   (entry-start  (marker-position (aref entry-info 
*cpio-catalog-entry-contents-start-idx*)))
                    (header-string (cpio-make-header-string attrs))
                    (local-where)
-                   (padding-length)
-                   )
+                   (padding-length))
               (goto-char (+ entry-start (cpio-entry-size attrs)))
               (setq local-where (mod (1- (point))
                                      *cpio-padding-modulus*))
@@ -2383,7 +2227,6 @@ Otherwise, toggle `read-only-mode'."
   (let ((fname "cpio-dired-toggle-read-only"))
     (error "%s() is not yet implemented" fname)))
 
-;; 
 ;; C-M-d               dired-tree-down
 (defun cpio-dired-tree-down ()         ;×
   "Go down in the dired tree."
@@ -2439,8 +2282,7 @@ With prefix arg, query for each marked file.
 Type C-h at that time for help."
   (interactive "sRemove marks (RET means all): \nP")
   (let ((fname "cpio-dired-unmark-all-entries")
-       entry
-       )
+       entry)
     (unless (eq major-mode 'cpio-dired-mode)
       (error "%s(): You're not in a cpio-dired buffer." fname))
     (cond ((string-equal mark "")
@@ -2462,8 +2304,7 @@ Type C-h at that time for help."
                          (delete-char 1)
                          (insert " "))))
               (cpio-dired-next-line 1))
-            (setq buffer-read-only t))))
-    ))
+            (setq buffer-read-only t))))))
 
 ;; * !         dired-unmark-all-marks
 ;; U           dired-unmark-all-marks
@@ -2481,8 +2322,7 @@ Type C-h at that time for help."
        (delete-char 1)
        (insert " ")
        (cpio-dired-next-line 1))
-      (setq buffer-read-only t))
-    ))
+      (setq buffer-read-only t))))
 
 ;; DEL         dired-unmark-backward
 ;; * DEL               dired-unmark-backward
@@ -2623,7 +2463,7 @@ previous -ARG, if ARG<0) entries."
   "Display thumbnails of all marked entries, in `image-dired-thumbnail-buffer'.
 If a thumbnail image does not exist for a entry, it is created on the
 fly.  With prefix argument ARG, display only thumbnail for entry at
-point (this is useful if you have marked some entries but want to show
+apoint (this is useful if you have marked some entries but want to show
 another one).
 
 Recommended usage is to split the current frame horizontally so that
@@ -2659,10 +2499,7 @@ thumbnail buffer to be selected."
 
 ;; C-t f               image-dired-mark-tagged-entries
 (defun cpio-image-dired-mark-tagged-entries () ;×
-  ;; M-x image-dired-mark-tagged-entries is not defined:
-  ;;     image-dired-mark-tagged-entries is an alias for 
`image-dired-mark-tagged-entries',
-  ;;     which is not defined.  Please make a bug report.
-  ;; What should I do with this?
+  ;; HREHERE What should I do with this?
   "Use regexp to mark entries with matching tag.
 A `tag' is a keyword, a piece of meta data, associated with an
 image entry and stored in image-dired's database entry.  This command
@@ -2722,8 +2559,7 @@ The default function runs the hooks `before-revert-hook' 
and
              (cpio-revert-buffer))
          (find-file (buffer-file-name *cab-parent*))
          (cpio-mode))
-      (cpio-mode))
-    ))
+      (cpio-mode))))
 
 ;; S-SPC               scroll-down-command
 (defun cpio-scroll-down-command (arg)  ;×
@@ -2785,8 +2621,7 @@ If ARG is the atom `-', scroll upward by nearly full 
screen."
   (cond ((re-search-forward *cpio-dired-entry-regexp* (point-max) t)
         (cpio-dired-move-to-entry-name)
         (make-local-variable 'revert-buffer-function)
-        (setq revert-buffer-function 'cpio-revert-buffer)
-        )
+        (setq revert-buffer-function 'cpio-revert-buffer))
        (t t)))
 
 (defun cpio-dired-make-keymap ()
@@ -3083,19 +2918,7 @@ If ARG is the atom `-', scroll upward by nearly full 
screen."
       (define-key cpio-dired-mode-map (kbd "C-x C-s") 
'cpio-dired-save-archive) ;✓
       ;; HEREHERE Uncomment this after development
       ;; (setq *cpio-have-made-keymap)
-      )
-    ))
-
-;; (defvar *cpio-dired-del-marker* ?D
-;;   "Marker for flagging entries for deletion in cpio-dired-mode.")
-;; (defun cpio-dired-flag-auto-save-entries (&optional unflag-p)
-;;   "Flag for deletion entries whose names suggest they correspond to auto 
save files."
-;;   (interactive "P")
-;;   (let ((fname "cpio-dired-flag-auto-save-entries")
-;;     (cpio-dired-marker-char (if unflag-p ?\040 *cpio-dired-del-marker*)
-;;     )
-;;     (error "%s() is not yet implemented" fname)
-;;     ))
+      )))
 
 (cpio-dired-make-keymap)
 
diff --git a/cpio-entry-contents-mode.el b/cpio-entry-contents-mode.el
index 8a45edf..bfec20a 100644
--- a/cpio-entry-contents-mode.el
+++ b/cpio-entry-contents-mode.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-entry-contents-mode.el --- minor mode for editing a cpio-entry's 
contents.
-;      $Id: cpio-entry-contents-mode.el,v 1.1.4.3 2018/04/26 14:15:31 doug Exp 
$       
+;      $Id: cpio-entry-contents-mode.el,v 1.1.4.4 2018/05/11 20:13:13 doug Exp 
$       
 ;; COPYRIGHT
 ;; 
 ;; Copyright © 2017, 2018 Douglas Lewan, address@hidden
@@ -126,23 +126,6 @@ prepared for editing."
 
 (cpio-entry-contents-make-keymap)
 
-;; (defvar cpio-entry-contents-mode nil
-;;   "Variable to turn cpio-entry-contents-mode on or off.")
-;; (make-variable-buffer-local 'cpio-entry-contents-mode)
-;; 
-;; (defun cpio-entry-contents-mode (&optional prefix)
-;;   "Set up the current buffer as a buffer subordinate to a buffer holding a 
cpio archive.
-;; When called without an argument turn cpio-entry-contents-mode on."
-;;   (interactive (list (or current-prefix-arg 'toggle)))
-;;   (let ((fname "cpio-entry-contents-mode")
-;;     (enable (if (eq prefix 'toggle)
-;;                 (not cpio-entry-contents-mode)
-;;               (> (prefix-numeric-value prefix) 0))))
-;;     (cpio-entry-contents-make-keymap)
-;;     (if enable
-;;     (setq cpio-entry-contents-mode t)
-;;       (setq cpio-entry-contents-mode nil))))
-
 
 (provide 'cpio-entry-contents-mode)
 ;;; cpio-entry-contents-mode.el ends here
diff --git a/cpio-generic-tests.el b/cpio-generic-tests.el
index 6fa586d..7abfaf0 100644
--- a/cpio-generic-tests.el
+++ b/cpio-generic-tests.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-generic-tests.el --- tests of cpio-generic.el
-;      $Id: cpio-generic-tests.el,v 1.1.4.4 2018/04/26 14:15:31 doug Exp $     
+;      $Id: cpio-generic-tests.el,v 1.1.4.5 2018/05/11 20:13:13 doug Exp $     
 
 ;; COPYRIGHT
 ;; 
@@ -131,9 +131,10 @@
 
 
 ;; 
-;; Mode definition (IF APPROPRIATE)
+;; Run tests.
 ;; 
 
+(ert "^cpio-generic-drwx-test$")
 
 
 (provide 'cpio-generic-test)
diff --git a/cpio-generic.el b/cpio-generic.el
index b6b4894..e0c288a 100644
--- a/cpio-generic.el
+++ b/cpio-generic.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-generic.el --- generically useful functions created in support of 
CPIO mode.
-;      $Id: cpio-generic.el,v 1.1.4.5 2018/04/26 14:15:31 doug Exp $   
+;      $Id: cpio-generic.el,v 1.1.4.6 2018/05/11 20:13:13 doug Exp $   
 
 ;; COPYRIGHT
 ;; 
@@ -51,60 +51,13 @@
 ;; 
 ;; Vars
 ;; 
-(defvar *integer-size* nil)
-(setq *integer-size* nil)
 
 (defvar *integer-hex-digits* nil)
 
-
 (defvar *debugger-re* "^\\s-*(message \"%s(): \\([[:digit:]]+\\)\" fname)$"
   "RE to match a debugger created by M-x insert-debugger.")
 (setq *debugger-re* "^\\s-*(message \"%s(): \\([[:digit:]]+\\)\" fname)")
 
-;; 
-;; Bit definitions from sys/bits.h
-;; CAVEAT: According to the info on file attributes in the info for libc
-;; you can't depend on the bit values being portable to other OSes.
-;; Is there a reasonable way to autoconfiscate this?
-;; 
-;; /* File types.  */
-;; #define     __S_IFDIR       0040000 /* Directory.  */
-(defvar *cpio-directory-bits* (lsh #o4 12))
-;; #define     __S_IFCHR       0020000 /* Character device.  */
-(defvar *cpio-char-device-bits* (lsh #o2 12))
-;; #define     __S_IFBLK       0060000 /* Block device.  */
-(defvar *cpio-blk-device-bits* (lsh #o6 12))
-;; #define     __S_IFREG       0100000 /* Regular file.  */
-(defvar *cpio-regular-file-bits* (lsh #o1 15))
-;; #define     __S_IFIFO       0010000 /* FIFO.  */
-(defvar *cpio-fifo-bits* (lsh #o1 12))
-;; #define     __S_IFLNK       0120000 /* Symbolic link.  */
-(defvar *cpio-symlink-bits* (lsh #o12 12))
-;; #define     __S_IFSOCK      0140000 /* Socket.  */
-(defvar *cpio-socket-bits* (lsh #o14 12))
-;; 
-;; MAINTENANCE The ls(1) info page mentions other file types:
-;; C - Contiguous data file
-;; D - Door (Solaris only?)
-;; M - Migrated file (Cray)
-;; ? - Some other type.
-;; 
-;; /* Protection bits.  */
-;; 
-;; #define     __S_ISUID       04000   /* Set user ID on execution.  */
-(defvar *cpio-s-isuid-bits* #o40)
-;; #define     __S_ISGID       02000   /* Set group ID on execution.  */
-(defvar *cpio-s-isgid-bits* #o20)
-;; #define     __S_ISVTX       01000   /* Save swapped text after use 
(sticky).  */
-(defvar *cpio-s-ivtx-bits* #o10)
-;; #define     __S_IREAD       0400    /* Read by owner.  */
-(defvar *cpio-s-iread-bits* #o4)
-;; #define     __S_IWRITE      0200    /* Write by owner.  */
-(defvar *cpio-s-iwrite-bits* #o2)
-;; #define     __S_IEXEC       0100    /* Execute by owner.  */
-(defvar *cpio-s-iexec-bits* #o1)
-;; 
-
 (defvar *insert-after* nil
   "Value used to define that a marker has type 'insert after'.")
 (defvar *insert-before* t
@@ -114,18 +67,6 @@
 ;; 
 ;; Library
 ;; 
-(defun integer-size ()
-  "Return the number of bits in an [unsigned] integer."
-  (let ((fname "integer-size")
-       (b 1)
-       (bit-ct 0))
-    (cond ((null *integer-size*)
-          (while (/= 0 (logand b most-positive-fixnum))
-            (setq bit-ct (1+ bit-ct))
-            (setq b (lsh b 1)))
-          (setq *integer-size* (1+ bit-ct)))
-         (t t))
-    *integer-size*))
 
 (defun integer-hex-digits ()
   "Calculate the number of hex digits that are required to represent any 
integer."
@@ -139,161 +80,6 @@
        (setq *integer-hex-digits* hex-digit-ct)))
   *integer-hex-digits*)
 
-(defun lsh-pair (pair n)
-  "Bit shift the given PAIR, (high . low), left by N bits.
-This returns the resulting pair or integer
-depending on whether the high component is non-zero.
-PAIR is a cons of two integers."
-  ;; The concept of integer in emacs is, of course, very soft.
-  ;; It likely varies from installation to installation.
-  (let ((fname "lsh-pair")
-       (mask 0)
-       (cross-bits)
-       (high (car pair))
-       (low (cdr pair)))
-    (if (< n 0)
-       (setq mask (low-bits-mask n))
-      (setq mask (high-bits-mask n)))
-    (cond ((< n 0)
-          (setq cross-bits (logand high mask))
-          (setq high (lsh high n))
-          (setq low (lsh low n))
-          (setq low (logior low (lsh cross-bits (- (integer-size) n)))))
-         (t
-          (setq cross-bits (logand low mask))
-          (setq high (lsh high n))
-          (setq low (lsh low n))
-          (setq high (logior high cross-bits))))
-    (if (/= 0 high)
-       (cons high low)
-      low)))
-
-(defun lsh-with-carry (bits n)
-  "Shift the given BITS left by N using a pair or a triple as necessary."
-  ;; HEREHERE This is an obvious part of the lsh-* library here
-  ;; but probably not necessary for the current project.
-  (let ((fname "lsh-with-carry")
-       low middle high)
-    (error "%s is not yet implemented." fname)))
-
-(defun lsh-triplet ()
-  "DO THAT and update this docstring."
-  (let ((fname "lsh-triplet"))
-  (error "%s is not yet implemented." fname)))
-
-(defun low-bits-mask (n)
-  "Return a mask appropriate for picking up the right N bits of an integer.
-If N is zero, then an empty mask is returned.
-The value is a bit mask."
-  ;; See (lsh-pair) for a sample use.
-  (let ((fname "low-bits-mask")
-       (i 0)
-       (mask 0))
-    (while (< i n)
-      (setq mask (+ (lsh mask 1) 1))
-      (setq i (1+ i)))
-    mask))
-    
-(defun high-bits-mask (n)
-  "Return a mask appropriate for picking up the left N bits of an integer.
-If N is zero, then an empty mask is returned.
-The value is a bit mask."
-  ;; See (lsh-pair) for a sample use.
-  (let ((fname "high-bits-mask")
-       (i 0)
-       (mask 0))
-    (while (< i n)
-      (setq mask (+ (lsh mask -1) most-negative-fixnum))
-      (setq i (1+ i)))
-    mask))
-(defun hex-format-pair (pair)
-  "Return a hex formatted representation of PAIR."
-  (let ((fname "hex-format-pair")
-       (hex-digit-count (integer-hex-digits))
-       (formatter))
-    (setq formatter (format "%%0%dx" hex-digit-count))
-    (setq formatter (concat formatter formatter))
-    (format formatter (car pair) (cdr pair))))
-
-(defun hex-format-triple (triple)
-  "Return a hex formatted representation of TRIPLE."
-  (let ((fname "hex-format-triple")
-       (hex-digit-count (integer-hex-digits))
-       (formatter))
-    (setq formatter (format "%%0%dx" hex-digit-count))
-    (setq formatter (concat formatter formatter formatter))
-    (format formatter (car triple) (cadr triple) (cddr triple))))
-
-
-(defun drwx-to-hex (mode-string)
-  "DO THAT and update this docstring."
-  (let ((fname "drwx-to-hex")
-       (user-offset 6)
-       (group-offset 3)
-       (other-offset 0)
-       (user-string (substring mode-string 1 4))
-       (user-value 0)
-       (group-string (substring mode-string 4 7))
-       (group-value 0)
-       (other-string (substring mode-string 7 10))
-       (other-value 0)
-       (file-type-string (substring mode-string 0 1))
-       (file-type-value 0)
-       (value))
-    (unless (string-match "\\`[-bcdlps]\\(?:[-r][-w][-xXst]\\)\\{3\\}\\'" 
-                         mode-string)
-      (error "%s bad mode string: [[%s]]" fname mode-string))
-    (setq file-type-value (drwx-to-file-type file-type-string))
-    (setq user-value (lsh (rwx-to-bits user-string) user-offset))
-    (if (string-match "..[Ss]" user-string)
-       (setq user-value (logior user-value (lsh *cpio-s-isuid-bits* 
user-offset))))
-    (setq group-value (lsh (rwx-to-bits group-string) group-offset))
-    (if (string-match "..[Ss]" group-string)
-       (setq group-value (logior group-value (lsh *cpio-s-isgid-bits* 
group-offset))))
-    (setq other-value (lsh (rwx-to-bits other-string) other-offset))
-    (if (string-match "..t" other-string)
-       (setq other-value (logior other-value (lsh *cpio-s-ivtx-bits* 
user-offset))))
-    (setq value (logior file-type-value user-value group-value other-value))
-    (format "%08X" value)))
-
-(defun drwx-to-file-type (mode-string)
-  "Convert the given mode-string to the bits specifying its file type."
-  ;; -bcdlps
-  (let ((fname "drwx-to-file-type"))
-    (cond ((string-match "\\`-" mode-string)
-          *cpio-regular-file-bits*)
-         ((string-match "\\`b" mode-string)
-          *cpio-blk-device-bits*)
-         ((string-match "\\`c" mode-string)
-          *cpio-char-device-bits*)
-         ((string-match "\\`d" mode-string)
-          *cpio-directory-bits*)
-         ((string-match "\\`l" mode-string)
-          *cpio-symlink-bits*)
-         ((string-match "\\`p" mode-string)
-          *cpio-fifo-bits*)
-         ((string-match "\\`s" mode-string)
-          *cpio-socket-bits*)
-         (t
-          (error "%s(): bad string for file type [[%s]]" fname mode-string)))))
-
-(defun rwx-to-bits (mode-string)
-  "Convert a rwx type of mode string to corresponding bits.
-rwx = 7 and rw- = 6, for example."
-  (let ((fname "rwx-to-bits")
-       (ret 0))
-    (unless (string-match "\\`[-r][-w][-xXst]\\'" mode-string)
-      (error "%s bad mode string: [[%s]]" fname mode-string))
-    (if (string-match "r.." mode-string)
-       (setq ret (logior ret *cpio-s-iread-bits*)))
-    (if (string-match ".w." mode-string)
-       (setq ret (logior ret *cpio-s-iwrite-bits*)))
-    (if (string-match "..[xst]" mode-string)
-       (setq ret (logior ret *cpio-s-iexec-bits*)))
-    ;; Only the caller can know if this is user or group.
-    ;; He must deal with set U/GID bits.
-    ret))
-
 (defun round-up (number modulus)
   "Round NUMBER up to the next multiple of MODULUS.
 If number ≡ 0 (modulus), then the NUMBER is already rounded up,
@@ -315,34 +101,6 @@ CHAR is typically a character or a single character 
string, but may be any strin
       (setq string (concat string char)))
     string))
 
-;; MAINTENANCE We need a portable version of (cpio-look-up-uid).
-(defun UNUSED-cpio-look-up-uid (user-name)
-  "Look up the UID for the given USER-NAME and return the UID a an integer 
string.
-If the given user does not exist, then return FFFFFFFF."
-  (let ((fname "cpio-look-up-uid"))
-    (with-temp-buffer 
-      ;; MAINTENANCE The following is not portable to, e.g. Windows.
-      ;; It might not be portable to OSX.
-      (insert-file "/etc/passwd")
-      (goto-char (point-min))
-      (if (re-search-forward (concat "^" user-name 
":[[:graph:]]+:\\([[:digit:]]+\\):") (point-max) t)
-         (format "%08X" (string-to-number (match-string 1)))
-       "FFFFFFFF"))))
-
-;; MAINTENANCE We need a portable (cpio-look-up-gid).
-(defun UNUSED-cpio-look-up-gid (group-name)
-  "Look up the GID for the given GROUP-NAME and return the GID a an integer 
string.
-If the given user does not exist, then return 99 999 999."
-  (let ((fname "cpio-look-up-gid"))
-    (with-temp-buffer 
-      ;; MAINTENANCE The following is not portable to, e.g. Windows.
-      ;; It might not be portable to OSX.
-      (insert-file "/etc/group")
-      (goto-char (point-min))
-      (if (re-search-forward (concat "^" user-name 
":[[:graph:]]+:\\([[:digit:]]+\\):") (point-max) t)
-         (format "%08X" (string-to-number (match-string 1)))
-       "FFFFFFFF"))))
-
 (defun strip-right (re string &optional multiples)
   "Strip the given RE from the right end of STRING.
 If the optional argument MULTIPLES is not NIL,
@@ -352,8 +110,9 @@ then match as many copies of RE as are there."
                      (concat "\\(" re "\\)+\\'")
                    (concat re "\\'")))
        (result string))
-    (if (string-match inner-re string)
-       (setq result (substring string 0 (match-beginning 0))))
+    (save-match-data
+      (if (string-match inner-re string)
+         (setq result (substring string 0 (match-beginning 0)))))
     result))
 
 (defun strip-left (re string &optional multiples)
@@ -366,8 +125,9 @@ then match as many copies of RE as are there."
                    (concat "\\`" re)))
                  
        (result string))
-    (if (string-match inner-re string)
-       (setq result (substring string (match-end 0))))
+    (save-match-data
+      (if (string-match inner-re string)
+         (setq result (substring string (match-end 0)))))
     result))
 
 (defun strip (re string &optional multiples)
@@ -385,30 +145,6 @@ then match as many copies of RE as are there."
         (desired-length (round-up string-length modulus)))
     (pad-right string desired-length pad-char)))
 
-(defun cpio-point ()
-  "Return (point) as if it were 0-based and not 1-based.
-The intent here is to make calculating padding and locations easier."
-  ;; Would this be better as a macro?
-  (let ((fname "cpio-point"))
-    (1- (point))))
-
-(defun cpio-goto-char (where)
-  "Move point to WHERE, where WHERE is a 0-based point."
-  (let ((fname "cpio-goto-char"))
-    (if (< where 0)
-       (signal 'wrong-type-argument (list (format "%d" where))))
-    (goto-char (1+ where))))
-
-(defun cpio-point-min ()
-  "Return the minimum point given a 0-based point."
-  (let ((fname "cpio-point-min"))
-    (1- (point-min))))
-
-(defun cpio-point-max ()
-  "Return the maximum point given a 0-based point."
-  (let ((fname "cpio-point-max"))
-    (1- (point-max))))
-
 (defun cpio-uid-for-owner (owner)
   "Return the uid (an integer) for the given OWNER (a string) if it exists.
 If it doesn't exist, then return NIL.
@@ -418,7 +154,7 @@ CAVEAT: This deletes any buffer holding /etc/passwd."
   (let ((fname "cpio-uid-for-owner")
        (passwd-buffer (find-file-noselect "/etc/passwd"))
        (uid nil))
-    (if (string-match "\\`[[:digit:]]+\\'" owner)
+    (if (string-match-p "\\`[[:digit:]]+\\'" owner)
        (setq uid owner)
       (with-current-buffer passwd-buffer
        (goto-char (point-min))
@@ -445,7 +181,7 @@ CAVEAT: This deletes any buffer holding /etc/group."
     (cond ((null group)
           nil)
          ((stringp group)
-          (if (string-match "\\`[[:digit:]]+\\'" group)
+          (if (string-match-p "\\`[[:digit:]]+\\'" group)
               (setq gid group)
             (with-current-buffer group-buffer
               (goto-char (point-min))
@@ -566,11 +302,6 @@ Well, that's the intent, but, really, it's a hack."
                (setq j (1+ j))))
            stops)))
 
-
-;; 
-;; Mode definition (IF APPROPRIATE)
-;; 
-
 
 
 (provide 'cpio-generic)
diff --git a/cpio-modes-test.el b/cpio-modes-test.el
index 5966f30..50649c4 100644
--- a/cpio-modes-test.el
+++ b/cpio-modes-test.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-modes-test.el --- tests of the code in cpio-modes.el.
-;      $Id: cpio-modes-test.el,v 1.1.4.3 2018/03/08 06:10:13 doug Exp $        
+;      $Id: cpio-modes-test.el,v 1.1.4.4 2018/05/11 20:13:13 doug Exp $        
 
 ;; COPYRIGHT
 ;; 
@@ -207,17 +207,6 @@
   (should (string-equal (cpio-int-mode-to-file-type s-iflnk)  "l")))
 
 
-;; 
-;; Commands
-;; 
-
-
-;; 
-;; Mode definition (IF APPROPRIATE)
-;; 
-
-
-
 (provide 'cpio-modes)
 ;;; cpio-modes.el ends here
 
diff --git a/cpio-modes.el b/cpio-modes.el
index fb31935..0914a22 100644
--- a/cpio-modes.el
+++ b/cpio-modes.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-modes.el --- handle modes.
-;      $Id: cpio-modes.el,v 1.1.4.5 2018/05/11 13:17:00 doug Exp $     
+;      $Id: cpio-modes.el,v 1.1.4.6 2018/05/11 20:13:13 doug Exp $     
 
 ;; COPYRIGHT
 ;; 
@@ -260,7 +260,6 @@ please let me know."
                       (cpio-other-chars-to-bits other-chars)))
     bits))
 
-
 (defun cpio-type-char-to-bits (char)
   "Return the mode bits implied by the given type CHAR."
   (let ((fname "cpio-type-char-to-bits"))
@@ -371,26 +370,6 @@ please let me know."
           (setq bits (logior bits s-isvtx))))
     bits))
 
-(defun UNUSED-cpio-low-mode-bits (bits)
-  ;; HEREHERE This is no longer needed.
-  ;; ∃ (chmod) ∈ emacs.n
-  ;; Look for its use.
-  "Return the low mode bits in BITS.
-These are the bits that can be set by chmod(1)."
-  (let ((fname "cpio-low-mode-bits"))
-    (logand bits *cpio-low-mode-bits*)))
-
-
-;; 
-;; Commands
-;; 
-
-
-;; 
-;; Mode definition (IF APPROPRIATE)
-;; 
-
-
 
 (provide 'cpio-modes)
 ;;; cpio-modes ends here
diff --git a/cpio-newc.el b/cpio-newc.el
index f44e376..4e2fb51 100644
--- a/cpio-newc.el
+++ b/cpio-newc.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-newc.el --- handle portable SVR4 cpio entry header formats.
-;      $Id: cpio-newc.el,v 1.3.2.7 2018/04/26 14:15:32 doug Exp $      
+;      $Id: cpio-newc.el,v 1.3.2.8 2018/05/11 20:13:13 doug Exp $      
 
 ;; COPYRIGHT
 ;; 
@@ -358,24 +358,25 @@ This function does NOT get the contents."
     ;; from the buffer and we're using the string proper.
     ;; This call establishes the match-data
     ;; that the subsequent calls will use.
-    (string-match *cpio-newc-header-re* header-string)
-    (setq result
-         (vector (cpio-newc-parse-ino      header-string)
-                 (cpio-newc-parse-mode     header-string)
-                 (cpio-newc-parse-uid      header-string)
-                 (cpio-newc-parse-gid      header-string)
-                 (cpio-newc-parse-nlink    header-string)
-                 (cpio-newc-parse-mtime    header-string)
-                 (setq filesize (cpio-newc-parse-filesize header-string))
-                 (cpio-newc-parse-dev-maj  header-string)
-                 (cpio-newc-parse-dev-min  header-string)
-                 (cpio-newc-parse-rdev-maj header-string)
-                 (cpio-newc-parse-rdev-min header-string)
-                 (setq namesize (cpio-newc-parse-namesize header-string))
-                 (cpio-newc-parse-chksum   header-string)
-                 (cpio-newc-parse-name     header-string namesize)
-                 (cpio-newc-parse-chksum   header-string)
-                 (cpio-newc-header-size    header-string namesize)))
+    (save-match-data
+      (string-match *cpio-newc-header-re* header-string)
+      (setq result
+           (vector (cpio-newc-parse-ino      header-string)
+                   (cpio-newc-parse-mode     header-string)
+                   (cpio-newc-parse-uid      header-string)
+                   (cpio-newc-parse-gid      header-string)
+                   (cpio-newc-parse-nlink    header-string)
+                   (cpio-newc-parse-mtime    header-string)
+                   (setq filesize (cpio-newc-parse-filesize header-string))
+                   (cpio-newc-parse-dev-maj  header-string)
+                   (cpio-newc-parse-dev-min  header-string)
+                   (cpio-newc-parse-rdev-maj header-string)
+                   (cpio-newc-parse-rdev-min header-string)
+                   (setq namesize (cpio-newc-parse-namesize header-string))
+                   (cpio-newc-parse-chksum   header-string)
+                   (cpio-newc-parse-name     header-string namesize)
+                   (cpio-newc-parse-chksum   header-string)
+                   (cpio-newc-header-size    header-string namesize))))
     (if (cpio-entry-name result)
        result
       nil)))
@@ -522,103 +523,6 @@ After all that's where the contents are, not in the 
header."
 
 ;;;;;;;;;;;;;;;;
 ;; 
-;; Header accessors
-;; 
-
-;; HEREHERE Are these needed here and not up in cpio.el?
-
-;; (defun cpio-newc-get-magic (parsed-header)
-;;   "Return the magic field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-magic"))
-;;     (arev parsed-header *cpio-magic-idx*)))
-;; (setq cpio-get-magic-func 'cpio-newc-get-magic)
-
-;; (defun UNUSED-cpio-newc-get-ino (parsed-header)
-;;   "Return the ino field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-ino"))
-;;     (aref parsed-header *cpio-ino-parsed-idx*)))
-;; (setq cpio-get-ino-func 'cpio-newc-get-ino)
-
-;; (defun UNUSED-cpio-newc-get-mode (parsed-header)
-;;   "Return the mode field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-mode"))
-;;     (aref parsed-header *cpio-mode-parsed-idx*)))
-;; (setq cpio-get-mode-func 'cpio-newc-get-mode)
-
-;; (defun UNUSED-cpio-newc-get-uid (parsed-header)
-;;   "Return the uid field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-uid"))
-;;     (aref parsed-header *cpio-uid-parsed-idx*)))
-;; (setq cpio-get-uid-func 'cpio-newc-get-uid)
-
-;; (defun UNUSED-cpio-newc-get-gid (parsed-header)
-;;   "Return the gid field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-gid"))
-;;     (aref parsed-header *cpio-gid-parsed-idx*)))
-;; (setq cpio-get-gid-func 'cpio-newc-get-gid)
-
-;; (defun UNUSED-cpio-newc-get-nlink (parsed-header)
-;;   "Return the nlink field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-nlink"))
-;;     (aref parsed-header *cpio-nlink-parsed-idx*)))
-;; (setq cpio-get-nlink-func 'cpio-newc-get-nlink)
-
-;; (defun UNUSED-cpio-newc-get-mtime (parsed-header)
-;;   "Return the mtime field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-mtime"))
-;;     (aref parsed-header *cpio-mtime-parsed-idx*)))
-;; (setq cpio-get-mtime-func 'cpio-newc-get-mtime)
-
-;; (defun UNUSED-cpio-newc-get-filesize (parsed-header)
-;;   "Return the filesize field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-filesize"))
-;;     (aref parsed-header *cpio-filesize-parsed-idx*)))
-;; (setq cpio-get-filesize-func 'cpio-newc-get-filesize)
-
-;; (defun UNUSED-cpio-newc-get-dev-maj (parsed-header)
-;;   "Return the dev field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-dev-maj"))
-;;     (aref parsed-header *cpio-dev-maj-parsed-idx*)))
-;; (setq cpio-get-dev-maj-func 'cpio-newc-get-dev-maj)
-
-;; (defun UNUSED-cpio-newc-get-dev-min (parsed-header)
-;;   "Return the dev field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-dev-min"))
-;;     (aref parsed-header *cpio-dev-min-parsed-idx*)))
-;; (setq cpio-get-dev-min-func 'cpio-newc-get-dev-min)
-
-;; (defun UNUSED-cpio-newc-get-rdev-maj (parsed-header)
-;;   "Return the rdev field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-rdev-maj"))
-;;     (aref parsed-header *cpio-rdev-parsed-idx*)))
-;; (setq cpio-get-rdev-maj-func 'cpio-newc-get-rdev-maj)
-
-;; (defun UNUSED-cpio-newc-get-rdev-min (parsed-header)
-;;   "Return the rdev field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-rdev-min"))
-;;     (aref parsed-header *cpio-rdev-parsed-idx*)))
-;; (setq cpio-get-rdev-min-func 'cpio-newc-get-rdev-min)
-
-;; (defun UNUSED-cpio-newc-get-namesize (parsed-header)
-;;   "Return the namesize field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-namesize"))
-;;     (aref parsed-header *cpio-namesize-parsed-idx*)))
-;; (setq cpio-get-namesize-func 'cpio-newc-get-namesize)
-
-;; (defun UNUSED-cpio-newc-get-chksum (parsed-header)
-;;   "Return the chksum field from the PARSED-HEADER."
-;;   (let ((fchksum "cpio-newc-get-chksum"))
-;;     (aref parsed-header *cpio-chksum-parsed-idx*)))
-;; (setq cpio-get-chksum-func 'cpio-newc-get-chksum)
-
-;; (defun UNUSED-cpio-newc-get-filename (parsed-header)
-;;   "Return the name field from the PARSED-HEADER."
-;;   (let ((fname "cpio-newc-get-filename"))
-;;     (aref parsed-header *cpio-name-parsed-idx*)))
-;; (setq cpio-get-filename-func 'cpio-newc-get-filename)
-
-;;;;;;;;;;;;;;;;
-;; 
 ;; Header construction
 ;; 
 
@@ -646,7 +550,7 @@ This function does NOT include the contents."
                                 "\0"))
     (setq header-string (pad-right header-string (round-up (length 
header-string) *cpio-newc-padding-modulus*) "\0"))
     ;; Check (at least during development).
-    (if (string-match *cpio-newc-header-re* header-string)
+    (if (string-match-p *cpio-newc-header-re* header-string)
        header-string
       (error "%s(): I built a bad header: [[%s]]" fname header))))
 (setq cpio-make-header-string-func 'cpio-newc-make-header-string)
@@ -695,35 +599,31 @@ I likely won't need this, but someone might."
   "Return a string value for the mode from the file attributes ATTRS."
   (let ((fname "cpio-newc-make-mode"))
     (format "%08X" (aref attrs *cpio-mode-parsed-idx*))))
-;; (setq cpio-make-mode-func 'cpio-newc-make-mode)
 
 (defun cpio-newc-make-uid (attrs)
   "Return an integer string value for the UID from the file attributes ATTRS."
   (let ((fname "cpio-newc-make-uid")
-       (uid (aref attrs 2)))
+       (uid (aref attrs *cpio-uid-parsed-idx*)))
     (cond ((numberp uid)
           (format "%08X" uid))
-         ((string-match "\\`[[:graph:]]\\'" uid)
+         ((string-match-p "\\`[[:graph:]]\\'" uid)
           (cpio-look-up-uid uid))
          (t (error "Bad UID: [[%s]]" uid)))))
-;; (setq cpio-make-uid-function 'cpio-newc-make-uid)
 
 (defun cpio-newc-make-gid (attrs)
   "Return an integer string value for the GID from the file attributes ATTRS."
   (let ((fname "cpio-newc-make-gid")
-       (gid (aref attrs 3)))
+       (gid (aref attrs *cpio-gid-parsed-idx*)))
     (cond ((numberp gid)
           (format "%08X" gid))
-         ((string-match "\\`[[:graph:]]\\'" gid)
+         ((string-match-p "\\`[[:graph:]]\\'" gid)
           (cpio-look-up-gid gid))
          (t (error "Bad GID: [[%s]]" gid)))))
-;; (setq cpio-make-gid-function 'cpio-newc-make-gid)
 
 (defun cpio-newc-make-nlink (attrs)
   "Return an integer string value for the number of links from the file 
attributes ATTRS."
   (let ((fname "cpio-newc-make-nlink"))
     (format "%08X" (aref attrs *cpio-nlink-parsed-idx*))))
-;; (setq cpio-make-nlink-function 'cpio-newc-make-nlink)
 
 (defun cpio-newc-make-mtime (attrs)
   "Return a string value for the mod time from the file attributes ATTRS."
@@ -732,7 +632,6 @@ I likely won't need this, but someone might."
     ;; We're only about 1/2 way through using this up it seems.
     ;; Still, time will eventually overflow a 32 bit unsigned integer.
     (format "%08X" (float-time mod-time))))
-;; (setq cpio-make-mtime-function 'cpio-newc-make-mtime)
 
 (defun cpio-newc-make-filesize (attrs)
   "Return an 8 digit hex string for the filesize attribute among the given 
ATTRs."
@@ -755,7 +654,6 @@ I likely won't need this, but someone might."
                  (cpio-big-inode-to-string))
                 (t (error "Bad dev value: [[%s]]." ino))))
          (t (error "Bad dev value: [[%s]]." ino)))))
-;; (setq cpio-make-dev-function 'cpio-newc-make-dev)
 
 (defun cpio-newc-make-dev-min (attrs)
   "Return a string value for the WWWW from the file attributes ATTRS."
@@ -774,7 +672,6 @@ I likely won't need this, but someone might."
                  (cpio-big-inode-to-string))
                 (t (error "Bad dev value: [[%s]]." ino))))
          (t (error "Bad dev value: [[%s]]." ino)))))
-;; (setq cpio-make-dev-function 'cpio-newc-make-dev)
 
 (defun cpio-newc-make-rdev-maj (attrs)
   "Return a string value for the WWWW from the file attributes ATTRS."
@@ -792,7 +689,6 @@ I likely won't need this, but someone might."
     ;; MAINTENANCE Every concrete example I look at has this value for 
rdev-maj.
     ;; See (cpio-newc-make-rdev-maj) for more information.
     "00000000"))
-;; (setq cpio-make-rdev-function 'cpio-newc-make-rdev)
 
 (defun cpio-newc-make-chksum (attrs)
   "Return a string value for the newc cpio entry from the file attributes 
ATTRS."
@@ -802,7 +698,6 @@ I likely won't need this, but someone might."
     ;; And, indeed, it's only set in crc archives.
     ;; See copyout.c->writeout-defered-file() and nowhere else.
     "00000000"))
-;; (setq cpio-make-chksum-function 'cpio-newc-make-chksum)
 
 ;; Filename is not one of ATTRS. ∴ It doesn't get a constructor here.
 
@@ -880,7 +775,6 @@ CAVEAT: This respects neither narrowing nor the point."
             (goto-char contents-end))
            (t t)))
     (nreverse catalog)))
-(setq cpio-build-catalog-function 'cpio-newc-build-catalog)
 
 (defun cpio-newc-start-of-trailer ()
   "Return the character position of the (ostensible) start of the trailer
@@ -925,6 +819,8 @@ once the TRAILER is written and padded."
 (defun cpio-newc-delete-trailer ()
   "Delete the trailer in the current cpio newc archive."
   (let ((fname "cpio-newc-delete-trailer"))
+    (unless (eq major-mode 'cpio-mode)
+      (error "%s(): Called outside of a cpio archive buffer." fname))
     ;; First, get to the end of the last entry in the archive.
     (goto-char (point-min))
     (mapc (lambda (e)
@@ -1123,23 +1019,8 @@ what the proper way to do it is."
                    (make-string 8 ?=)  ;????
                    "\n")))
          (t t))))
-;; 
-;; The catalog
-;; 
 
 
 
-;; 
-;; Commands
-;; 
-
-;; (define-derived-mode cpio-newc-mode nil "CPIO NEWC"
-;;   "A mode for processing CPIO archives in the NEWC format."
-;;   (goto-char (point-min))
-;;   (cond ((looking-at *cpio-newc-header-re*)
-;;      (
-;;      )
-;;     (t nil))
-
 (provide 'cpio-newc)
 ;;; cpio-newc.el ends here.
diff --git a/cpio.el b/cpio.el
index 28e2ba8..7260347 100644
--- a/cpio.el
+++ b/cpio.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio.el --- cpio-mode for emacs
-;      $Id: cpio.el,v 1.2.4.9 2018/05/11 13:17:00 doug Exp $   
+;      $Id: cpio.el,v 1.2.4.10 2018/05/11 20:13:14 doug Exp $  
 
 ;; COPYRIGHT 2015, 2017, 2018 Douglas Lewan, address@hidden
 
@@ -251,89 +251,6 @@
 Takes the values 'bin, 'newc, 'odc etc.")
 (make-variable-buffer-local '*cpio-format*)
 
-(let ((i 0))
-  ;; HEREHERE Are these even used?
-  ;; It doesn't look like it.
-  (defvar *cpio-magic-idx* 0   ; (setq i (1+ i))
-    "Index of magic in a parsed cpio header.")
-  (setq *cpio-magic-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-ino-idx* 0     ; (setq i (1+ i))
-    "Index of ino in a parsed cpio header.")
-  (setq *cpio-ino-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-mode-idx* 0    ; (setq i (1+ i))
-    "Index of mode in a parsed cpio header.")
-  (setq *cpio-mode-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-uid-idx* 0     ; (setq i (1+ i))
-    "Index of uid in a parsed cpio header.")
-  (setq *cpio-uid-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-gid-idx* 0     ; (setq i (1+ i))
-    "Index of gid in a parsed cpio header.")
-  (setq *cpio-gid-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-nlink-idx* 0   ; (setq i (1+ i))
-    "Index of nlink in a parsed cpio header.")
-  (setq *cpio-nlink-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-mtime-idx* 0   ; (setq i (1+ i))
-    "Index of mtime in a parsed cpio header.")
-  (setq *cpio-mtime-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-entry-size-idx* 0 ; (setq i (1+ i))
-    "Index of filesize in a parsed cpio header.")
-  (setq *cpio-entry-size-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-dev-maj-idx* 0 ; (setq i (1+ i))
-    "Index of dev major in a parsed cpio header.")
-  (setq *cpio-dev-maj-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-dev-min-idx* 0 ; (setq i (1+ i))
-    "Index of dev minor in a parsed cpio header.")
-  (setq *cpio-dev-min-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-rdev-maj-idx* 0        ; (setq i (1+ i))
-    "Index of rdev major in a parsed cpio header.")
-  (setq *cpio-rdev-maj-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-rdev-min-idx* 0        ; (setq i (1+ i))
-    "Index of rdev minor in a parsed cpio header.")
-  (setq *cpio-rdev-min-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-namesize-idx* 0 ; (setq i (1+ i))
-    "Index of namesize in a parsed cpio header.")
-  (setq *cpio-namesize-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-checksum-idx* 0 ; (setq i (1+ i))
-    "Index of checksum in a parsed cpio header.")
-  (setq *cpio-checksum-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-filename-idx 0 ; (setq i (1+ i))
-    "Index of filename in a parsed cpio header.")
-  (setq *cpio-filename-idx* i)
-  (setq i (1+ i))
-
-  (defvar *cpio-checksum-idx* 0 ; (setq i (1+ i))
-    "Index of the checksum in a parsed cpio-header.")
-  (setq *cpio-filename-idx* i)
-  (setq i (1+ i)))
-
 ;; N.B. The format REs go here since they are what we use
 ;; to discern the type of the archive.
 (defvar *cpio-bin-header-re* "nOt yEt iMpLeMeNtEd"
@@ -775,7 +692,7 @@ CAVEAT: See `cpio-magic'."
 (defun cpio-contents-start (entry-name)
   "Return the contents start for ENTRY-NAME."
   (let* ((fname "cpio-contents-start")
-        (catalog-entry (cdr (assoc entry-name (cpio-catalog)))))
+        (catalog-entry (cpio-entry entry-name)))
     (aref catalog-entry *cpio-catalog-entry-contents-start-idx*)))
 
 (defun cpio-entry-attrs (entry-name)
@@ -784,7 +701,7 @@ CAVEAT: See `cpio-magic'."
     (if *cab-parent*
        (with-current-buffer *cab-parent*
          (cpio-entry-attrs entry-name))
-      (aref (cdr (assoc entry-name (cpio-catalog))) 0))))
+      (aref (cpio-entry entry-name) 0))))
 
 (defun cpio-entry-header-start (entry)
   "Return the start of the entry specified in ENTRY."
@@ -944,7 +861,7 @@ will create a conflict.
 
 CONTRACT: This can only be invoked in a cpio archive under cpio-mode
 or a buffer affiliated with such a buffer."
-  ;; (interactive "sName: \nP")
+  (interactive "sName: \nP")
   (let* ((fname "cpio-extract-entry")
         (attrs (cpio-entry-attrs entry-name))
         (entry-type (cpio-entry-type entry-name)))
@@ -968,7 +885,7 @@ or a buffer affiliated with such a buffer."
            (warn "%s(): Unknown entry type -- not extracting." fname))
           (t (error "%s(): Impossible condition." fname)))))
 
-(defun cpio-extract-regular-file (entry-name)
+(defun cpio-extract-regular-file (entry-name &optional from-lisp)
   "Extract the regular file entry ENTRY-NAME.
 CONTRACT: ENTRY-NAME is in fact an entry of a regular file."
   (let* ((fname "cpio-extract-regular-file")
@@ -1365,7 +1282,6 @@ many are simply invented."
         (namesize (1+ (length name)))
         (checksum 0)                   ;HEREHERE This will have to change.
         (result (make-vector 14 nil)))
-    ;;(error "%s() is not yet implemented" fname)
     (aset result *cpio-ino-parsed-idx* ino)
     (aset result *cpio-mode-parsed-idx* mode)
     (aset result *cpio-uid-parsed-idx* uid)
@@ -1651,9 +1567,10 @@ This also establishes those variables as buffer-local."
     ;;     --> *cpio-magic-field-offset*
     (mapcar (lambda (fsv)              ;format-specific-variable
              (let* ((fs-name (symbol-name fsv))
-                    (general-name (progn (or (string-match (concat 
"\\`\\*cpio-\\(" format-name "-\\)") fs-name)
-                                             (error "%s(): Some FSV isn't 
playing by the rules! [[%s]]" fname fsv))
-                                         (replace-match "" t t fs-name 1)))
+                    (general-name (save-match-data
+                                    (or (string-match (concat "\\`\\*cpio-\\(" 
format-name "-\\)") fs-name)
+                                        (error "%s(): Some FSV isn't playing 
by the rules! [[%s]]" fname fsv))
+                                    (replace-match "" t t fs-name 1)))
                     (general-var (make-symbol general-name)))
                (set general-var fsv)))
            newc-offset-vars)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]