From: Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Adam Sjøgren" <asjo@koldfront.dk>
Cc: 61326@debbugs.gnu.org
Subject: bug#61326: Adding --no-add-suffix to zip patch
Date: Wed, 08 Feb 2023 09:21:11 +0800 [thread overview]
Message-ID: <sdvzg9pc59a.fsf@fw.net.yu> (raw)
In-Reply-To: <87ilgdjlga.fsf@tullinup.koldfront.dk>
Adam Sjøgren via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> writes:
> Ruijie writes:
>
>> 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.
>
> That sounds like a good solution, for archives with no '.' in the filename.
>
> I guess the main problem is if the archive is huge, updating an existing
> archive might (?) be more efficient than creating an entirely new one.
>
> Another way to go about it could be to temporarily rename the archive to
> have a name with a '.' in it, make the change, and then rename it back;
> conceptually:
>
> mv a a.zip
> # update a.zip rather than a
> mv a.zip a
>
> That has its own set of possible problems.
>
> Maybe you could make a link to the original archive, where the link has
> a '.' in the name, have zip update the file via the link and then remove
> the link again; conceptually:
>
> ln a a.zip
> # update a.zip rather than a
> rm a.zip
>
> I think I like this the most, but again...
I like the link solution, but I don't think we can reliably "link"
without knowing that we actually can do so -- i.e., on MS Windows, IIUC,
one needs admin privilege to create symlinks on cmd unless something in
the registry is changed. Also, on old MS Windows versions like XP and
earier, I believe it is impossible to create symlinks at all. (Do we
still support them?)
Come to think of it, I think your mv idea might be better and even
easier to implement than my zip-offsite-then-overwrite idea. I might
lean towards that method if people have no bias when I work on the patch
in a couple hours.
Best,
RY
next prev parent reply other threads:[~2023-02-08 1:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 17:00 bug#61326: 30.0.50; Editing fil in zip file without extension save creates new file Adam Sjøgren via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-06 18:04 ` Eli Zaretskii
2023-02-06 18:15 ` Adam Sjøgren via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-06 18:57 ` bug#61326: Adding --no-add-suffix to zip patch Adam Sjøgren via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-07 1:31 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-07 3:27 ` Eli Zaretskii
2023-02-07 13:53 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-07 14:54 ` Eli Zaretskii
2023-02-08 16:48 ` bug#61326: [DRAFT PATCH] Work around zip's filename extension limitation (was: Adding --no-add-suffix to zip patch) Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-08 18:02 ` Eli Zaretskii
2023-02-10 8:40 ` bug#61326: [DRAFT PATCH v2] " Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-13 10:35 ` bug#61326: [DRAFT PATCH v3] " Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-04 11:21 ` Eli Zaretskii
2023-03-04 14:56 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-04 15:12 ` Eli Zaretskii
2023-03-05 15:23 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-05 15:52 ` Eli Zaretskii
2023-03-06 4:05 ` bug#61326: [DRAFT PATCH v4] " Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11 8:54 ` Eli Zaretskii
2023-03-11 8:57 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-17 3:19 ` bug#61326: [DRAFT PATCH v5] " Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-17 8:48 ` bug#61326: [PATCH " Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-20 7:47 ` Eli Zaretskii
2023-04-20 8:49 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-20 9:29 ` Eli Zaretskii
2023-02-07 19:59 ` bug#61326: Adding --no-add-suffix to zip patch Adam Sjøgren via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-08 1:21 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-08 3:28 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sdvzg9pc59a.fsf@fw.net.yu \
--to=bug-gnu-emacs@gnu.org \
--cc=61326@debbugs.gnu.org \
--cc=asjo@koldfront.dk \
--cc=ruijie@netyu.xyz \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.