From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build: arc-mode Date: Sat, 18 May 2019 05:56:04 +0200 Message-ID: References: <83d0khb888.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="115528"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 18 05:56:19 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRqSJ-000TwC-Du for ged-emacs-devel@m.gmane.org; Sat, 18 May 2019 05:56:19 +0200 Original-Received: from localhost ([127.0.0.1]:57186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRqSH-0007Bq-Ug for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 23:56:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRqSB-0007Bi-Ik for emacs-devel@gnu.org; Fri, 17 May 2019 23:56:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRqSA-0007RA-7v for emacs-devel@gnu.org; Fri, 17 May 2019 23:56:11 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:45846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRqSA-0007QK-1Q; Fri, 17 May 2019 23:56:10 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hRqS5-0003y6-1W; Sat, 18 May 2019 05:56:07 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXmkRvfbAesPgL99sry rzH3zl1FEgDOGxF/AAACUUlEQVQ4jX2TsXbbMAxFwYTqTLDOXrInmtMi7EydULttkd6rnur/P6EP lBM7S7nY4iWIhweQYoxEw5HeV5lbK5lG/dtEUisFG2TwbUs/sa3Ozi3VgpWJsfq2pW1bA4JwCsD4 wMROrwFQQhz103hkVGBnBdsa47jhLBlIcdwldNBXBAEICCifwBqDXgWsKso9iM5wZAWlq3oH43rI ZNhZLYhuAGio2ME+ftwnMMMMVKuA78HvRVK2TWADeVo9argKXkReaV528A3+XEEASHAXjhpPh5on GNGByHkoILWYSAPEGWa9LrxJsWSRXsGMOl1mDYns8t4szYEGuLkav7tlUIDZAWxbBCB+AVAHM9v5 iDpC/AotMKluMa7aC6TQHn97kg54eVBADlViNDxBu0ibAE5xXJnf8FnRY5IOoOEtmTHwU8PJhqm4 RmTmx4RC0f0Zs3T8uKoaHuSo/WPkwLm4A+jlJ0jA9BwWzeG3GzjAQBMRCNvNuH6AeIDn2YcZFxf4 sIN08qvr3KmpBEtpz+0xwtqNzDCdENCvSk0nkDW2GGvpAQFdVW2GPXfwOjnS3qCg1rJrE3R2M6Qy 5hizhxeQxzCffLwCSCpVp5vsFMNQmX3YQRdZCroFm4aEPoZHuZGa8eKYrEyIuAOI0f5mKyfvw3AH 0AgkK1YSjH0UbYXsHgnkYsRETh2cz3/Of3+dHwAJfpQi8gKQXi6X7fL8c2wdJBCUHPfky5KSpLQA yNLmRX6s8V6uRqgPdISLV9DO358vyw5yHG/guhSkKcb/ATyyu/UP4P3eizSDL+EAAAAASUVORK5C YII= In-Reply-To: <83d0khb888.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 May 2019 15:01:27 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.231.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236686 Archived-At: Eli Zaretskii 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) delete-char(249) (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