help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: odt file instant open


From: Andreas Röhler
Subject: Re: odt file instant open
Date: Wed, 28 Jul 2010 16:32:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6

Am 28.07.2010 15:10, schrieb Kevin Rodgers:
Andreas Röhler wrote:
Am 27.07.2010 18:58, schrieb Eli Zaretskii:
Date: Tue, 27 Jul 2010 09:30:32 +0200
From: Andreas Röhler<andreas.roehler@easy-emacs.de>

Am 26.07.2010 18:29, schrieb Olwe Melwasul:
I'm trying to grok the open document format, so I took the first wild
and crazy step of simply trying to open it in Emacs (23.2.1) -- and it
opened up to a "Zip-Archive Narrow" view of all the files contained
therein Poking around on the Internet, I found that Emacs
automatically unpacks a .odt file, which is nothing more than a zip
file. My question is this: How is Emacs doing this?

by calling a shell-command resp. to the ending found.

No. For most archive types, arc-mode.el (and tar-mode.el) can list
the contents directly, just by reading the archive file itself.
Extracting the individual files in the archive sometimes needs to run
an external program.

Hi,

think you mistook the question.
As the OP wrote, he just opened the file without any precaution. The
surprise was: it worked.

Ignoring so for how opening was done in detail --via find-file or from
dired probably--

I think you misread the question, that is exactly what the OP asked about:

How is Emacs doing this? What code is
running (what .el is invoked) to make this happen?

arc-mode seems not involved, but auto-compression-mode from
jka-cmpr-hook.el etc.

This entry from auto-mode-alist suggests otherwise:

("\\.\\(sx[dmicw]\\|od[fgpst]\\|oxt\\)\\'" . archive-mode)


You are right here, Eli too. So the mistake is mine in this point.
.odt is handled differently from other archives as


 ("\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" nil jka-compr)
 ("\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'" nil jka-compr)
 ("\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" nil jka-compr)

where I poked around some weeks ago...

Thanks

Andreas



BTW arc-mode too recurs to shell-commands AFAIS,
(apply 'call-process
in archive-*-extract for example

Good point, which Eli made above as well. Here's what arc-mode.el says:

;; This code does not decode any files internally, although it does
;; understand the directory level of the archives.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]