I would like to write a major mode for inspecting netCDF files. These are binary files which can be multiple GB in size. So I don't want to open them in emacs.
The interaction that I have in mind is the following:
- User opens netCDF file like any other file in emacs.
- A command line program (
ncdump -h
) is executed on the file and the output is interpreted by emacs.
The problem is that there seems to be no way to stop emacs from actually opening the file.
-*-my-mode-*-
). You'd need to hook earlier infind-find-noselect
, perhaps at the place where there's now an exception for directories.process-file
orcall-process
on such a file, usingncdump -h
etc.M-x package-install
.