* Recognizing additional compressed files by filename
@ 2011-03-22 22:24 Sean McAfee
0 siblings, 0 replies; only message in thread
From: Sean McAfee @ 2011-03-22 22:24 UTC (permalink / raw)
To: help-gnu-emacs
At my workplace, I sometimes need to deal with gzipped tar files whose
names have a trailing underscore and 32 hexadecimal digits (an MD5
sum). I want to be able to open these files in Emacs, but the unusual
filenames stymied me at first. Eventually I came up with the following
code, which adds a new entry to the variable jka-compr-compression-info-list:
(loop for vec in jka-compr-compression-info-list
if (string-match (aref vec 0)
"test.gz_0123456789abcdef0123456789abcdef")
return nil
if (string-match (aref vec 0) "test.gz")
collect vec into gz
finally (when gz
(setf (aref (first (push (copy-sequence (first gz))
jka-compr-compression-info-list)) 0)
"\\.gz_[[:xdigit:]]\\{32\\}\\'")
(jka-compr-update)))
This works OK, but is there a more straightforward way?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-22 22:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 22:24 Recognizing additional compressed files by filename Sean McAfee
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).