* bug#11839: teach some url code about .xz files
@ 2012-07-02 2:43 Liam Stitt
2012-09-27 7:41 ` Glenn Morris
2012-10-13 10:52 ` Chong Yidong
0 siblings, 2 replies; 3+ messages in thread
From: Liam Stitt @ 2012-07-02 2:43 UTC (permalink / raw)
To: 11839
Hi. The code in lisp/url knows about .gz and .bz2 files, but not about the
more recent .xz variety. These two trivial patches correct this:
*** url-file.el~ 2012-01-16 02:12:46.000000000 -0700
--- url-file.el 2012-07-01 20:26:10.000000000 -0600
*************** can do automatic decompression for them,
*** 41,47 ****
'foo.gz' exists, even though the FTP server would happily serve it up
to them."
(let ((scratch nil)
! (compressed-extensions '("" ".gz" ".z" ".Z" ".bz2"))
(found nil))
(while (and compressed-extensions (not found))
(if (file-exists-p (setq scratch (concat fname (pop compressed-extensions))))
--- 41,47 ----
'foo.gz' exists, even though the FTP server would happily serve it up
to them."
(let ((scratch nil)
! (compressed-extensions '("" ".gz" ".z" ".Z" ".bz2" ".xz"))
(found nil))
(while (and compressed-extensions (not found))
(if (file-exists-p (setq scratch (concat fname (pop compressed-extensions))))
*************** to them."
*** 178,183 ****
--- 178,184 ----
(\.uue "x-uuencoded")
(\.hqx "x-hqx")
(\.bz2 "x-bzip2")
+ (\.xz "x-xz")
(otherwise nil)))
(if (file-directory-p filename)
*** url-vars.el~ 2012-07-01 19:48:37.000000000 -0600
--- url-vars.el 2012-07-01 20:25:46.000000000 -0600
*************** variable."
*** 152,158 ****
(".uue" . "x-uuencoded")
(".hqx" . "x-hqx")
(".Z" . "x-compress")
! (".bz2" . "x-bzip2"))
"An alist of file extensions and appropriate content-transfer-encodings."
:type '(repeat (cons :format "%v"
(string :tag "Extension")
--- 152,159 ----
(".uue" . "x-uuencoded")
(".hqx" . "x-hqx")
(".Z" . "x-compress")
! (".bz2" . "x-bzip2")
! (".xz" . "x-xz"))
"An alist of file extensions and appropriate content-transfer-encodings."
:type '(repeat (cons :format "%v"
(string :tag "Extension")
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#11839: teach some url code about .xz files
2012-07-02 2:43 bug#11839: teach some url code about .xz files Liam Stitt
@ 2012-09-27 7:41 ` Glenn Morris
2012-10-13 10:52 ` Chong Yidong
1 sibling, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2012-09-27 7:41 UTC (permalink / raw)
To: Liam Stitt; +Cc: 11839
Liam Stitt wrote:
> Hi. The code in lisp/url knows about .gz and .bz2 files, but not about the
> more recent .xz variety. These two trivial patches correct this:
Thanks. This seems reasonable, but I have no idea what this code is for
(url-file-find-possibly-compressed-file etc), so I cannot test this.
Can you give an example of how it can be used?
Also, doesn't this line of url-file:
(setq uncompressed-filename
(if (string-match "\\.\\(gz\\|Z\\|z\\)$" filename)
(substring filename 0 (match-beginning 0)) filename))
need bz2 etc adding?
(Also I feel like lists of compressed file extensions are being
replicated in several places in Emacs: here in url-file,
dired-compress-file-suffixes, jka-compr-compression-info-list,
ibuffer-compressed-file-name-regexp, tags-compression-info-list, ...)
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#11839: teach some url code about .xz files
2012-07-02 2:43 bug#11839: teach some url code about .xz files Liam Stitt
2012-09-27 7:41 ` Glenn Morris
@ 2012-10-13 10:52 ` Chong Yidong
1 sibling, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2012-10-13 10:52 UTC (permalink / raw)
To: Liam Stitt; +Cc: 11839
stittl@cuug.ab.ca (Liam Stitt) writes:
> Hi. The code in lisp/url knows about .gz and .bz2 files, but not
> about the more recent .xz variety. These two trivial patches correct
> this:
Thanks, committed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-13 10:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 2:43 bug#11839: teach some url code about .xz files Liam Stitt
2012-09-27 7:41 ` Glenn Morris
2012-10-13 10:52 ` Chong Yidong
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.