new version
[emacs.git] / lisp / cdl.el
blob71b8ef395f6636e1cf35eacb085e9df7bf5fde1b
1 ;;; cdl.el --- Common Data Language (CDL) utility functions for Gnu Emacs
3 ;; Copyright (C) 1993 Free Software Foundation, Inc.
5 ;; Author: ATAE@spva.physics.imperial.ac.uk (Ata Etemadi)
6 ;; Keywords: data
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
25 ;;; Code:
27 (defun cdl-get-file (filename)
28 "Run file through ncdump and insert result into buffer after point."
29 (interactive "fCDF file: ")
30 (message "ncdump in progress...")
31 (let ((start (point)))
32 (call-process "ncdump" nil t nil (expand-file-name filename))
33 (goto-char start))
34 (message "ncdump in progress...done"))
36 (defun cdl-put-region (filename start end)
37 "Run region through ncgen and write results into a file."
38 (interactive "FNew CDF file: \nr")
39 (message "ncgen in progress...")
40 (call-process-region start end "ncgen"
41 nil nil nil "-o" (expand-file-name filename))
42 (message "ncgen in progress...done"))
44 (provide 'cdl)
46 ;;; cdl.el ends here.