all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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

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.