unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57636: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
@ 2022-09-07  4:00 Sam James
  2022-09-07 11:35 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Sam James @ 2022-09-07  4:00 UTC (permalink / raw)
  To: 57636; +Cc: Sam James

* lisp/info.el (Info-suffix-list): Recognize .zst file extension from the
zstd compression tool. This allos reading Info pages compressed with zstandard.
---
 lisp/info.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/info.el b/lisp/info.el
index 1a58910c3a..fdbe1f9b90 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -451,6 +451,7 @@ or `Info-virtual-nodes'."
        (".info.z"    . "gunzip")
        (".info.bz2"  . ("bzip2" "-dc"))
        (".info.xz"   . "unxz")
+       (".info.zst"  . ("unzstd" "--rm" "-q"))
        (".info"      . nil)
        ("-info.Z"    . "uncompress")
        ("-info.Y"    . "unyabba")
@@ -458,6 +459,7 @@ or `Info-virtual-nodes'."
        ("-info.bz2"  . ("bzip2" "-dc"))
        ("-info.z"    . "gunzip")
        ("-info.xz"   . "unxz")
+       ("-info.zst"  . ("unzstd" "--rm" "-q"))
        ("-info"      . nil)
        ("/index.Z"   . "uncompress")
        ("/index.Y"   . "unyabba")
@@ -465,6 +467,7 @@ or `Info-virtual-nodes'."
        ("/index.z"   . "gunzip")
        ("/index.bz2" . ("bzip2" "-dc"))
        ("/index.xz"  . "unxz")
+       ("/index.zst" . ("unzstd" "--rm" "-q"))
        ("/index"     . nil)
        (".Z"         . "uncompress")
        (".Y"         . "unyabba")
@@ -472,6 +475,7 @@ or `Info-virtual-nodes'."
        (".z"         . "gunzip")
        (".bz2"       . ("bzip2" "-dc"))
        (".xz"        . "unxz")
+       (".zst"       . ("unzstd" "--rm" "-q"))
        (""           . nil)))
   "List of file name suffixes and associated decoding commands.
 Each entry should be (SUFFIX . STRING); the file is given to
-- 
2.37.3






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#57636: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
  2022-09-07  4:00 bug#57636: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el Sam James
@ 2022-09-07 11:35 ` Eli Zaretskii
  2022-09-08  2:10   ` Sam James
  2022-09-08  2:57   ` bug#57665: " Sam James
  0 siblings, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-09-07 11:35 UTC (permalink / raw)
  To: Sam James; +Cc: 57636

> Cc: Sam James <sam@gentoo.org>
> From: Sam James <sam@gentoo.org>
> Date: Wed,  7 Sep 2022 05:00:40 +0100
> 
> * lisp/info.el (Info-suffix-list): Recognize .zst file extension from the
> zstd compression tool. This allos reading Info pages compressed with zstandard.
> ---
>  lisp/info.el | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/lisp/info.el b/lisp/info.el
> index 1a58910c3a..fdbe1f9b90 100644
> --- a/lisp/info.el
> +++ b/lisp/info.el
> @@ -451,6 +451,7 @@ or `Info-virtual-nodes'."
>         (".info.z"    . "gunzip")
>         (".info.bz2"  . ("bzip2" "-dc"))
>         (".info.xz"   . "unxz")
> +       (".info.zst"  . ("unzstd" "--rm" "-q"))

Thanks, but I don't think I understand the --rm part: these commands
aren't supposed to replace the original compressed file with its
decompressed version, they are supposed to write the decompressed text
to stdout, where it will be read by Emacs and displayed, and leave the
original compressed files alone.

So I think you want "-dc", not "--rm -q".  Am I missing something?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#57636: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
  2022-09-07 11:35 ` Eli Zaretskii
@ 2022-09-08  2:10   ` Sam James
  2022-09-08  3:03     ` Sam James
  2022-09-08  2:57   ` bug#57665: " Sam James
  1 sibling, 1 reply; 8+ messages in thread
From: Sam James @ 2022-09-08  2:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57636

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]



