all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8968: arc-mode 7z writing support
@ 2011-06-30 21:47 Juri Linkov
  2011-07-01  2:55 ` Stefan Monnier
  0 siblings, 1 reply; 18+ messages in thread
From: Juri Linkov @ 2011-06-30 21:47 UTC (permalink / raw)
  To: 8968

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.
 






^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-07-09 22:27 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-30 21:47 bug#8968: arc-mode 7z writing support Juri Linkov
2011-07-01  2:55 ` Stefan Monnier
2011-07-04 22:22   ` Juri Linkov
2011-07-08  0:09     ` Juri Linkov
2011-07-08  7:08       ` Eli Zaretskii
2011-07-08 13:06         ` Stefan Monnier
2011-07-08 18:38           ` Juri Linkov
2011-07-08 19:49             ` Eli Zaretskii
2011-07-08 20:20               ` Juri Linkov
2011-07-09  6:28                 ` Eli Zaretskii
2011-07-09 11:34                   ` Jason Rumney
2011-07-09 13:05                     ` Eli Zaretskii
2011-07-09 11:26               ` Jason Rumney
2011-07-08 15:56         ` Jason Rumney
2011-07-08 18:39           ` Juri Linkov
2011-07-08 19:51             ` Eli Zaretskii
2011-07-09 11:20               ` Jason Rumney
2011-07-09 22:27                 ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.