[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to generate a zip file (not a directory) within dired
From: |
Jean Louis |
Subject: |
Re: how to generate a zip file (not a directory) within dired |
Date: |
Sun, 20 Feb 2022 15:59:36 +0300 |
User-agent: |
Mutt/2.2.0 (2022-02-12) |
* Uwe Brauer <oub@mat.ucm.es> [2022-02-20 15:01]:
>
> Hi
>
> sometime I need to generate a zip file of a single file
>
> I checked dired-compress-file-suffixes
> and it unzip zip files, but it seems not to generate them.
>
> In
> https://stackoverflow.com/questions/27567019/how-to-zip-files-recursively-in-emacs
>
> There is a solution posted, but again it does not allow me to generate a
> zip file on a single file only on a whole directory (as the title suggests),
> and that I don't
> need.
>
> Any ideas? Yes I could call dired-do-shell-command, but I want a simpler
> solution.
Solution is Z.
1) Adapt `dired-compress-file-alist' for ZIP files;
example:
(setf (alist-get "\\.zip\\'" dired-compress-file-alist) "zip -9 %o %i")
which may be placed in your init file.
2) Adapt `dired-compress-file-default-suffix' to be .ZIP
or alternatively make a function that will adapt it on the fly.
Then press Z on the file. I don't know if it will work on multiple files.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- how to generate a zip file (not a directory) within dired, Uwe Brauer, 2022/02/20
- Re: how to generate a zip file (not a directory) within dired,
Jean Louis <=
- Re: how to generate a zip file (not a directory) within dired, Uwe Brauer, 2022/02/20
- [a directory is also created] (was: how to generate a zip file (not a directory) within dired), Uwe Brauer, 2022/02/20
- [works on the comman line] (was: [a directory is also created]), Uwe Brauer, 2022/02/20
- Re: [works on the comman line] (was: [a directory is also created]), Jean Louis, 2022/02/20
- Re: [works on the comman line], Uwe Brauer, 2022/02/20
- Re: [works on the comman line], Uwe Brauer, 2022/02/20
- Re: [works on the comman line], Emanuel Berg, 2022/02/20
- Re: [works on the comman line], Uwe Brauer, 2022/02/21
- Re: [works on the comman line], Emanuel Berg, 2022/02/25
- Re: [works on the comman line] (was: [a directory is also created]), Emanuel Berg, 2022/02/20