comparison lisp/packages/rcompile.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 56c54cf7c5b6
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
1 ;;; rcompile.el Run a compilation on a remote machine 1 ;;; rcompile.el --- run a compilation on a remote machine
2 2
3 ;;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. 3 ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
4 4
5 ;; Author: Albert <alon@milcse.rtsg.mot.com> 5 ;; Author: Albert <alon@milcse.rtsg.mot.com>
6 ;; Maintainer: FSF 6 ;; Maintainer: FSF
7 ;; Created: 1993 Oct 6 7 ;; Created: 1993 Oct 6
8 ;; Version: 1.1 8 ;; Version: 1.1
9 ;; Keywords: tools, processes 9 ;; Keywords: tools, processes
10 10
11 ;; This file is part of GNU Emacs. 11 ;; This file is part of XEmacs.
12 12
13 ;; GNU Emacs is free software; you can redistribute it and/or modify 13 ;; XEmacs is free software; you can redistribute it and/or modify it
14 ;; it under the terms of the GNU General Public License as published by 14 ;; under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation; either version 2, or (at your option) 15 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; any later version. 16 ;; any later version.
17 17
18 ;; GNU Emacs is distributed in the hope that it will be useful, 18 ;; XEmacs is distributed in the hope that it will be useful, but
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 ;; GNU General Public License for more details. 21 ;; General Public License for more details.
22 22
23 ;; You should have received a copy of the GNU General Public License 23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs; see the file COPYING. If not, write to 24 ;; along with XEmacs; see the file COPYING. If not, write to the Free
25 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 25 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 ;; 02111-1307, USA.
26 27
27 ;;; Synched up with: FSF 19.30. 28 ;;; Synched up with: FSF 19.34.
28 29
29 ;;; Commentary: 30 ;;; Commentary:
30 31
31 ;;; This package is for running a remote compilation and using emacs to parse 32 ;; This package is for running a remote compilation and using emacs to parse
32 ;;; the error messages. It works by rsh'ing the compilation to a remote host 33 ;; the error messages. It works by rsh'ing the compilation to a remote host
33 ;;; and parsing the output. If the file visited at the time remote-compile was 34 ;; and parsing the output. If the file visited at the time remote-compile was
34 ;;; called was loaded remotely (ange-ftp), the host and user name are obtained 35 ;; called was loaded remotely (ange-ftp), the host and user name are obtained
35 ;;; by the calling ange-ftp-ftp-name on the current directory. In this case the 36 ;; by the calling ange-ftp-ftp-name on the current directory. In this case the
36 ;;; next-error command will also ange-ftp the files over. This is achieved 37 ;; next-error command will also ange-ftp the files over. This is achieved
37 ;;; automatically because the compilation-parse-errors function uses 38 ;; automatically because the compilation-parse-errors function uses
38 ;;; default-directory to build it's file names. If however the file visited was 39 ;; default-directory to build it's file names. If however the file visited was
39 ;;; loaded locally, remote-compile prompts for a host and user and assumes the 40 ;; loaded locally, remote-compile prompts for a host and user and assumes the
40 ;;; files mounted locally (otherwise, how was the visited file loaded). 41 ;; files mounted locally (otherwise, how was the visited file loaded).
41 42
42 ;;; See the user defined variables section for more info. 43 ;; See the user defined variables section for more info.
43 44
44 ;;; I was contemplating redefining "compile" to "remote-compile" automatically 45 ;; I was contemplating redefining "compile" to "remote-compile" automatically
45 ;;; if the file visited was ange-ftp'ed but decided against it for now. If you 46 ;; if the file visited was ange-ftp'ed but decided against it for now. If you
46 ;;; feel this is a good idea, let me know and I'll consider it again. 47 ;; feel this is a good idea, let me know and I'll consider it again.
47 48
48 ;;; Installation: 49 ;;; Installation:
49 50
50 ;;; To use rcompile, you also need to give yourself permission to connect to 51 ;; To use rcompile, you also need to give yourself permission to connect to
51 ;;; the remote host. You do this by putting lines like: 52 ;; the remote host. You do this by putting lines like:
52 53
53 ;;; monopoly alon 54 ;; monopoly alon
54 ;;; vme33 55 ;; vme33
55 ;;; 56 ;;
56 ;;; in a file named .rhosts in the home directory (of the remote machine). 57 ;; in a file named .rhosts in the home directory (of the remote machine).
57 ;;; Be careful what you put in this file. A line like: 58 ;; Be careful what you put in this file. A line like:
58 ;;; 59 ;;
59 ;;; + 60 ;; +
60 ;;; 61 ;;
61 ;;; Will allow anyone access to your account without a password. I suggest you 62 ;; Will allow anyone access to your account without a password. I suggest you
62 ;;; read the rhosts(5) manual page before you edit this file (if you are not 63 ;; read the rhosts(5) manual page before you edit this file (if you are not
63 ;;; familiar with it already) 64 ;; familiar with it already)
64 65
65 ;;; Code: 66 ;;; Code:
66 67
67 (provide 'rcompile) 68 (provide 'rcompile)
68 (require 'compile) 69 (require 'compile)
78 "User for remote compilations. 79 "User for remote compilations.
79 nil means use the value returned by \\[user-login-name].") 80 nil means use the value returned by \\[user-login-name].")
80 81
81 (defvar remote-compile-run-before nil 82 (defvar remote-compile-run-before nil
82 "*Command to run before compilation. 83 "*Command to run before compilation.
83 This can be used for setting up enviroment variables, 84 This can be used for setting up environment variables,
84 since rsh does not invoke the shell as a login shell and files like .login 85 since rsh does not invoke the shell as a login shell and files like .login
85 \(tcsh\) and .bash_profile \(bash\) are not run. 86 \(tcsh\) and .bash_profile \(bash\) are not run.
86 nil means run no commands.") 87 nil means run no commands.")
87 88
88 (defvar remote-compile-prompt-for-host nil 89 (defvar remote-compile-prompt-for-host nil
100 101
101 ;;;; entry point 102 ;;;; entry point
102 103
103 ;;;###autoload 104 ;;;###autoload
104 (defun remote-compile (host user command) 105 (defun remote-compile (host user command)
105 "Compile the the current buffer's directory on HOST. Log in as USER. 106 "Compile the current buffer's directory on HOST. Log in as USER.
106 See \\[compile]." 107 See \\[compile]."
107 (interactive 108 (interactive
108 (let ((parsed (and (featurep 'ange-ftp) 109 (let ((parsed (and (featurep 'ange-ftp)
109 ;; XEmacs change 110 ;; XEmacs change
110 (or (and (fboundp 'ange-ftp-ftp-name) 111 (or (and (fboundp 'ange-ftp-ftp-name)