bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#61326: [DRAFT PATCH] Work around zip's filename extension limitation


From: Ruijie Yu
Subject: bug#61326: [DRAFT PATCH] Work around zip's filename extension limitation (was: Adding --no-add-suffix to zip patch)
Date: Thu, 09 Feb 2023 00:48:15 +0800
User-agent: mu4e 1.8.13; emacs 29.0.60

Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 
<bug-gnu-emacs@gnu.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> Cc: 61326@debbugs.gnu.org
>>> Date: Tue, 7 Feb 2023 09:31:11 +0800
>>> From:  Ruijie Yu via "Bug reports for GNU Emacs,
>>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>>
>>> Maybe, at least in the meantime, we change it such that all write operations
>>> for zip create files in temp, and move to / overwrite the original file when
>>> done? Although I don’t have a full understanding on how that would be done 
>>> and
>>> whether there are problems along with it.
>>
>> How about submitting a patch to do that, but only when the original
>> file doesn't have an extension?
>
> Will do.  Will report back in 2-3 days unless someone else gets to it
> first.
>
> Best,
>
>
> RY

Here is a preliminary patch that contains some "REVIEW" comments where I
need inputs.  I have tested with the following recipe and things seem to
work correctly:

$ touch 1 2 && zip z 1 2 && mv z.zip z
$ ls -l
.... 1
.... 2
.... z
$ src/emacs -Q
RET          ; open file "1" from within "z" archive
s C-x C-s    ; insert "s" and save file "1"
C-x C-c      ; exit
$ ls -l      # notice that no "z.zip" exists, and "z" is correctly updated
.... 1
.... 2
.... z

Patch based on 907fd1f7ff402f9d226ebb3b891ea5b54fac1d1c which is ~3 days
old.  I will amend the commit (and rebase if necessary) according to ML
reviews and further progress.

Attachment: 0001-lisp-arc-mode.el-Work-around-zip-s-filename-limitati.patch
Description: Text Data

Best,


RY

reply via email to

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