From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: ynyaaa@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#38917: 26.3; tar-mode bugs and suggestions Date: Sat, 04 Jan 2020 23:04:11 +0900 Message-ID: <868smntj1g.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="201424"; mail-complaints-to="usenet@blaine.gmane.org" To: 38917@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 04 15:05:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ink3E-000qGI-2s for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2020 15:05:12 +0100 Original-Received: from localhost ([::1]:34224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ink3C-0006ih-8E for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2020 09:05:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33368) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ink36-0006iU-4V for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 09:05:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ink34-0000Sf-Hy for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 09:05:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36597) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ink34-0000Ru-5W for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 09:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ink33-0002cH-Qg for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 09:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ynyaaa@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2020 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38917 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157814666810006 (code B ref -1); Sat, 04 Jan 2020 14:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jan 2020 14:04:28 +0000 Original-Received: from localhost ([127.0.0.1]:42569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ink2V-0002bK-GB for submit@debbugs.gnu.org; Sat, 04 Jan 2020 09:04:27 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:49636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ink2U-0002bC-7p for submit@debbugs.gnu.org; Sat, 04 Jan 2020 09:04:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60762) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ink2S-0006eY-FU for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 09:04:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ink2Q-0008Jr-RR for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 09:04:24 -0500 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:39174) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ink2Q-0008JR-Kv for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 09:04:22 -0500 Original-Received: by mail-pf1-x430.google.com with SMTP id q10so24812971pfs.6 for ; Sat, 04 Jan 2020 06:04:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=t6c9wVHjAoZ+m3HojEji/++0qb7bIxS42AN3TEruN44=; b=skvY03StZ9jr5WbzJAhwUEJx+hErVTLpkzGeZO4zpJ3vwJwXiEwRrcNRvl4XuxMn6u xoZ3BEEP5GNlbh88s3ktEvm9AihiAkXQqgi7HPEaWVxxzz0hfr0sgU/PatXNCHhbXenF yJ+uWCUriKfUqvWLr387jy1I5S/+PW3ByPO7oV6wPoOA05e3kGXWrUWVF/2fAqxI/c5C DUAunbxWauGEgJJ2CFg2IPPmvwjwZjXdD1CFTqxKkrL39IYa5zMby5JLghY8pMocHyfw OKrj2KTjijEifxdrP21GvpNg2I/UBELvJM2CXc8EZTtkwRfeWF1SWdy2ZVLUTy1d8SzN 92Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=t6c9wVHjAoZ+m3HojEji/++0qb7bIxS42AN3TEruN44=; b=F0kNQl1XalrED1VjW6IDi1mEoCIBqmR8Vs2U1RoW+AdJEsE3EkZFG0wvlAXtBSnzbE cQvDnu/yrTS9xHMiUDWLbAN0hZoWF3IUc3aNzxzuUFwTFtHeeLsc/BPTQ5Cyt3hoyjjD 6DknVK8Aac/5/uLMM1PchwC2/wY4/oPnoZuPqmBhVMnAFt+zyEsEIz2ErPv9JM1lT7P9 KDfLOqzAzM42kbSDncVPfNqXRT3urbBR6+UZXBFI7CBY9iLJ/ENYJ6eatkaeoQxPd98N YdjOnzOXLs+vpUq1bpH5Kd3mYQrz2tNjL0vJzF1sGAMtSGtwOoJbLa4MdUEUHFYiwOG9 qCug== X-Gm-Message-State: APjAAAX2d1ALQmAnbkXeaK6RqIa16wkhDesgdopL5OQyPZ7M+TaielSB klH0QildmNM9c/lXsq7fU/SZgk51 X-Google-Smtp-Source: APXvYqw/bJyejnehbaSCpB0+/ieRg2tGOrMrD7ksOQ3IQPDJBLjWAFk5j9lLE2U20+hIr3xvC3/g5A== X-Received: by 2002:a62:7696:: with SMTP id r144mr57694758pfc.177.1578146660636; Sat, 04 Jan 2020 06:04:20 -0800 (PST) Original-Received: from HP (east42-p111.eaccess.hi-ho.ne.jp. [219.121.173.112]) by smtp.gmail.com with ESMTPSA id v4sm55651597pfn.181.2020.01.04.06.04.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Jan 2020 06:04:19 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org 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 Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174162 Archived-At: Here are some bug reports of tar-mode and suggestions of new functionalities. (1)tar-mode buffer is not read only. Normal editing commands are allowed and the buffer is easily broken. For example, Tab key inserts a tab character. (2)Tar subfile coding system may be inappropriate. If a subfile is an ASCII text, buffer-file-coding-system of the subfile buffer is 'undecided or an EOL type variant. And if non-ASCII characters are added, utf-8-unix or an EOL type variant is silently used to save the subfile buffer. For a real file, (default-value 'buffer-file-coding-system) or an EOL type variant is used if encodable, otherwise a new coding system is asked. If a coding system of a subfile is detected and non-encodable characters are added, they are silently replaced with SPCs when saving. For a real file, a new coding system is asked. (3)Saving tar subfile does not mark the entry in tar-mode as modified. Edit and save a subfile, the entry should marked with a '*' character. Altering an attribute also needs to mark the entry. #'tar-alter-one-field should call #'tar-header-block-summarize with MOD-P=t. (4)Cancelling 'g'(revert-buffer) clears the buffer modified flag. Edit and save a subfile, tar-mode buffer is flagged as modified. Then type 'g', emacs asks whether to revert really, and answer 'no'. The modified flag of the tar-mode buffer is cleared. 'C-x C-s' reports '(No changes need to be saved)', and file is not saved. (5)'d'(tar-flag-deleted) or 'u'(tar-unflag) flags the buffer as modified. Only marking or unmarking does not edit the real data for a tar file, then the tar-mode buffer's modified flag should not be changed. (6)'r'(tar-rename-entry) should check new name. A name for a regular file entry should not end with '/'. And a directory entry name should end with '/'. Also, these points may be checked: a path containing consecutive '/'s a path containing '.' or '..' a path starting with '/' a path starting with a drive letter like 'c:' inappropriate characters for a real file reserved names in MS-DOS such as 'CON' a name allready used for another entry (7)A tar file needs 2 blocks of 512 nuls at the end. If the last entry is a regular file and its data block ends at 512*20 bytes with a non-zero length padding, the saved tar file size may be 512*20 bytes. The file is warned 'premature end of file'. In #'tar-pad-to-blocksize, the local variable 'pad-to' is wrong. Detailed procedure to reproduce: Prepare a tar file with only one entry(regular file). Edit the subfile so that 512*18 < subfile size < 512*19. Save the subfile and save the tar file. The size of the tar file is 10240, and it lacks blocks of nuls. Type 'g' and answer 'yes', the warning is displayed. (8)'I'(tar-new-entry) changes the tar file size not to multiple of 10240. #'tar-new-entry simply increases the size of a tar file by 512. #'tar-pad-to-blocksize should be called. The following parts are suggestions. (A)Allow 'I'(tar-new-entry) to create a directory entry. When the path name is ending with '/'. (B)Control visibility of subfile attributes. Add 'invisible text property on each attribute text. Setting the vatiable buffer-invisibility-spec changes the appearance. Supposed values are: file-type, user-permission, group-permission, other-permission, user-name, group-name, file-size, filie-name, link-name (C)Mark multiple subfiles and operate on them. Marking commands: Mark the current line entry. Mark a directory and descendant entries. Mark entries matching a path regexp. Mark entries with an extension. Operations: tar-copy tar-rename-entry tar-chmod-entry tar-chown-entry tar-chgrp-entry (D)Make #'tar-untar-buffer to accept a target directory. Also a subfile directory may be specified to limit extracted subfiles. (E)Move entry postions or sort entry positions. If entries are renamed, it may be better to reorder entry positions. Ordering may be lexical or numerical. frame12.jpg may be preferred to be placed before frame110.jpg. Upper/lower case may be ignored. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 built on CIRROCUMULUS Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor 'Microsoft Corp.', version 6.3.9600 Recent messages: Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2 Important settings: value of $LANG: JPN locale-coding-system: cp932 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date mule-util japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 99275 6564) (symbols 48 20225 1) (miscs 40 36 118) (strings 32 29771 1074) (string-bytes 1 764676) (vectors 16 14540) (vector-slots 8 572199 10838) (floats 8 51 66) (intervals 56 228 0) (buffers 992 11))