GNU bug report logs -
#8968
arc-mode 7z writing support
Previous Next
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
Message #11 received at 8968 <at> debbugs.gnu.org (full text, mbox):
>> 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."
This bug report was last modified 13 years and 323 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.