From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Trouble getting archives to load as archives
Date: Tue, 08 Jul 2008 01:00:34 -0600 [thread overview]
Message-ID: <g4v3aa$p0q$1@ger.gmane.org> (raw)
In-Reply-To: <8d7d1e6d0807060121o25328808s3f85ef1761742d50@mail.gmail.com>
Davin Pearson wrote:
> 2008/7/5 Peter Dyballa <Peter_Dyballa@web.de>:
>> How does it work when you invoke GNU Emacs as 'emacs -Q' or 'emacs -q' ?
>> With -Q neither the system's nor your own customisation is loaded, with -q
>> your's not loaded. In either both or in one case GNU Emacs should behave
>> correctly ...
>
> With -q and -Q and the following:
>
> (add-to-list 'auto-mode-alist
> '("\\.\\(arc\\|zip\\|tar\\|gz\\|lzh\\|zoo\\)\\'" . archive-mode))
>
> Then loading a *.tar or *.gz file generates the following error messages:
>
> File mode specification error: (error "Buffer format not recognized") [3 times]
That's because archive-mode does not support .tar or .gz files. From
arc-mode.el (Emacs 22.2):
;; ARCHIVE TYPES: Currently only the archives below are handled, but the
;; structure for handling just about anything is in place.
;;
;; Arc Lzh Zip Zoo
;; --------------------------------
;; View listing Intern Intern Intern Intern
;; Extract member Y Y Y Y
;; Save changed member Y Y Y Y
;; Add new member N N N N
;; Delete member Y Y Y Y
;; Rename member Y Y N N
;; Chmod - Y Y -
;; Chown - Y - -
;; Chgrp - Y - -
...
(defun archive-find-type ()
(widen)
(goto-char (point-min))
;; The funny [] here make it unlikely that the .elc file will be treated
;; as an archive by other software.
(let (case-fold-search)
(cond ((looking-at "[P]K\003\004") 'zip)
((looking-at "..-l[hz][0-9ds]-") 'lzh)
((looking-at "....................[\334]\247\304\375") 'zoo)
((and (looking-at "\C-z") ; signature too simple, IMHO
(string-match "\\.[aA][rR][cC]$"
(or buffer-file-name (buffer-name))))
'arc)
;; This pattern modelled on the BSD/GNU+Linux `file' command.
;; Have seen capital "LHA's", and file has lower case "LHa's"
too.
;; Note this regexp is also in archive-exe-p.
((looking-at "MZ\\(.\\|\n\\)\\{34\\}LH[aA]'s SFX ") 'lzh-exe)
(t (error "Buffer format not recognized")))))
--
Kevin Rodgers
Denver, Colorado, USA
next prev parent reply other threads:[~2008-07-08 7:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 22:59 Trouble getting archives to load as archives Davin Pearson
2008-07-04 5:38 ` Thierry Volpiatto
2008-07-05 1:37 ` Davin Pearson
2008-07-06 10:59 ` Thierry Volpiatto
2008-07-04 21:57 ` Peter Dyballa
[not found] ` <mailman.14225.1215208751.18990.help-gnu-emacs@gnu.org>
2008-07-05 1:32 ` Davin Pearson
2008-07-05 2:23 ` Bernardo Bacic
2008-07-05 2:57 ` Davin Pearson
2008-07-05 8:19 ` Peter Dyballa
2008-07-06 8:21 ` Davin Pearson
2008-07-08 7:00 ` Kevin Rodgers [this message]
2008-07-08 7:23 ` Peter Dyballa
2008-07-08 10:52 ` Bernardo Bacic
2008-07-08 11:24 ` Peter Dyballa
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='g4v3aa$p0q$1@ger.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--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).