From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: odt file instant open Date: Wed, 28 Jul 2010 07:10:34 -0600 Message-ID: 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 1280322699 15278 80.91.229.12 (28 Jul 2010 13:11:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2010 13:11:39 +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 15:11:37 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 1Oe6Pz-0000a9-Ol for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Jul 2010 15:11:32 +0200 Original-Received: from localhost ([127.0.0.1]:42722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe6Pj-0004uA-69 for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Jul 2010 09:11:15 -0400 Original-Received: from [140.186.70.92] (port=34029 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe6PA-0004u1-7z for help-gnu-emacs@gnu.org; Wed, 28 Jul 2010 09:10:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oe6P8-0002RD-Ph for help-gnu-emacs@gnu.org; Wed, 28 Jul 2010 09:10:40 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:42612) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oe6P8-0002Qh-Do for help-gnu-emacs@gnu.org; Wed, 28 Jul 2010 09:10:38 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oe6P4-0000AO-E4 for help-gnu-emacs@gnu.org; Wed, 28 Jul 2010 15:10:34 +0200 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Jul 2010 15:10:34 +0200 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Jul 2010 15:10:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 53 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: <4C4F1889.3020606@easy-emacs.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:74313 Archived-At: 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) > 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. -- Kevin Rodgers Denver, Colorado, USA