Interesting. Can you test another thing? Can you try to define a function in the function editor that contains a blank line? Say, for example:
*∇foo* *'a'* *'b'* Note the blank line in the middle. If that gives the same error, remove the blank line and confirm the error was caused by the blank line. Regards, Elias On 9 May 2014 20:45, Blake McBride <blake1...@gmail.com> wrote: > CL is lexically scoped. I think emacs is dynamicly scoped. I think emacs > lisp doesn't have real macros either. Lastly, emacs lisp has notions of > buffer local variables and keyboard mappings that are not completely clear > to me. In short (even though I learned lisp on InterLisp) I am lost enough > with emacs lisp. > > On the other hand, emacs lisp has a good IDE (emacs) and a good debugger. > (I know about slime.) I've also discovered that you can use emacs lisp > (along with the compiler) independently of emacs the editor pretty easily. > > Now, back to your question: > > Command=#("fn:gg" 3 5 (fontified t)) > To save the buffer, use M-x gnu-apl-save-function (C-c C-c) > Command="si" > Command="def" > Command=#("gg" 0 2 (fontified t)) > Command="" > Command="APL_NATIVE_END_TAG" > Data:("error" "DOMAIN ERROR" "" ""):End-Data > progn: Unexpected error: > > > > > On Fri, May 9, 2014 at 7:30 AM, Elias Mårtenson <loke...@gmail.com> wrote: > >> Emacs Lisp has lots of similarities to Common Lisp, so you should be >> quite comfortable with it I think. >> >> Could you add a similar call to *message* that logs the content of the >> variable "command" in the function "gnu-apl--send-network-command" >> (gnu-apl-network.el, like 98). Inserting the following as the first line in >> the function should do the trick: >> >> (message "Command=%S" command) >> >> Regards, >> Elias >> >> >> On 9 May 2014 20:27, Blake McBride <blake1...@gmail.com> wrote: >> >>> Data:("error" "DOMAIN ERROR" "" ""):End-Data >>> >>> Note: although I don't know emacs lisp well, CL is one of my favorite >>> languages >>> >>> >>> On Fri, May 9, 2014 at 7:03 AM, Elias Mårtenson <loke...@gmail.com>wrote: >>> >>>> OK, I'm confused, That should not happen. >>>> >>>> Could you change the code that displays the error (line 102 in >>>> gnu-apl-editor.el) to ad some logging? >>>> >>>> This line contains the following form, followed by a few extra >>>> end-parentheses: >>>> >>>> (error "Unexpected error: " (second return-data)) >>>> >>>> Change this expression to: >>>> >>>> (progn (message "Data:%S:End-Data" return-data) (error "Unexpected >>>> error: " (second return-data))) >>>> >>>> In other word, surround the expression with (progn ...) and add a call >>>> to the function message. >>>> >>>> Then, reproduce the error so you get the "unexpected error" message, >>>> switch to the buffer **Messages** and send me the output of the >>>> command. I.e, the stuff that begins with "Data" and ends with "End-Data" >>>> >>>> Regards, >>>> Elias >>>> >>>> >>>> On 9 May 2014 19:54, Blake McBride <blake1...@gmail.com> wrote: >>>> >>>>> I just did a make clean, followed by a make under native. Also >>>>> verified that emacs is loading the one I just built. Same errors. >>>>> >>>>> Thanks. >>>>> >>>>> Blake >>>>> >>>>> >>>>> >>>>> On Fri, May 9, 2014 at 6:48 AM, Elias Mårtenson <loke...@gmail.com>wrote: >>>>> >>>>>> Right, but did you compile the module in the "native" directory and >>>>>> point your Emacs to use it? >>>>>> >>>>>> >>>>>> On 9 May 2014 19:44, Blake McBride <blake1...@gmail.com> wrote: >>>>>> >>>>>>> $ git pull >>>>>>> Already up-to-date. >>>>>>> $ >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Fri, May 9, 2014 at 6:32 AM, Elias Mårtenson >>>>>>> <loke...@gmail.com>wrote: >>>>>>> >>>>>>>> Hmm... I think I have an idea what's going on. >>>>>>>> >>>>>>>> Can you try with the latest version of gnu-apl-mode? That means >>>>>>>> both the Elisp code as well as the name module. >>>>>>>> >>>>>>>> Regards, >>>>>>>> Elias >>>>>>>> >>>>>>>> >>>>>>>> On 9 May 2014 19:21, Blake McBride <blake1...@gmail.com> wrote: >>>>>>>> >>>>>>>>> Dear Elias, >>>>>>>>> >>>>>>>>> Emacs version 24.3.1. >>>>>>>>> >>>>>>>>> I always have to move the cursor or I get the other error. So, >>>>>>>>> after I move the cursor and attempt to save, I get the second error: >>>>>>>>> >>>>>>>>> Unexpected error: >>>>>>>>> >>>>>>>>> Thanks. >>>>>>>>> >>>>>>>>> Blake >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Fri, May 9, 2014 at 12:14 AM, Elias Mårtenson < >>>>>>>>> loke...@gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Yes, I've been told that this happens. I just can't seem to >>>>>>>>>> reproduce it though. Can you confirm that it doesn't happen if you >>>>>>>>>> move the >>>>>>>>>> cursor prior to pressing C-c C-c? >>>>>>>>>> >>>>>>>>>> What version of Emacs are you using? >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Elias >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 9 May 2014 11:59, Blake McBride <blake1...@gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> From within emacs mode I do: >>>>>>>>>>> >>>>>>>>>>> ∇xx >>>>>>>>>>> >>>>>>>>>>> and then save without adding any lines, emacs gives: >>>>>>>>>>> >>>>>>>>>>> Unexpected error: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks! >>>>>>>>>>> >>>>>>>>>>> Blake >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >