octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: edit.m and EDITOR


From: John W. Eaton
Subject: Re: edit.m and EDITOR
Date: Wed, 11 Apr 2012 08:31:14 -0400

On 11-Apr-2012, Mike Miller wrote:

| Maybe I'm way off here, but I'll throw in anyway.  I do see a difference
| between EDITOR and edit's FUNCTION.EDITOR.  In the context of the edit
| command, people seem to want to fork an editor in the background, edit
| code while you still have access to the Octave shell.  Indeed, as I
| recently learned, the default edit "mode" is now "async".
| 
| For edit_history, the EDITOR is called synchronously a la Unix "fc".  It
| must be that way for the results to be useful.  For me, that means I
| want it to happen in the same terminal.
| 
| Maybe these are still the same for most people, but for me:
| 
|   octave:1> getenv("EDITOR"), EDITOR, edit get EDITOR
|   ans = vim
|   ans = vim
|   ans = gvim %s
| 
| If these do collapse to one setting, I'm sure I'll be ok :)

OK, I didn't realize that the value of EDITOR in the edit function was
not just the name of the editor program, but also could contain some
format specification.  Ugh.  I don't see a good solution that won't
break backward compatibility in some way.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]