Commit | Line | Data |
---|---|---|
1cd7adc6 | 1 | ;;; cdl.el --- Common Data Language (CDL) utility functions for GNU Emacs |
13726a3b | 2 | |
e91081eb | 3 | ;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, |
409cc4a3 | 4 | ;; 2006, 2007, 2008 Free Software Foundation, Inc. |
13726a3b | 5 | |
b0fd5198 | 6 | ;; Author: ATAE@spva.physics.imperial.ac.uk (Ata Etemadi) |
d2a5c764 | 7 | ;; Maintainer: FSF |
b0fd5198 RS |
8 | ;; Keywords: data |
9 | ||
13726a3b RS |
10 | ;; This file is part of GNU Emacs. |
11 | ||
12 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
13 | ;; it under the terms of the GNU General Public License as published by | |
b4aa6026 | 14 | ;; the Free Software Foundation; either version 3, or (at your option) |
13726a3b RS |
15 | ;; any later version. |
16 | ||
17 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ;; GNU General Public License for more details. | |
21 | ||
22 | ;; You should have received a copy of the GNU General Public License | |
b578f267 | 23 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
086add15 LK |
24 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
25 | ;; Boston, MA 02110-1301, USA. | |
13726a3b | 26 | |
55535639 PJ |
27 | ;;; Commentary: |
28 | ||
13726a3b RS |
29 | ;;; Code: |
30 | ||
31 | (defun cdl-get-file (filename) | |
32 | "Run file through ncdump and insert result into buffer after point." | |
33 | (interactive "fCDF file: ") | |
34 | (message "ncdump in progress...") | |
35 | (let ((start (point))) | |
36 | (call-process "ncdump" nil t nil (expand-file-name filename)) | |
37 | (goto-char start)) | |
38 | (message "ncdump in progress...done")) | |
39 | ||
40 | (defun cdl-put-region (filename start end) | |
41 | "Run region through ncgen and write results into a file." | |
42 | (interactive "FNew CDF file: \nr") | |
43 | (message "ncgen in progress...") | |
44 | (call-process-region start end "ncgen" | |
45 | nil nil nil "-o" (expand-file-name filename)) | |
46 | (message "ncgen in progress...done")) | |
47 | ||
896546cd RS |
48 | (provide 'cdl) |
49 | ||
cbee283d | 50 | ;; arch-tag: b8e95a6e-2387-4077-ad9a-af54b09b8615 |
1cd7adc6 | 51 | ;;; cdl.el ends here |