HPW,
I saw that you recomended ultraedit as a good editor for NewLisp.
Does it have a facility where the Newlisp code can be run directly in the editor?
Thanks
Steven
UltraEdit as a programmers editor - HPW
Steven,
not sure what you are looking for.
You can highlight a newLISP-expression in UltraEdit and use a tool-macro to evaluate it in newLISP via direct execution mode.
The return value will be shown in a new tab in ultraedit.
The cmdline in tool/configuration:
C:\....\newlisp\newlisp.exe -e %sel%
Beside this you can also config a tool which starts newLISP with the current lisp-file. %F would be the placeholder for the complete filename.
There are many other option. See help-file.
not sure what you are looking for.
You can highlight a newLISP-expression in UltraEdit and use a tool-macro to evaluate it in newLISP via direct execution mode.
The return value will be shown in a new tab in ultraedit.
The cmdline in tool/configuration:
C:\....\newlisp\newlisp.exe -e %sel%
Beside this you can also config a tool which starts newLISP with the current lisp-file. %F would be the placeholder for the complete filename.
There are many other option. See help-file.
Hans-Peter
Thanks HPW this is exactly what I was looking for.
I have a couple of followup questions.
it does not work I think because the quotes confuse it so how do you pass a commmand with quotes
Also, I am having trouble passing a file name via the command line. I am in a command window in the newLisp executable directory and I can not get it to execute the newlsip file.
Is this the syntax
Will I see any output in the command window?
Thanks for your help
Steven
I have a couple of followup questions.
When the newLisp command has quotesYou can highlight a newLISP-expression in UltraEdit and use a tool-macro to evaluate it in newLISP via direct execution mode.
The return value will be shown in a new tab in ultraedit.
The cmdline in tool/configuration:
C:\....\newlisp\newlisp.exe -e %sel%
Code: Select all
(directory "c:/" )
Also, I am having trouble passing a file name via the command line. I am in a command window in the newLisp executable directory and I can not get it to execute the newlsip file.
Is this the syntax
Should the slashes be back slashes or front ?newlisp "c:/z/test2.lsp"
Will I see any output in the command window?
Thanks for your help
Steven
More a problem on the ultraedit side.When the newLisp command has quotes Code:
(directory "c:/" )
it does not work I think because the quotes confuse it so how do you pass a commmand with quotes
Try:
(directory {c:/})
The curly braces also act as a text delimiter.
Try:Also, I am having trouble passing a file name via the command line. I am in a command window in the newLisp executable directory and I can not get it to execute the newlsip file.
Is this the syntax Quote:
newlisp "c:/z/test2.lsp"
Should the slashes be back slashes or front ?
newlisp c:/z/test2.lsp
Yes, when you use write-line etc.Will I see any output in the command window?
See newLISP help for more info about console-apps.
Try a file with:
(write-line "hello there")
(exit)
Code: Select all
C:\Programme\newlisp>newlisp test2.lsp
hello there
C:\Programme\newlisp>newlisp "test2.lsp"
hello there
C:\Programme\newlisp>newlisp "c:\Programme\newlisp\test2.lsp"
hello there
C:\Programme\newlisp>newlisp "c:/Programme/newlisp/test2.lsp"
hello there
C:\
Hans-Peter
I am not familiar with UltraEdit but (directory) or (directory ) should not matter. This looks like UltraEdit is breaking up the string at the space before passing to newlisp.
I would also explore the possibility to use escaped quotes, i.e:
this way you can tell UltraEdit that (diectory "c:/") is one thing regardless of quotes and spaces, but you still can use quotes to to delimit the entire piece of newLISP source. Another possibility might be this (the curly {} braces are a newLISP text delimiter):
not sure what single quotes do in Windows, but on UNIX you also would try:
Lutz
I would also explore the possibility to use escaped quotes, i.e:
Code: Select all
newlisp -e "(directory \"c:/\")"
Code: Select all
newlisp -e "(directory {c:/})"
Code: Select all
newlisp -e '(directory "c:/")'
Thanks Lutz,
Here is the error.
I tried your suggestions but they did not work. It gives the error because of the space.
It seems that what you say must be occuring that somehow the space is making it cut off or it is being translated to a different character.
I am new to newLisp and Ultraedit am I am looking for a good editor to use in Windows with newLisp.
I would really appreciate hearing from others on this.
Steven
Here is the error.
This is the exact error that I get if I just code (directory without the final parenthesis.missing parenthesis : "...(directory \024\234\""
I tried your suggestions but they did not work. It gives the error because of the space.
It seems that what you say must be occuring that somehow the space is making it cut off or it is being translated to a different character.
I am new to newLisp and Ultraedit am I am looking for a good editor to use in Windows with newLisp.
I would really appreciate hearing from others on this.
Steven
You could use the '!' feature in the newLISP command shell.
When you start newLISP in a Windows command shell you could do:
In the newLISP command shell the '!' immedeately after the '>' prompt and followed immedeately with a command will work like in a shell/command window. Then after editing you just save/quit from the editor and are back in the newLISP comand line and then do:
Cursor-up in the newLISP shell will give you the previous commands, so this feature will let you switch between the newLISP comandline and your editor quickly. This works sepcially well with vi/vim or any edior which loads/quits fast.
Lutz
Ps: note that I have only tried this on UNIX or in CYGWIN or MINGW-MSYS on Windows, but I am pretty sure it also works in a Win32 cmd.exe shell.
When you start newLISP in a Windows command shell you could do:
Code: Select all
>!ultraedit myprog.lsp
Code: Select all
>(load "myprog.lsp")
Lutz
Ps: note that I have only tried this on UNIX or in CYGWIN or MINGW-MSYS on Windows, but I am pretty sure it also works in a Win32 cmd.exe shell.