> On 7 Sep 2022, at 12:35, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Cc: Sam James <sam@gentoo.org>
>> From: Sam James <sam@gentoo.org>
>> Date: Wed,  7 Sep 2022 05:00:40 +0100
>> 
>> * lisp/info.el (Info-suffix-list): Recognize .zst file extension from the
>> zstd compression tool. This allos reading Info pages compressed with zstandard.
>> ---
>> lisp/info.el | 4 ++++
>> 1 file changed, 4 insertions(+)
>> 
>> diff --git a/lisp/info.el b/lisp/info.el
>> index 1a58910c3a..fdbe1f9b90 100644
>> --- a/lisp/info.el
>> +++ b/lisp/info.el
>> @@ -451,6 +451,7 @@ or `Info-virtual-nodes'."
>>        (".info.z"    . "gunzip")
>>        (".info.bz2"  . ("bzip2" "-dc"))
>>        (".info.xz"   . "unxz")
>> +       (".info.zst"  . ("unzstd" "--rm" "-q"))
> 
> Thanks, but I don't think I understand the --rm part: these commands
> aren't supposed to replace the original compressed file with its
> decompressed version, they are supposed to write the decompressed text
> to stdout, where it will be read by Emacs and displayed, and leave the
> original compressed files alone.
> 
> So I think you want "-dc", not "--rm -q".  Am I missing something?

You're missing nothing and you're exactly right. Apologies
tor the error -- that seems obvious now!

I'll send a fixed version shortly.

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#57665: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
  2022-09-07 11:35 ` Eli Zaretskii
  2022-09-08  2:10   ` Sam James
@ 2022-09-08  2:57   ` Sam James
  2022-09-08  2:59     ` Sam James
  1 sibling, 1 reply; 8+ messages in thread
From: Sam James @ 2022-09-08  2:57 UTC (permalink / raw)
  To: 57665; +Cc: Sam James

* lisp/info.el (Info-suffix-list): Recognize .zst file extension from the
zstd compression tool. This allos reading Info pages compressed with zstandard.

Signed-off-by: Sam James <sam@gentoo.org>
---
 lisp/info.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/info.el b/lisp/info.el
index 1a58910c3a..292bf93a6f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -451,6 +451,7 @@ or `Info-virtual-nodes'."
        (".info.z"    . "gunzip")
        (".info.bz2"  . ("bzip2" "-dc"))
        (".info.xz"   . "unxz")
+       (".info.zst"  . ("zstd" "-dc"))
        (".info"      . nil)
        ("-info.Z"    . "uncompress")
        ("-info.Y"    . "unyabba")
@@ -458,6 +459,7 @@ or `Info-virtual-nodes'."
        ("-info.bz2"  . ("bzip2" "-dc"))
        ("-info.z"    . "gunzip")
        ("-info.xz"   . "unxz")
+       ("-info.zst"  . ("zstd" "-dc"))
        ("-info"      . nil)
        ("/index.Z"   . "uncompress")
        ("/index.Y"   . "unyabba")
@@ -465,6 +467,7 @@ or `Info-virtual-nodes'."
        ("/index.z"   . "gunzip")
        ("/index.bz2" . ("bzip2" "-dc"))
        ("/index.xz"  . "unxz")
+       ("/index.zst" . ("zstd" "-dc"))
        ("/index"     . nil)
        (".Z"         . "uncompress")
        (".Y"         . "unyabba")
@@ -472,6 +475,7 @@ or `Info-virtual-nodes'."
        (".z"         . "gunzip")
        (".bz2"       . ("bzip2" "-dc"))
        (".xz"        . "unxz")
+       (".zst"       . ("zstd" "-dc"))
        (""           . nil)))
   "List of file name suffixes and associated decoding commands.
 Each entry should be (SUFFIX . STRING); the file is given to
-- 
2.37.3






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#57665: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
  2022-09-08  2:57   ` bug#57665: " Sam James
@ 2022-09-08  2:59     ` Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-09-08  2:59 UTC (permalink / raw)
  To: 57665

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]



> On 8 Sep 2022, at 03:57, Sam James <sam@gentoo.org> wrote:
> 
> * lisp/info.el (Info-suffix-list): Recognize .zst file extension from the
> zstd compression tool. This allos reading Info pages compressed with zstandard.
> 
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
> lisp/info.el | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> 

Bleh, sorry, ignore, it's a duplicate of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57636.

It was supposed to send in reply but it didn't work.


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#57636: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
  2022-09-08  2:10   ` Sam James
@ 2022-09-08  3:03     ` Sam James
  2022-09-08  8:52       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Sam James @ 2022-09-08  3:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57636

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

From f5b4f91e74de2a1b724d978f6ca4f25c78a50389 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Wed, 7 Sep 2022 04:57:33 +0100
Subject: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el

* lisp/info.el (Info-suffix-list): Recognize .zst file extension from the
zstd compression tool. This allos reading Info pages compressed with zstandard.

Signed-off-by: Sam James <sam@gentoo.org>
---
 lisp/info.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/info.el b/lisp/info.el
index 1a58910c3a..292bf93a6f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -451,6 +451,7 @@ or `Info-virtual-nodes'."
        (".info.z"    . "gunzip")
        (".info.bz2"  . ("bzip2" "-dc"))
        (".info.xz"   . "unxz")
