GNU bug report logs - #8968
arc-mode 7z writing support

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Thu, 30 Jun 2011 22:08:02 UTC

Severity: wishlist

Tags: patch

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> jurta.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#8968: closed (arc-mode 7z writing support)
Date: Fri, 08 Jul 2011 00:12:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 08 Jul 2011 03:09:51 +0300
with message-id <87mxgpmy40.fsf <at> mail.jurta.org>
and subject line Re: bug#8968: arc-mode 7z writing support
has caused the GNU bug report #8968,
regarding arc-mode 7z writing support
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
8968: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8968
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: arc-mode 7z writing support
Date: Fri, 01 Jul 2011 00:47:05 +0300
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.
 



[Message part 3 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: 8968-done <at> debbugs.gnu.org
Subject: Re: bug#8968: arc-mode 7z writing support
Date: Fri, 08 Jul 2011 03:09:51 +0300
> 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):

This is installed as well.

As reported in http://thread.gmane.org/gmane.emacs.devel/136578/focus=136670
on cygwin the program name is "p7zip".  But I can't confirm this fact,
so I'm closing this feature request at its current state with the
program name "7z".


This bug report was last modified 13 years and 322 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.