Display archive errors in the echo area instead of inserting to the file buffer.
authorJuri Linkov <juri@jurta.org>
Fri, 28 Sep 2012 16:38:07 +0000 (19:38 +0300)
committerJuri Linkov <juri@jurta.org>
Fri, 28 Sep 2012 16:38:07 +0000 (19:38 +0300)
commit53baf48a6e99b5ff434d5177b00beda3fc9a8f71
tree8c9bd919742f9f986a342b7b1968ccfd1eee5737
parente61d39cddfd015032a6419ce75c36ecdf1e9fe9f
Display archive errors in the echo area instead of inserting to the file buffer.

* lisp/arc-mode.el (archive-extract-by-stdout): Change arg STDERR-FILE
to STDERR-TEST that can be a regexp matching a successful output.
Create a temporary file and redirect stderr to it.  Search for
STDERR-TEST in the stderr output and display it in the echo area
if no match is found.
(archive-extract-by-file): New function like
`archive-extract-by-stdout' but extracting archives to files
and looking for successful matches in stdout.  Function body is
mostly copied from `archive-rar-extract'.
(archive-rar-extract): Use `archive-extract-by-file'.
(archive-7z-extract): Use `archive-extract-by-stdout'.

Fixes: debbugs:10347
lisp/ChangeLog
lisp/arc-mode.el