I know that Emacs automatically opens compressed files such as .tar.gz. I am trying to figure out how to achieve this with my own compression script, not standard ones. Following this link , I added the following to my Emacs initialization file:
(if (fboundp 'auto-compression-mode)
(auto-compression-mode 0)
(require 'jka-compr))
(add-to-list 'jka-compr-compression-info-list
["\\.customcom\\'"
"custom compressing" "customcom" (-c)
"custom decompressing" "customcom" (-d)
nil t])
(auto-compression-mode 1)
Ideally, I want to run the command customcom -d foo.customcomwhen the file is opened, but with the addition of the above, it starts customcom -d < foo.cusotmcomand produces an error. How can I modify the above to invalidate input redirection so that it only accepts the file name and not the contents of the file, or is there another way to approach this problem?