Function: archive-extract-by-stdout

archive-extract-by-stdout is a byte-compiled function defined in arc-mode.el.gz.

Signature

(archive-extract-by-stdout ARCHIVE NAME COMMAND &optional STDERR-TEST)

Source Code

;; Defined in /usr/src/emacs/lisp/arc-mode.el.gz
(defun archive-extract-by-stdout (archive name command &optional stderr-test)
  (let ((stderr-file (make-temp-file "arc-stderr")))
    (unwind-protect
	(prog1
	    (apply #'call-process
		   (car command)
		   nil
		   (if stderr-file (list t stderr-file) t)
		   nil
		   (append (cdr command) (list archive name)))
	  (with-temp-buffer
	    (insert-file-contents stderr-file)
	    (goto-char (point-min))
	    (when (if (stringp stderr-test)
		      (not (re-search-forward stderr-test nil t))
		    (> (buffer-size) 0))
	      (message "%s" (buffer-string)))))
      (if (file-exists-p stderr-file)
	  (delete-file stderr-file)))))