From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#10347: 24.0.50; archive-mode includes warning messages from unzip in the content of extracted files Date: Thu, 22 Dec 2011 22:07:05 +0200 Organization: JURTA Message-ID: <874nwsbcc4.fsf@mail.jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1324584601 30641 80.91.229.12 (22 Dec 2011 20:10:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Dec 2011 20:10:01 +0000 (UTC) Cc: 10347@debbugs.gnu.org To: Daniel Brooks Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 22 21:09:57 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdoxg-00074R-GM for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Dec 2011 21:09:56 +0100 Original-Received: from localhost ([::1]:48002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdoxf-0005ZD-Tv for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Dec 2011 15:09:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdoxd-0005Yp-3E for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 15:09:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rdoxa-0005cS-U4 for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 15:09:53 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdoxa-0005cO-SW for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 15:09:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Rdozi-0001yy-78 for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 15:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Dec 2011 20:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10347 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10347-submit@debbugs.gnu.org id=B10347.13245846857579 (code B ref 10347); Thu, 22 Dec 2011 20:12:02 +0000 Original-Received: (at 10347) by debbugs.gnu.org; 22 Dec 2011 20:11:25 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdoz7-0001yA-8h for submit@debbugs.gnu.org; Thu, 22 Dec 2011 15:11:25 -0500 Original-Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdoz5-0001y3-7W for 10347@debbugs.gnu.org; Thu, 22 Dec 2011 15:11:23 -0500 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 8720E684059; Thu, 22 Dec 2011 12:09:11 -0800 (PST) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 3934F451C6F3; Thu, 22 Dec 2011 12:08:38 -0800 (PST) In-Reply-To: (Daniel Brooks's message of "Wed, 21 Dec 2011 13:44:56 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 22 Dec 2011 15:12:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55118 Archived-At: > archive-extract-by-stdout intermingles stderr and stdout unless the > caller passes in a buffer to send the stderr too. As none of the callers > do, I think it would be best to disable stderr unless the caller > supplies a buffer. > [2. fix --- application/octet-stream; archive-mode-stdout.bundle]... Unfortunately, I can't read what you've encrypted into this git bundle. But I think we should use the same solution as we developed for `archive-7z-extract' - to redirect stdout into a temporary file and display its contents in the echo area. This patch fixes `archive-zip-extract' by duplicating the logic of `archive-7z-extract': === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2011-12-15 07:24:10 +0000 +++ lisp/arc-mode.el 2011-12-22 20:05:51 +0000 @@ -1826,7 +1827,8 @@ (defun archive-zip-extract (archive name (let ((archive-7z-extract archive-zip-extract)) (archive-7z-extract archive name))) (t - (archive-extract-by-stdout + (let ((tmpfile (make-temp-file "zip-stderr"))) + (prog1 (archive-extract-by-stdout archive ;; unzip expands wildcards in NAME, so we need to quote it. But ;; not on DOS/Windows, since that fails extraction on those @@ -1839,7 +1841,13 @@ (defun archive-zip-extract (archive name (equal (car archive-zip-extract) "unzip")) (shell-quote-argument name) name) - archive-zip-extract)))) + archive-zip-extract + tmpfile) + (with-temp-buffer + (insert-file-contents tmpfile) + (unless (search-forward "Everything is Ok" nil t) + (message "%s" (buffer-string))) + (delete-file tmpfile))))))) (defun archive-zip-write-file-member (archive descr) (archive-*-write-file-member