[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conversion from Scilab
From: |
Ben Abbott |
Subject: |
Re: Conversion from Scilab |
Date: |
Fri, 14 May 2010 20:56:22 -0400 |
On May 14, 2010, at 8:13 PM, Gary Nelson wrote:
>
> On May 14, 2010, at 4:08 PM, Ben Abbott wrote:
>
>>
>> On May 14, 2010, at 6:36 PM, Gary Nelson wrote:
>>
>>> Greetings,
>>> I have a MacBookPro with SnowLeopard with octave 3.2.3 installed and
>>> working in terminal mode.
>>>
>>> I have developed a system of signal analysis tools using scilab and would
>>> like to port them to octave.
>>>
>>> In scilab, I can invoke an editor from the command line and then cause the
>>> text window to be executed.
>>>
>>> Is there an equivalent in Octave?
>>>
>>> Somehow, I need to make a library with a collection of functions.
>>>
>>> Thanks for the help
>>>
>>>
>>> Gary Nelson
>>> address@hidden
>>
>> Type the following ...
>>
>> help edit
>>
>> If you can tell me what editor you'd like to use, I/we can be more help.
>>
>> Ben
>>
>>
>
>
> OK, typed help edit and get this (and lots more)
>
> .....
>
> `editor'
> This is the editor to use to modify the functions. By
> default it uses Octave's `EDITOR' built-in function, which
> comes from `getenv("EDITOR")' and defaults to `emacs'. Use
> `%s' In place of the function name. For example,
> `[EDITOR, " %s"]'
> Use the editor which Octave uses for `bug_report'.
>
> `"xedit %s &"'
> pop up simple X11 editor in a separate window
>
> `"gnudoit -q \"(find-file \\\"%s\\\")\""'
> Send it to current Emacs; must have `(gnuserv-start)' in
> `.emacs'.
>
> However, when I ask for editor, I get this
>
> octave-3.2.3:2> editor
> error: `editor' undefined near line 2 column 1
> octave-3.2.3:2>
>
> I downloaded and installed emacs, but have not been able to do anything
> useful with it and can't yet see how it interacts with octave.
>
> I don't have any specific preference for an editor -- just want to get busy
> doing something useful
>
> Thanks
> Gary
I think you've misunderstood the help text. Try ...
edit editor "emacs %s"
This syntax corresponds to "edit FIELD VALUE" as described when "help edit" is
entered.
Did you install a command line version of emacs or a GUI version?
I don't use emacs, but do use mvim (GUI version of vim). For mvim to function
correctly, I added the following to my ~/.octaverc file.
edit editor "mvim %s"
edit mode async
I haven't used a GUI version of emacs, but you may need to set "mode" so
"async" as well.
Ben