+       (".info.zst"  . ("zstd" "-dc"))
        (".info"      . nil)
        ("-info.Z"    . "uncompress")
        ("-info.Y"    . "unyabba")
@@ -458,6 +459,7 @@ or `Info-virtual-nodes'."
        ("-info.bz2"  . ("bzip2" "-dc"))
        ("-info.z"    . "gunzip")
        ("-info.xz"   . "unxz")
+       ("-info.zst"  . ("zstd" "-dc"))
        ("-info"      . nil)
        ("/index.Z"   . "uncompress")
        ("/index.Y"   . "unyabba")
@@ -465,6 +467,7 @@ or `Info-virtual-nodes'."
        ("/index.z"   . "gunzip")
        ("/index.bz2" . ("bzip2" "-dc"))
        ("/index.xz"  . "unxz")
+       ("/index.zst" . ("zstd" "-dc"))
        ("/index"     . nil)
        (".Z"         . "uncompress")
        (".Y"         . "unyabba")
@@ -472,6 +475,7 @@ or `Info-virtual-nodes'."
        (".z"         . "gunzip")
        (".bz2"       . ("bzip2" "-dc"))
        (".xz"        . "unxz")
+       (".zst"       . ("zstd" "-dc"))
        (""           . nil)))
   "List of file name suffixes and associated decoding commands.
 Each entry should be (SUFFIX . STRING); the file is given to
--
2.37.3


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#57636: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
  2022-09-08  3:03     ` Sam James
@ 2022-09-08  8:52       ` Eli Zaretskii
  2022-09-09  4:21         ` Sam James
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-09-08  8:52 UTC (permalink / raw)
  To: Sam James; +Cc: 57636-done

> From: Sam James <sam@gentoo.org>
> Date: Thu, 8 Sep 2022 04:03:55 +0100
> Cc: 57636@debbugs.gnu.org
> 
> From f5b4f91e74de2a1b724d978f6ca4f25c78a50389 Mon Sep 17 00:00:00 2001
> From: Sam James <sam@gentoo.org>
> Date: Wed, 7 Sep 2022 04:57:33 +0100
> Subject: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
> 
> * lisp/info.el (Info-suffix-list): Recognize .zst file extension from the
> zstd compression tool. This allos reading Info pages compressed with zstandard.
> 
> Signed-off-by: Sam James <sam@gentoo.org>

Thanks, installed on the master branch.

For the future, please observe some of our coding conventions that in
this case caused me some manual work while applying the patch:

  . don't use Signed-off-by, our commit hooks reject that
  . lines in commit log messages should be shorter than 78 characters
  . we mention the bug number, when appropriate, in the commit log






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#57636: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
  2022-09-08  8:52       ` Eli Zaretskii
@ 2022-09-09  4:21         ` Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-09-09  4:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57636-done

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]



> On 8 Sep 2022, at 09:52, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Sam James <sam@gentoo.org>
>> Date: Thu, 8 Sep 2022 04:03:55 +0100
>> Cc: 57636@debbugs.gnu.org
>> 
>> From f5b4f91e74de2a1b724d978f6ca4f25c78a50389 Mon Sep 17 00:00:00 2001
>> From: Sam James <sam@gentoo.org>
>> Date: Wed, 7 Sep 2022 04:57:33 +0100
>> Subject: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el
>> 
>> * lisp/info.el (Info-suffix-list): Recognize .zst file extension from the
>> zstd compression tool. This allos reading Info pages compressed with zstandard.
>> 
>> Signed-off-by: Sam James <sam@gentoo.org>
> 
> Thanks, installed on the master branch.
> 
> For the future, please observe some of our coding conventions that in
> this case caused me some manual work while applying the patch:
> 
>  . don't use Signed-off-by, our commit hooks reject that
>  . lines in commit log messages should be shorter than 78 characters
>  . we mention the bug number, when appropriate, in the commit log
> 

Many thanks and I'll keep these notes in mind.

I was struggling a bit with the ChangeLog format
as I've not had to use it much before, so
apologies for the line length issue too.

Appreciate the help & merge!

Best,
sam

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-09  4:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07  4:00 bug#57636: [PATCH] Recognize zstandard (.zst) suffix in lisp/info.el Sam James
2022-09-07 11:35 ` Eli Zaretskii
2022-09-08  2:10   ` Sam James
2022-09-08  3:03     ` Sam James
2022-09-08  8:52       ` Eli Zaretskii
2022-09-09  4:21         ` Sam James
2022-09-08  2:57   ` bug#57665: " Sam James
2022-09-08  2:59     ` Sam James

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).