diff options
author | Mark Oteiza <mvoteiza@udel.edu> | 2017-09-24 22:28:51 -0400 |
---|---|---|
committer | Mark Oteiza <mvoteiza@udel.edu> | 2017-09-26 17:48:00 -0400 |
commit | a17f30d7cdfa3983f8c97e474015777ec051de35 (patch) | |
tree | 9c56ff4e146b9f1c071cb31541e00a1b3fa2e215 /test/data/xdg | |
parent | 52a1da03b226b8686856259ac5d9474a8462322a (diff) | |
download | emacs-a17f30d7cdfa3983f8c97e474015777ec051de35.tar.gz |
Add MIME apps spec utilities
Facilitates finding associations between MIME types and desktop files
that report an association with that type. Combined with mailcap.el's
MIME facilities, it should be easy to use desktop files.
* lisp/xdg.el (xdg-mime-table): New variable.
(xdg-mime-apps-files, xdg-mime-collect-associations, xdg-mime-apps):
New functions.
* test/data/xdg/mimeapps.list: New file.
* test/data/xdg/mimeinfo.cache: New file.
* test/lisp/xdg-tests.el (xdg-mime-associations): New test.
Diffstat (limited to 'test/data/xdg')
-rw-r--r-- | test/data/xdg/mimeapps.list | 9 | ||||
-rw-r--r-- | test/data/xdg/mimeinfo.cache | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/data/xdg/mimeapps.list b/test/data/xdg/mimeapps.list new file mode 100644 index 00000000000..27fbd94b16b --- /dev/null +++ b/test/data/xdg/mimeapps.list @@ -0,0 +1,9 @@ +[Default Applications] +x-test/foo=a.desktop + +[Added Associations] +x-test/foo=b.desktop +x-test/baz=a.desktop + +[Removed Associations] +x-test/foo=c.desktop;d.desktop diff --git a/test/data/xdg/mimeinfo.cache b/test/data/xdg/mimeinfo.cache new file mode 100644 index 00000000000..6e54f604fa0 --- /dev/null +++ b/test/data/xdg/mimeinfo.cache @@ -0,0 +1,4 @@ +[MIME Cache] +x-test/foo=c.desktop;d.desktop +x-test/bar=a.desktop;c.desktop +x-test/baz=b.desktop;d.desktop |