From: Juri Linkov <juri@jurta.org>
To: 8968@debbugs.gnu.org
Subject: bug#8968: arc-mode 7z writing support
Date: Fri, 01 Jul 2011 00:47:05 +0300 [thread overview]
Message-ID: <87k4c356w6.fsf@mail.jurta.org> (raw)
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.
next reply other threads:[~2011-06-30 21:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 21:47 Juri Linkov [this message]
2011-07-01 2:55 ` bug#8968: arc-mode 7z writing support 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k4c356w6.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=8968@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.