From: G Anna <drguruolai@eth.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Adding file types for automatic uncompressing
Date: 23 Apr 2002 07:41:00 +0530 [thread overview]
Message-ID: <m3vgaj411n.fsf@wobble.eth.net> (raw)
In-Reply-To: <A35A461EBB6BD511859E0002A56B89CC01CDBE61@EXCORP03.corp.erac.com>
> 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
prev parent reply other threads:[~2002-04-23 2:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-22 17:57 Adding file types for automatic uncompressing Molitor, Stephen
2002-04-23 2:11 ` G Anna [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3vgaj411n.fsf@wobble.eth.net \
--to=drguruolai@eth.net \
--cc=help-gnu-emacs@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.
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).