unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Chris Moore" <christopher.ian.moore@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: jka-compr.el doesn't recognise .svgz.~1~ or .sifz files as being gzipped
Date: Thu, 24 Jan 2008 10:04:35 +0100	[thread overview]
Message-ID: <a9691ee20801240104m2c82a922u4145c8802f996900@mail.gmail.com> (raw)

Emacs knows that .svgz is a gzipped version of .svg and gunzips it on
the fly.  It doesn't know the same for .svgz.~1~ or .svgz~ (backup
files).  It also doesn't know anything about .sifz files being gzipped
.sif files ( http://synfig.org/ creates these).

I brought this up in September 2007 (Subject: jka-compr.el doesn't
recognise gzipped files from their magic bytes), but was suggesting
that gzipped-ness should be detected based on file content rather than
filename, to which Eli Zaretskii replied:

> I say, as long as we need to add a few more extensions, let's do that
> and be done.

and then a bunch of other people talked back and forth about it and
nothing got done.

So here's a patch for both problems, based on the filenames:

*** jka-cmpr-hook.el.~1.22.~    2008-01-17 09:46:16.000000000 +0100
--- jka-cmpr-hook.el    2008-01-24 09:57:09.000000000 +0100
***************
*** 200,206 ****
       "bzip2ing"        "bzip2"         nil
       "bunzip2ing"      "bzip2"         ("-d")
       nil nil "BZh"]
!     ["\\.\\(?:tgz\\|svgz\\)\\'"
       "compressing"        "gzip"         ("-c" "-q")
       "uncompressing"      "gzip"         ("-c" "-q" "-d")
       t nil "\037\213"]
--- 200,206 ----
       "bzip2ing"        "bzip2"         nil
       "bunzip2ing"      "bzip2"         ("-d")
       nil nil "BZh"]
!     ["\\.\\(?:tgz\\|svgz\\|sifz\\)\\(~\\|\\.~[0-9]+~\\)?\\'"
       "compressing"        "gzip"         ("-c" "-q")
       "uncompressing"      "gzip"         ("-c" "-q" "-d")
       t nil "\037\213"]

and uuencoded:

begin 644 jka-patch.txt.gz
M'XL("$)3F$<``VIK82UP871C:"YT>'0`S5#!3H-`$#W+5XQS$:BSF=U6$"Y-
M_`P[/2A6BJU0I?70-'R["Z0T*_'>2<CR)N_M>_O",(2/S0MEG[MO6E?51JVV
MJM'*&-7<&.9'8DTZ!D[2693J2/%Y8,*:V2.BT06#T,Q:X4.<<C(2ANZT&*SN
MWG`$W0+ZP==CL3-%F2,XFP%"66POY$/ITO^2?:0W#+R+M/OPZ7F-2^^V6RY0
M1(GX\W2?'T5.]4][!")W./ADE7WOJJZ=7+FU<IPR!*2OBQT>RK'P7QDX4?=]
M4.%I+$9/;=JV^G-C]I^NK;%37;SWQ?F-19;2+)B2Y<2B8'YU=?X"9C8[W@L#
"````
`
end

Chris.

             reply	other threads:[~2008-01-24  9:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-24  9:04 Chris Moore [this message]
2008-01-24 10:07 ` jka-compr.el doesn't recognise .svgz.~1~ or .sifz files as being gzipped Andreas Schwab

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9691ee20801240104m2c82a922u4145c8802f996900@mail.gmail.com \
    --to=christopher.ian.moore@gmail.com \
    --cc=emacs-pretest-bug@gnu.org \
    /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 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).