octave-maintainers
[Top][All Lists]
Advanced

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

Re: edit.m: use current working directory, remove HOME


From: Mike Miller
Subject: Re: edit.m: use current working directory, remove HOME
Date: Tue, 24 Apr 2012 09:47:10 -0400

On Tue, Apr 24, 2012 at 8:58 AM, Ben Abbott <address@hidden> wrote:
> On Apr 22, 2012, at 5:49 PM, Mike Miller wrote:
>
>> I have prepared a new patch to make the edit command consistent wrt
>> where files are edited, please take a look at the attached and tell me
>> what you think.  The HOME variable is now no longer needed, a warning is
>> issued if the user tries to get or set HOME.  The current directory is
>> now used wherever HOME was used before, primarily when editing a system
>> m-file with no write privileges.
>>
>> --
>> mike
>> <edit-home.patch>
>
> I had a thought. Would it be preferred to allow the HOME variable in edit.m 
> to be set to a function handle, or a string. That would accommodate both 
> those who prefer
>
>       address@hidden
>
> ... or ...
>
>        HOME="~/octave";

Sure, I don't have a problem with supporting function handles in
principle, but isn't address@hidden effectively overkill for HOME="."?

> Might the same be done for EDITOR ?
>
>       address@hidden;
>
> ... or ...
>
>        EDITOR="gvim";

If EDITOR could be a function handle, it should probably take the name
of the file to edit as its argument, right?  That would be analogous
to the "%s" placeholder that the EDITOR setting currently requires.
In that case the the EDITOR() function wouldn't work, but a new
function could be made to be the default using @EDITOR.

-- 
mike


reply via email to

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