From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Daniel M Coffman Newsgroups: gmane.emacs.bugs Subject: Proposal for improvement in arc-mode.el Date: Mon, 19 Apr 2004 14:38:50 -0400 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1082402313 25693 80.91.224.253 (19 Apr 2004 19:18:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2004 19:18:33 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 19 21:18:23 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFeHe-0008O5-00 for ; Mon, 19 Apr 2004 21:18:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFeGD-0006Pu-Mj for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Apr 2004 15:16:53 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BFeFA-00066y-JO for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2004 15:15:48 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BFeEb-0005vd-Py for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2004 15:15:46 -0400 Original-Received: from [32.97.182.101] (helo=e1.ny.us.ibm.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1BFdfW-0006m2-5a for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2004 14:38:58 -0400 Original-Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e1.ny.us.ibm.com (8.12.10/NS PXFA) with ESMTP id i3JIcr8F466434 for ; Mon, 19 Apr 2004 14:38:53 -0400 Original-Received: from d01ml604.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by northrelay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i3JIdJvC091612 for ; Mon, 19 Apr 2004 14:39:19 -0400 X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Original-To: X-MIMETrack: Serialize by Router on D01ML604/01/M/IBM(Release 6.51HF141 | April 6, 2004) at 04/19/2004 14:38:52 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:7662 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:7662 Dear sirs, I have recently begun emacs 21.3 to peruse and edit some large archive files, specifically .war files. I discovered that if the .war files contain a .jar themselves, I am unable to open files within these "secondary" .jar files. I traced the problem to the function archive-maybe-copy in arc-mode.el This function assumes that the file from the secondary .jar file may be copied to the root of the previously created temporary directory. However, both the original .war and the secondary .jar files may contain an additional quasi directory structure themselves and so this copy will fail. I have found that adding the following code alleviates this problem. It creates the required additional directories in sequence. ;; DMC change. 3-17-2004 ;; This procedure for creating the appropriate directory seems inadequate ;; as the archive-name itself may contain directory specifications. To ;; improve this ... ;; First, make the base directory (make-directory archive-tmpdir t) ;; Now parse apart archive-name and remove any directory specifications, separated by "/" (let ((archive-temp-name archive-name) (archive-temp-tmpdir archive-tmpdir) (seperator-index nil)) (while (setq seperator-index (string-match "/" archive-temp-name)) (setq archive-temp-tmpdir (concat archive-temp-tmpdir "/" (substring archive-temp-name 0 seperator-index))) (setq archive-temp-name (substring archive-temp-name (1+ seperator-index))) ;; Make the subdirectories in turn. (make-directory archive-temp-tmpdir t))) ;; End DMC change This code should be added at line 800 of the arc-mode.el file distributed with emacs 21.3. I have tested this code under Windows 2000 and Windows NT 4.0 and under AIX 5. I look forward to your response. With best regards, Dan Coffman IBM Research