[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: edit.m: use current working directory, remove HOME
From: |
Ben Abbott |
Subject: |
Re: edit.m: use current working directory, remove HOME |
Date: |
Tue, 24 Apr 2012 10:32:12 -0400 |
On Apr 24, 2012, at 9:47 AM, Mike Miller wrote:
> 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="."?
Ok.
>> 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.
I'm not sure I'm following.
Are you proposing a rewrite of the EDITOR function ?
How would it interact with edit.m and the built-in edit_history() ?
Ben
- edit.m: use current working directory, remove HOME, Mike Miller, 2012/04/22
- Re: edit.m: use current working directory, remove HOME, Ben Abbott, 2012/04/24
- Re: edit.m: use current working directory, remove HOME, Mike Miller, 2012/04/24
- Re: edit.m: use current working directory, remove HOME, Mike Miller, 2012/04/27
- Re: edit.m: use current working directory, remove HOME, Ben Abbott, 2012/04/27
- Re: edit.m: use current working directory, remove HOME, Mike Miller, 2012/04/27