|
From: | Kevin Rodgers |
Subject: | Re: Trouble getting archives to load as archives |
Date: | Tue, 08 Jul 2008 01:00:34 -0600 |
User-agent: | Thunderbird 2.0.0.14 (Macintosh/20080421) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |