unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel M Coffman <coffmand@us.ibm.com>
Subject: Proposal for improvement in arc-mode.el
Date: Mon, 19 Apr 2004 14:38:50 -0400	[thread overview]
Message-ID: <OFAD55565A.85020228-ON85256E7B.0064FB21-85256E7B.0066082E@us.ibm.com> (raw)





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

                 reply	other threads:[~2004-04-19 18:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OFAD55565A.85020228-ON85256E7B.0064FB21-85256E7B.0066082E@us.ibm.com \
    --to=coffmand@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).