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#8968: arc-mode 7z writing support Date: Tue, 05 Jul 2011 01:22:18 +0300 Organization: JURTA Message-ID: <871uy51y7h.fsf@mail.jurta.org> References: <87k4c356w6.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309818771 17714 80.91.229.12 (4 Jul 2011 22:32:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2011 22:32:51 +0000 (UTC) Cc: 8968@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 05 00:32:47 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 1Qdrh8-00035N-Lz for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jul 2011 00:32:46 +0200 Original-Received: from localhost ([::1]:53031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdrh7-0006yD-GL for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2011 18:32:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdrfV-0006ef-6w for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 18:31:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdrfT-0000uh-H4 for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 18:31:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdrfT-0000ud-5g for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 18:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QdrfS-0002rO-Cd; Mon, 04 Jul 2011 18:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jul 2011 22:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8968 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 8968-submit@debbugs.gnu.org id=B8968.130981865010976 (code B ref 8968); Mon, 04 Jul 2011 22:31:02 +0000 Original-Received: (at 8968) by debbugs.gnu.org; 4 Jul 2011 22:30:50 +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 1QdrfG-0002qz-03 for submit@debbugs.gnu.org; Mon, 04 Jul 2011 18:30:50 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdrfE-0002qn-3y for 8968@debbugs.gnu.org; Mon, 04 Jul 2011 18:30:48 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 252F66E804B; Mon, 4 Jul 2011 15:30:42 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id EF42A451C2AA; Mon, 4 Jul 2011 15:30:40 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Thu, 30 Jun 2011 22:55:56 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 04 Jul 2011 18:31:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:47997 Archived-At: >> I'd like to install a patch that implements update/delete operations >> for 7z archives in arc-mode.el: > > Go ahead, Done. Some users prefer using 7z even for operations on zip archives. This patch provides the right default values for them in case 7z is installed on the system instead of zip/unzip. For searching the available programs it uses exactly the same logic as already is implemented in `archive-zip-extract' (i.e. first try to find zip/unzip, then 7z, and finally pkzip/pkunzip): === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2011-04-19 13:44:55 +0000 +++ lisp/arc-mode.el 2011-07-04 21:44:48 +0000 @@ -235,10 +235,10 @@ (defcustom archive-zip-extract ;; names. (defcustom archive-zip-expunge - (if (and (not (executable-find "zip")) - (executable-find "pkzip")) - '("pkzip" "-d") - '("zip" "-d" "-q")) + (cond ((executable-find "zip") '("zip" "-d" "-q")) + ((executable-find "7z") '("7z" "d")) + ((executable-find "pkzip") '("pkzip" "-d")) + (t '("zip" "-d" "-q"))) "Program and its options to run in order to delete zip file members. Archive and member names will be added." :type '(list (string :tag "Program") @@ -248,10 +248,10 @@ (defcustom archive-zip-expunge :group 'archive-zip) (defcustom archive-zip-update - (if (and (not (executable-find "zip")) - (executable-find "pkzip")) - '("pkzip" "-u" "-P") - '("zip" "-q")) + (cond ((executable-find "zip") '("zip" "-q")) + ((executable-find "7z") '("7z" "u")) + ((executable-find "pkzip") '("pkzip" "-u" "-P")) + (t '("zip" "-q"))) "Program and its options to run in order to update a zip file member. Options should ensure that specified directory will be put into the zip file. Archive and member name will be added." @@ -262,10 +262,10 @@ (defcustom archive-zip-update :group 'archive-zip) (defcustom archive-zip-update-case - (if (and (not (executable-find "zip")) - (executable-find "pkzip")) - '("pkzip" "-u" "-P") - '("zip" "-q" "-k")) + (cond ((executable-find "zip") '("zip" "-q" "-k")) + ((executable-find "7z") '("7z" "u")) + ((executable-find "pkzip") '("pkzip" "-u" "-P")) + (t '("zip" "-q" "-k"))) "Program and its options to run in order to update a case fiddled zip member. Options should ensure that specified directory will be put into the zip file. Archive and member name will be added."