[Top][All Lists]

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

Re: Towards a cleaner build: arc-mode

From: Lars Ingebrigtsen
Subject: Re: Towards a cleaner build: arc-mode
Date: Sat, 18 May 2019 05:56:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> We have get-byte nowadays, so I believe the first defsubst is not
> needed.  You just need to catch errors, maybe.


> Yes.  However, I suspect this juggling is no longer need nowadays.  If
> you just use 'insert', does arc-mode break when you invoke the
> commands that end up using these calls?  This should be tried also in
> a locale whose codeset is not UTF-8.

I'm wondering whether arc-mode.el is maintained, because it seems rather
er odd, and when I use the functions that actually use the library
functions we want to change, I'm getting bug-outs.

For instance, when renaming a file name in an .lzh archive:

Debugger entered--Lisp error: (end-of-buffer)
  (let* ((p (+ archive-proper-file-start (aref descr 4))) (oldhsize (byte-after 
p)) (oldfnlen (byte-after (+ p 21))) (newfnlen (length newname)) (newhsize (+ 
oldhsize newfnlen (- oldfnlen))) (inhibit-read-only t)) (if (> newhsize 255) 
(error "The file name is too long")) (goto-char (+ p 21)) (delete-char (1+ 
oldfnlen)) (insert-unibyte newfnlen newname) (goto-char p) (delete-char 2) 
(insert-unibyte newhsize (archive-lzh-resum p newhsize)))


  archive-lzh-rename-entry("text2" ["text.txt" "text.txt" nil nil 930])

So finding code in there that works to check whether the changes we want
to make are sound is proving a challenge.  :-)

Hm...  here's the matrix of supported functionality:

;;                      Arc     Lzh     Zip     Zoo     Rar     7z
;;                      --------------------------------------------
;; View listing         Intern  Intern  Intern  Intern  Y       Y
;; Extract member       Y       Y       Y       Y       Y       Y
;; Save changed member  Y       Y       Y       Y       N       Y
;; Add new member       N       N       N       N       N       N
;; Delete member        Y       Y       Y       Y       N       Y
;; Rename member        Y       Y       N       N       N       N
;; Chmod                -       Y       Y       -       N       N
;; Chown                -       Y       -       -       N       N
;; Chgrp                -       Y       -       -       N       N

Renaming files is only supported in .arc and .lzh files...  neither of
which are used much any more.  Perhaps those should be marked as
obsolete (especially since at least one of them don't work any more)?

Let's see...  `archive-zip-chmod-entry' actually seems to work, and uses
`insert-unibyte'...  but only on numbers, not strings, so I don't know
how to test the string part.  *scratches head*

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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