all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* jka-compr.el doesn't recognise .svgz.~1~ or .sifz files as being gzipped
@ 2008-01-24  9:04 Chris Moore
  2008-01-24 10:07 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Moore @ 2008-01-24  9:04 UTC (permalink / raw)
  To: emacs-pretest-bug

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.

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

* Re: jka-compr.el doesn't recognise .svgz.~1~ or .sifz files as being gzipped
  2008-01-24  9:04 jka-compr.el doesn't recognise .svgz.~1~ or .sifz files as being gzipped Chris Moore
@ 2008-01-24 10:07 ` Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2008-01-24 10:07 UTC (permalink / raw)
  To: Chris Moore; +Cc: emacs-pretest-bug

"Chris Moore" <christopher.ian.moore@gmail.com> writes:

> 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"]

Why aren't they matched against file-name-sans-versions?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

end of thread, other threads:[~2008-01-24 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-24  9:04 jka-compr.el doesn't recognise .svgz.~1~ or .sifz files as being gzipped Chris Moore
2008-01-24 10:07 ` Andreas Schwab

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.