Patch to solve Beanshell problem after compilation

Paul <[email protected]> Wed, 14 Jan 2009 22:57:14 -0600
Newsgroups gmane.emacs.jdee
Message-ID <[email protected]>
Hi Daniel,

Funny I think I've made this in my own branch already but it hasn't
gotten out there.  I will make it in there for sure now.

Also, please use the list: [email protected].  This
list is no longer used.

Daniel Clemente writes:
 > 
 > Hi,
 > 
 >   if after a correct compilation you get:
 > 
 > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p "0")
 >   compilation-handle-exit(exit "0" "finished\n")
 >   (progn (setq output (substring string 0 end-of-result)) (set-buffer-modified-p nil) (while (member status ...) (setq len ...) (if ... ... ...)) (insert output) (compilation-handle-exit (quote exit) status (if ... "finished\n" ...)))
 >   (if end-of-result (progn (setq output ...) (set-buffer-modified-p nil) (while ... ... ...) (insert output) (compilation-handle-exit ... status ...)) (insert string))
 >   (save-excursion (goto-char (point-max)) (if end-of-result (progn ... ... ... ... ...) (insert string)))
 >   (let ((end-of-result ...) (win ...) output len (status " ")) (save-excursion (goto-char ...) (if end-of-result ... ...)) (if (not ...) (if compilation-scroll-output ...)))
 >   (save-current-buffer (set-buffer (oref this buffer)) (let (... ... output len ...) (save-excursion ... ...) (if ... ...)))
 >   (with-current-buffer (oref this buffer) (let (... ... output len ...) (save-excursion ... ...) (if ... ...)))
 >   bsh-compilation-buffer([object jde-compile-server-buffer "compilation buffer" "*JDEE Compile Server*" #<buffer *JDEE Compile Server*> nil (lambda (&rest --cl-rest--) (apply ... ... --cl-rest--))] #<process bsh> "\nbsh % ")
 >   apply(bsh-compilation-buffer ([object jde-compile-server-buffer "compilation buffer" "*JDEE Compile Server*" #<buffer *JDEE Compile Server*> nil (lambda ... ...)] #<process bsh> "\nbsh % "))
 >   eieio-generic-call(bsh-compilation-buffer-filter ([object jde-compile-server-buffer "compilation buffer" "*JDEE Compile Server*" #<buffer *JDEE Compile Server*> nil (lambda ... ...)] #<process bsh> "\nbsh % "))
 >  ....
 > 
 > 
 >    you need to use this patch:
 > 
 > --- a/.emacs.d/jde-2.3.6-svn/lisp/beanshell.el
 > +++ b/.emacs.d/jde-2.3.6-svn/lisp/beanshell.el
 > @@ -336,7 +336,7 @@ The result is inserted as it comes in the compilation buffer."
 >  
 >                (insert output)
 >                (compilation-handle-exit 
 > -               'exit status
 > +               'exit (string-to-number status)
 >                 (if (string= "0" status)
 >                     "finished\n"
 >                   (format "exited abnormally with code %s\n"
 > 
 > 
 > 
 > 
 >   This affects JDEE 2.3.5.1 and 2.3.6. Could you please check it in?
 > 
 >   Thanks,
 > 
 > Daniel
 > 

--