octave exits on error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

octave exits on error

Francesco Potorti`-9
I use the appended Emacs function to run octave in a buffer on a
remote machine.  What it does is to call octave remotely through remsh
with the -i option.  It works perfectly, only problem is that a parse
error makes it abort, like this:
---------------------------------------------------------------
Octave, version 2.0.5 (alpha-dec-osf3.2).
Copyright (C) 1996 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.

pot@sable:~/math> read zzz
parse error:

>>> read zzz
           ^
Process octave finished
---------------------------------------------------------------

Is there any way to avoid this behaviour?  Is this a bug?

;; octave
(defun octave (rawprefix)
  "Switch to buffer octave, or generate one calling octave on sable.
With prefix arg, generate a new buffer even if another already exists."
  (interactive "P")
  (if (and (get-buffer "octave") (null rawprefix))
      (switch-to-buffer "octave")
    (let ((comint-process-echoes nil)
          (rlogin-program "remsh")
          (rlogin-explicit-args nil)
          (rlogin-directory-tracking-mode t)
          (rlogin-mode-hook nil))
      (rlogin "sable -l pot bin/octave -i" (generate-new-buffer-name "octave"))
      (cd "/sable:math"))))

--
Francesco Potorti` (researcher)        Voice:    +39-50-593203
Computer Network Division              Operator: +39-50-593211
CNUCE-CNR, Via Santa Maria 36          Fax:      +39-50-904052
56126 Pisa - Italy                     Email:    [hidden email]

Reply | Threaded
Open this post in threaded view
|

octave exits on error

John W. Eaton-6
On 17-Apr-1997, Francesco Potorti` <[hidden email]> wrote:

| I use the appended Emacs function to run octave in a buffer on a
| remote machine.  What it does is to call octave remotely through remsh
| with the -i option.  It works perfectly, only problem is that a parse
| error makes it abort, like this:
| ---------------------------------------------------------------
| Octave, version 2.0.5 (alpha-dec-osf3.2).
| Copyright (C) 1996 John W. Eaton.
| This is free software with ABSOLUTELY NO WARRANTY.
| For details, type `warranty'.
|
| pot@sable:~/math> read zzz
| parse error:
|
| >>> read zzz
|            ^
| Process octave finished

I don't have remsh, and I can't reproduce this behaviour with rsh.
However, I suspect that the following patch might fix the problem.
Can you try it and tell me if it does?

Thanks,

jwe

Index: parse.y
===================================================================
RCS file: /home/jwe/src/master/octave/src/parse.y,v
retrieving revision 1.111
diff -c -r1.111 parse.y
*** parse.y 1997/04/15 22:03:14 1.111
--- parse.y 1997/04/17 18:00:06
***************
*** 251,257 ****
      { \
        global_command = 0; \
        yyerrok; \
!       if (interactive) \
  YYACCEPT; \
        else \
  YYABORT; \
--- 251,257 ----
      { \
        global_command = 0; \
        yyerrok; \
!       if (interactive || forced_interactive) \
  YYACCEPT; \
        else \
  YYABORT; \