[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: |
Fri, 27 Apr 2012 13:14:54 -0400 |
On Fri, Apr 27, 2012 at 11:31 AM, Ben Abbott <address@hidden> wrote:
> Regarding "HOME", I used ".", so I'm ok either way, but ...
>
> One of my first changesets touched on edit.m. My recollection was that
> some users (developers?) preferred that all octave's core m-files be
> opened in a specific location. My guess is that if you remove HOME,
> you'll get some complaints. I think changing the default to pwd()
> would be ok.
Yeah, completely understand. It's a user interface issue, harder to say
what the "right" answer is, etc. That's why I'm looking at this
carefully (maybe agonizingly :)), and all your feedback is very helpful.
I don't mind going around a few times with this until we get it right.
The reason I want to change the default to pwd() is to preserve the
behavior you introduced to edit new files in the current directory. I
believe this should be HOME in this context as well, so no change if
HOME == pwd by default.
> If we keep HOME, I think it makes sense to allow HOME to be set equal to a
> function handle.
>
> edit ("home", @pwd)
>
> For that to work, I think the class type needs to be checked in edit.m so
> that the function_handle is evaluated at FUNCTION.HOME()
I think that's reasonable. The default will become @pwd. I will make a
helper function to type-check and evaluate FUNCTION.HOME to a string. I
think it would be useful to have a special case for isempty (FUNCTION.HOME)
to mean pwd() as well, so the following are all equivalent:
edit ("home", @pwd);
edit ("home", ".");
edit ("home", "");
edit ("home", []);
--
mike
- 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 <=