bug#33880: [PATCH] Compress past NEWS files during installation

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Alex Gramiak
This shaves off just over a MB off of the installation using gzip -9.
While I was at it, I put in the compression of etc/refcards/*.ps, which
covers part of a TODO.

I wanted to compress etc/refcards/*.tex as well, but I noticed that it
would affect the Makefile that is also installed. It appears to be the
only Makefile that's installed; if there's little or no reason for it,
would it be okay to remove it during installation and compress the *.tex
files as well?


0001-Compress-past-NEWS-files-and-etc-refcards-.ps.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Alex Gramiak
[hidden email] writes:

> This shaves off just over a MB off of the installation using gzip -9.
> While I was at it, I put in the compression of etc/refcards/*.ps, which
> covers part of a TODO.
>
> I wanted to compress etc/refcards/*.tex as well, but I noticed that it
> would affect the Makefile that is also installed. It appears to be the
> only Makefile that's installed; if there's little or no reason for it,
> would it be okay to remove it during installation and compress the *.tex
> files as well?

Ping.  Is this okay to apply to master?



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Eli Zaretskii
> From: Alex <[hidden email]>
> Cc: Eli Zaretskii <[hidden email]>
> Date: Thu, 14 Mar 2019 08:57:13 -0600
>
> [hidden email] writes:
>
> > This shaves off just over a MB off of the installation using gzip -9.
> > While I was at it, I put in the compression of etc/refcards/*.ps, which
> > covers part of a TODO.
> >
> > I wanted to compress etc/refcards/*.tex as well, but I noticed that it
> > would affect the Makefile that is also installed. It appears to be the
> > only Makefile that's installed; if there's little or no reason for it,
> > would it be okay to remove it during installation and compress the *.tex
> > files as well?
>
> Ping.  Is this okay to apply to master?

Sorry for not responding earlier.

I don't think compressing *.ps files is a good idea, because then they
cannot be printed without manually uncompressing them.

As for NEWS, I don't have a strong opinion, but it sounds like a very
small gain for the trouble.  What do others think?  Perhaps this
should be discussed on emacs-devel first.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Alex Gramiak
Eli Zaretskii <[hidden email]> writes:

> Sorry for not responding earlier.

No worries.

> I don't think compressing *.ps files is a good idea, because then they
> cannot be printed without manually uncompressing them.

That makes sense; I just saw the TODO and figured that I might as well
do it while I was there.

> As for NEWS, I don't have a strong opinion, but it sounds like a very
> small gain for the trouble.  What do others think?  Perhaps this
> should be discussed on emacs-devel first.
>
> Thanks.

I don't think it's much trouble (though I admit that a MB isn't much of
a deal these days), especially after the patch has already been made.

I'll make a thread over there.



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Michael Albinus
In reply to this post by Eli Zaretskii
Eli Zaretskii <[hidden email]> writes:

> As for NEWS, I don't have a strong opinion, but it sounds like a very
> small gain for the trouble.  What do others think?  Perhaps this
> should be discussed on emacs-devel first.

IIRC, Stefan wrote a small code snippet which scans NEWS files and tries
to determine, when a Lisp object was added to Emacs. I don't know
whether this would still work with compressed NEWS files.

Given, that disk space of 1 MB is nothing today, I'm not in favour of
such a compression. I don't know what it is good for, honestly.

> Thanks.

Best regards, Michael.



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Alex Gramiak
Michael Albinus <[hidden email]> writes:

> Eli Zaretskii <[hidden email]> writes:
>
>> As for NEWS, I don't have a strong opinion, but it sounds like a very
>> small gain for the trouble.  What do others think?  Perhaps this
>> should be discussed on emacs-devel first.
>
> IIRC, Stefan wrote a small code snippet which scans NEWS files and tries
> to determine, when a Lisp object was added to Emacs. I don't know
> whether this would still work with compressed NEWS files.

It should work similarly to scanning *.el.gz files. Depending on how the
snippet was made (e.g., with a regex that accepts *.gz NEWS files), it
might even work with no changes.

> Given, that disk space of 1 MB is nothing today, I'm not in favour of
> such a compression. I don't know what it is good for, honestly.

It's indeed barely anything, but I also don't see much of a reason to
not do it. If we're already compressing a bunch of files, why not
compress the stale NEWS files at the same time?



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Eli Zaretskii
> From: Alex <[hidden email]>
> Cc: Eli Zaretskii <[hidden email]>,  [hidden email]
> Date: Thu, 14 Mar 2019 10:23:16 -0600
>
> It's indeed barely anything, but I also don't see much of a reason to
> not do it. If we're already compressing a bunch of files, why not
> compress the stale NEWS files at the same time?

FWIW, I use those "stale" NEWS files all the time, because I
frequently need to establish what was a version of Emacs where some
feature was first introduced or announced.



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Alex Gramiak
Eli Zaretskii <[hidden email]> writes:

>> From: Alex <[hidden email]>
>> Cc: Eli Zaretskii <[hidden email]>,  [hidden email]
>> Date: Thu, 14 Mar 2019 10:23:16 -0600
>>
>> It's indeed barely anything, but I also don't see much of a reason to
>> not do it. If we're already compressing a bunch of files, why not
>> compress the stale NEWS files at the same time?
>
> FWIW, I use those "stale" NEWS files all the time, because I
> frequently need to establish what was a version of Emacs where some
> feature was first introduced or announced.

Oh, I didn't mean that "no one uses these dusty old files", but rather
"no one often uses these files outside of Emacs". If you view them in
Emacs, then `auto-compression-mode' decompresses the files on the fly. I
think compression here is less of an issue than it is for Emacs Lisp
files, which are already compressed and used for source code lookup all
the time.



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Glenn Morris-3

FWIW, I think files like NEWS belong in /usr/share/doc
(bug#25781, I haven't found any time to work on it yet).
I think compressing the files installed there would be very natural.
(Eg Debian seems to compress text files in /usr/share/doc by default.
Looks like Red Hat does not, though.)



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Eli Zaretskii
In reply to this post by Alex Gramiak
> From: Alex <[hidden email]>
> Cc: [hidden email],  [hidden email]
> Date: Thu, 14 Mar 2019 15:33:24 -0600
>
> If you view them in Emacs, then `auto-compression-mode' decompresses
> the files on the fly.

I usually grep them outside Emacs.



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Alex Gramiak
Eli Zaretskii <[hidden email]> writes:

>> From: Alex <[hidden email]>
>> Cc: [hidden email],  [hidden email]
>> Date: Thu, 14 Mar 2019 15:33:24 -0600
>>
>> If you view them in Emacs, then `auto-compression-mode' decompresses
>> the files on the fly.
>
> I usually grep them outside Emacs.

Any chance you have zgrep on your system?

If not, then do you not have an uncompressed git repository directory to
grep?



Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Eli Zaretskii
> From: Alex <[hidden email]>
> Cc: [hidden email]
> Date: Sat, 16 Mar 2019 12:28:16 -0600
>
> > I usually grep them outside Emacs.
>
> Any chance you have zgrep on your system?

It's a Posix shell script, so not very useful on MS-Windows.

> If not, then do you not have an uncompressed git repository directory to
> grep?

Not on every machine I work on.  Besides, sometimes I need to look in
a released Emacs, whose sources are in a separate tree.




Reply | Threaded
Open this post in threaded view
|

bug#33880: [PATCH] Compress past NEWS files during installation

Michael Albinus
In reply to this post by Alex Gramiak
Alex <[hidden email]> writes:

Hi Alex,

>>> If you view them in Emacs, then `auto-compression-mode' decompresses
>>> the files on the fly.
>>
>> I usually grep them outside Emacs.
>
> Any chance you have zgrep on your system?

I believe we could find a solution for all these problems. But I still
don't understand why we should.

Maybe you said it already, and I didn't care enough: could you pls say,
what is the advantage of compressed NEWS files, that we must do this.

Best regards, Michael