From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Newsgroups: gmane.emacs.help Subject: Re: odt file instant open Date: Wed, 28 Jul 2010 16:32:59 +0200 Message-ID: <4C503F9B.9020103@easy-emacs.de> References: <4C4E8B18.9080005@easy-emacs.de> <83y6cwamko.fsf@gnu.org> <4C4F1889.3020606@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1280327468 1363 80.91.229.12 (28 Jul 2010 14:31:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2010 14:31:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 28 16:31:06 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oe7ew-0000OK-S9 for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Jul 2010 16:31:03 +0200 Original-Received: from localhost ([127.0.0.1]:40991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe7d1-00047Z-H8 for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Jul 2010 10:29:03 -0400 Original-Received: from [140.186.70.92] (port=37082 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe7cZ-000472-DZ for help-gnu-emacs@gnu.org; Wed, 28 Jul 2010 10:28:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oe7cX-0006CE-SS for help-gnu-emacs@gnu.org; Wed, 28 Jul 2010 10:28:35 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:59126) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oe7cX-0006Bn-F2 for help-gnu-emacs@gnu.org; Wed, 28 Jul 2010 10:28:33 -0400 Original-Received: from [192.168.178.27] (p5DDB0A87.dip0.t-ipconnect.de [93.219.10.135]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LbxSO-1PNJk11hOm-00jv1M; Wed, 28 Jul 2010 16:28:29 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 In-Reply-To: X-Provags-ID: V02:K0:lgiWK6HRy5t11MHHoGTj1mqG1NcCvMoc4s51SFKmP24 Mec0zVIeCRQ6x/ryMz7cB2IzMC/qWpP9zihMSuN24uEAXNjBUY EQSeqp0JQUKxTiHxtq7W5FYkcqweNOiHyqmeSl7r9vs26FIcQS VLmFvKzT4TIqMo/YY7VPI5s7RHHDqZauYIIiKHVI2cjtbELveV Gm6RysmML54NrWabSpysNDvaLSG61XVzZ+K4A9iYYA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74318 Archived-At: 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 >>>> >>>> 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. >