* make dired-do-compress to use zip instead of gzip
@ 2008-04-07 18:39 Xah Lee
0 siblings, 0 replies; only message in thread
From: Xah Lee @ 2008-04-07 18:39 UTC (permalink / raw)
To: help-gnu-emacs
is it possible to customize the Z shortcut in dired (dired-do-
compress) so that it uses zip instead of gzip?
i started to code the following:
(defun dired-do-zip ()
"Zip or unzip marked (or next ARG) files."
(interactive)
(mapc 'zipit (dired-get-marked-files))
)
(defun zipit (fpath)
"Zip the file."
(let (suffix)
(setq suffix (file-name-extension fpath))
(if (eq suffix ".zip")
(progn
(shell-command (concat "unzip" fpath))
)
(progn
(shell-command (concat "zip " fpath " " fpath ".zip") )
))))
but it's unsatisfactory for several reasons... it doesn't delete the
original (and if i add code to delete, it gets quite involved in
making sure the archive is complete), it doesn't update dired, it
doesn't check for overwritting files, ... etc.
Xah
xah@xahlee.org
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-07 18:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-07 18:39 make dired-do-compress to use zip instead of gzip Xah Lee
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.