Commit | Line | Data |
---|---|---|
1cd7adc6 | 1 | ;;; cdl.el --- Common Data Language (CDL) utility functions for GNU Emacs |
13726a3b | 2 | |
ba318903 | 3 | ;; Copyright (C) 1993, 2001-2014 Free Software Foundation, Inc. |
13726a3b | 4 | |
b0fd5198 | 5 | ;; Author: ATAE@spva.physics.imperial.ac.uk (Ata Etemadi) |
34dc21db | 6 | ;; Maintainer: emacs-devel@gnu.org |
b0fd5198 RS |
7 | ;; Keywords: data |
8 | ||
13726a3b RS |
9 | ;; This file is part of GNU Emacs. |
10 | ||
eb3fa2cf | 11 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
13726a3b | 12 | ;; it under the terms of the GNU General Public License as published by |
eb3fa2cf GM |
13 | ;; the Free Software Foundation, either version 3 of the License, or |
14 | ;; (at your option) any later version. | |
13726a3b RS |
15 | |
16 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;; GNU General Public License for more details. | |
20 | ||
21 | ;; You should have received a copy of the GNU General Public License | |
eb3fa2cf | 22 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
13726a3b | 23 | |
55535639 PJ |
24 | ;;; Commentary: |
25 | ||
13726a3b RS |
26 | ;;; Code: |
27 | ||
28 | (defun cdl-get-file (filename) | |
29 | "Run file through ncdump and insert result into buffer after point." | |
30 | (interactive "fCDF file: ") | |
31 | (message "ncdump in progress...") | |
32 | (let ((start (point))) | |
33 | (call-process "ncdump" nil t nil (expand-file-name filename)) | |
34 | (goto-char start)) | |
35 | (message "ncdump in progress...done")) | |
36 | ||
37 | (defun cdl-put-region (filename start end) | |
38 | "Run region through ncgen and write results into a file." | |
39 | (interactive "FNew CDF file: \nr") | |
40 | (message "ncgen in progress...") | |
41 | (call-process-region start end "ncgen" | |
42 | nil nil nil "-o" (expand-file-name filename)) | |
43 | (message "ncgen in progress...done")) | |
44 | ||
896546cd RS |
45 | (provide 'cdl) |
46 | ||
1cd7adc6 | 47 | ;;; cdl.el ends here |