Quantcast

Patch for edit help not matching behavior

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Patch for edit help not matching behavior

Mike Miller
After switching from 3.2 to development recently, I started getting
hit with the edit async/sync default change.  That's fine, I can
adapt, but the help was never updated.  Attached patch describes the
sync/async mode correctly.

On a related note, what is the intended location of a new m-file
created by edit?  Here's what I get:

octave:1> pwd
ans = /home/mike
octave:2> edit get home
ans = /home/mike/octave
octave:3> edit no_such_function.m
# now in vim, :wq
octave:4> ls octave
# hmm, file is not there
octave:5> ls *.m
no_such_function.m

So for existing functions, it does copy the m-file into edit's HOME
directory, but for new files it doesn't.  Maybe it's just my reading,
and if so I think it may need some rewording, but the help text seems
to say that even new m-files will be created under HOME (edit's HOME
variable) and not pwd.  Is the function broken or the help text
confusing?  Thanks.

--
mike

octave-bf2e53b975b7.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch for edit help not matching behavior

Jordi Gutiérrez Hermoso-2
On 21 March 2012 17:39, Mike Miller <[hidden email]> wrote:
> After switching from 3.2 to development recently, I started getting
> hit with the edit async/sync default change.  That's fine, I can
> adapt, but the help was never updated.  Attached patch describes the
> sync/async mode correctly.

Thanks, I rebased to the stable branch and pushed:

    http://hg.savannah.gnu.org/hgweb/octave/rev/51fd0cf227e4

Would you like write access to the Savannah repository? I count four
recent patches from you, all of which I applied without change, so you
seem to know what you're doing. We can always use more help.

> Is the function broken or the help text confusing?

You seem confused, so I blame the help text. I personally set edit's
HOME to "." so that files are always edited in-place or in the cwd. I
had forgotten that this wasn't default.

- Jordi G. H.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patch for edit help not matching behavior

Mike Miller
2012/3/21 Jordi Gutiérrez Hermoso <[hidden email]>:

> On 21 March 2012 17:39, Mike Miller <[hidden email]> wrote:
>> After switching from 3.2 to development recently, I started getting
>> hit with the edit async/sync default change.  That's fine, I can
>> adapt, but the help was never updated.  Attached patch describes the
>> sync/async mode correctly.
>
> Thanks, I rebased to the stable branch and pushed:
>
>    http://hg.savannah.gnu.org/hgweb/octave/rev/51fd0cf227e4
>
> Would you like write access to the Savannah repository? I count four
> recent patches from you, all of which I applied without change, so you
> seem to know what you're doing. We can always use more help.

And another one on the way in a few minutes...  Yes, thanks for the
offer, I've been using octave for years but I have taken an interest
just recently in getting more involved.  Hope it doesn't wear off.

>> Is the function broken or the help text confusing?
>
> You seem confused, so I blame the help text. I personally set edit's
> HOME to "." so that files are always edited in-place or in the cwd. I
> had forgotten that this wasn't default.

So assuming my HOME is not ".", here's the section that, at least the
way I read it, says any new m-file will be put into HOME:

        * If NAME.EXT is on your path then it will be edited, otherwise
          the editor will be started with `HOME/name.ext' as the
          filename.  If `name.ext' is not modifiable, it will be copied
          to `HOME' before editing.

I would fix this to say something like "otherwise the editor will be
started with `name.ext' as the filename in the current working
directory".  Unless anyone else uses this feature and this is not
correct...

--
mike
Loading...