* Adding file types for automatic uncompressing
@ 2002-04-22 17:57 Molitor, Stephen
2002-04-23 2:11 ` G Anna
0 siblings, 1 reply; 2+ messages in thread
From: Molitor, Stephen @ 2002-04-22 17:57 UTC (permalink / raw)
I'd like to add a few file types to the set of compressed file types, so
that when I open a file via find-file or dired, it automatically get's
uncompressed. Specifily, .ear and .war files. These are just zip files,
with different extensions. I tried doing this:
(setq auto-mode-alist (cons '("\\.ear$" . ear-mode) auto-mode-alist))
(setq file-name-buffer-file-type-alist (cons '("\\.ear$" . t)
file-name-buffer-file-type-alist))
But that didn't seem to have any effect.
Thanks!
Steve Molitor
smolitor@erac.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Adding file types for automatic uncompressing
2002-04-22 17:57 Adding file types for automatic uncompressing Molitor, Stephen
@ 2002-04-23 2:11 ` G Anna
0 siblings, 0 replies; 2+ messages in thread
From: G Anna @ 2002-04-23 2:11 UTC (permalink / raw)
Cc: help-gnu-emacs
> Date: Mon, 22 Apr 2002 12:57:23 -0500
> From: "Molitor, Stephen" <SMolitor@erac.com>
> Subj: Adding file types for automatic uncompressing
>
> I'd like to add a few file types to the set of compressed file
> types, so that when I open a file via find-file or dired, it
> automatically get's uncompressed. Specifily, .ear and .war files.
> These are just zip files, with different extensions. I tried doing
> this:
>
> (setq auto-mode-alist (cons '("\\.ear$" . ear-mode) auto-mode-alist))
> (setq file-name-buffer-file-type-alist (cons '("\\.ear$" . t)
> file-name-buffer-file-type-alist))
In the dired-aux.el file there is a variable
dired-compress-file-suffixes, which might be of interest to you. Just
for completeness, here is its definition.
(defvar dired-compress-file-suffixes
'(("\\.gz\\'" "" "gunzip")
("\\.tgz\\'" ".tar" "gunzip")
("\\.Z\\'" "" "uncompress")
;; For .z, try gunzip. It might be an old gzip file,
;; or it might be from compact? pack? (which?) but gunzip handles both.
("\\.z\\'" "" "gunzip")
("\\.bz2\\'" "" "bunzip2")
;; This item controls naming for compression.
("\\.tar\\'" ".tgz" nil))
"Control changes in file name suffixes for compression and uncompression.
Each element specifies one transformation rule, and has the form:
(REGEXP NEW-SUFFIX PROGRAM)
The rule applies when the old file name matches REGEXP.
The new file name is computed by deleting the part that matches REGEXP
(as well as anything after that), then adding NEW-SUFFIX in its place.
If PROGRAM is non-nil, the rule is an uncompression rule,
and uncompression is done by running PROGRAM.
Otherwise, the rule is a compression rule, and compression is done with gzip.")
Is this of any help?
Cheers,
anna
--
Get your free e-mail account at http://www.linuxmail.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-23 2:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-22 17:57 Adding file types for automatic uncompressing Molitor, Stephen
2002-04-23 2:11 ` G Anna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).