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: Fri, 01 Jul 2011 00:47:05 +0300 Organization: JURTA Message-ID: <87k4c356w6.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309471711 31215 80.91.229.12 (30 Jun 2011 22:08:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2011 22:08:31 +0000 (UTC) To: 8968@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 01 00:08:27 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 1QcPPO-0006aU-5t for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jul 2011 00:08:26 +0200 Original-Received: from localhost ([::1]:42462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPPM-0006sj-Tq for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jun 2011 18:08:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPP3-0006sC-65 for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2011 18:08:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcPP1-0006Ug-JI for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2011 18:08:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPP0-0006UP-V8 for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2011 18:08:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QcPP0-0003LJ-Mt; Thu, 30 Jun 2011 18:08: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: Thu, 30 Jun 2011 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8968 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130947164912809 (code B ref -1); Thu, 30 Jun 2011 22:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Jun 2011 22:07:29 +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 1QcPOS-0003KY-QF for submit@debbugs.gnu.org; Thu, 30 Jun 2011 18:07:29 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcPOS-0003KN-0L for submit@debbugs.gnu.org; Thu, 30 Jun 2011 18:07:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcPOL-0006JX-5b for submit@debbugs.gnu.org; Thu, 30 Jun 2011 18:07:22 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:37138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPOK-0006JT-Tm for submit@debbugs.gnu.org; Thu, 30 Jun 2011 18:07:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPOJ-0006lp-9G for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2011 18:07:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcPOG-0006Im-KP for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2011 18:07:18 -0400 Original-Received: from smtp-out4.starman.ee ([85.253.0.6]:51458 helo=mx2.starman.ee) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPOG-0006II-2Y for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2011 18:07:16 -0400 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (62.65.210.87.cable.starman.ee [62.65.210.87]) by mx2.starman.ee (Postfix) with ESMTP id BFCDE3F40B9 for ; Fri, 1 Jul 2011 01:07:10 +0300 (EEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 30 Jun 2011 18:08: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:47666 Archived-At: I'd like to install a patch that implements update/delete operations for 7z archives in arc-mode.el: === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2011-04-19 13:44:55 +0000 +++ lisp/arc-mode.el 2011-06-30 21:39:45 +0000 @@ -55,9 +55,9 @@ ;; -------------------------------------------- ;; View listing Intern Intern Intern Intern Y Y ;; Extract member Y Y Y Y Y Y -;; Save changed member Y Y Y Y N N +;; Save changed member Y Y Y Y N Y ;; Add new member N N N N N N -;; Delete member Y Y Y Y N N +;; Delete member Y Y Y Y N Y ;; Rename member Y Y N N N N ;; Chmod - Y Y - N N ;; Chown - Y - - N N @@ -328,6 +328,27 @@ (defcustom archive-7z-extract (string :format "%v"))) :group 'archive-7z) +(defcustom archive-7z-expunge + '("7z" "d") + "Program and its options to run in order to delete 7z file members. +Archive and member names will be added." + :type '(list (string :tag "Program") + (repeat :tag "Options" + :inline t + (string :format "%v"))) + :group 'archive-7z) + +(defcustom archive-7z-update + '("7z" "u") + "Program and its options to run in order to update a 7z file member. +Options should ensure that specified directory will be put into the 7z +file. Archive and member name will be added." + :type '(list (string :tag "Program") + (repeat :tag "Options" + :inline t + (string :format "%v"))) + :group 'archive-7z) + ;; ------------------------------------------------------------------------- ;;; Section: Variables @@ -2037,7 +2058,9 @@ (defun archive-7z-summarize () (with-temp-buffer (call-process "7z" nil t nil "l" "-slt" file) (goto-char (point-min)) - (re-search-forward "^-+\n") + ;; Four dashes start the meta info section that should be skipped. + ;; Archive members start with more than four dashes. + (re-search-forward "^-----+\n") (while (re-search-forward "^Path = \\(.*\\)\n" nil t) (goto-char (match-end 0)) (let ((name (match-string 1)) @@ -2084,6 +2107,12 @@ (defun archive-7z-extract (archive name) (message "%s" (buffer-string))) (delete-file tmpfile))))) +(defun archive-7z-write-file-member (archive descr) + (archive-*-write-file-member + archive + descr + archive-7z-update)) + ;; ------------------------------------------------------------------------- ;;; Section `ar' archives.