Sun 09 Feb 2014 11:22:17 PM UTC, comment #13:
Done, pushed to stable:
http://hg.savannah.gnu.org/hgweb/octave/rev/5c0b8f2da650
|
Sun 09 Feb 2014 10:50:50 PM UTC, comment #12:
Alright, then why don't you go ahead and apply the patch to stable and clear up the regression.
|
Sun 09 Feb 2014 08:45:10 PM UTC, comment #11:
That oddball case doesn't seem to be a regression, while "save -" was. Going back to 3.4.3 and 3.6.4, "save - x" fails with the same error in both versions.
I guess this error is because the minus is being interpreted as a binary operator with "save ()" as the first argument? There's probably nothing we could do about this without recognizing it as a special case in the parser right?
|
Sun 09 Feb 2014 08:20:06 PM UTC, comment #10:
Seems suitable for stable. I applied your patch and there is still one oddball case that isn't covered.
It works if you use the function form of save() or add an option
|
Sat 08 Feb 2014 11:10:23 PM UTC, comment #9:
Attached diff fixes this problem for me. Would this be suitable for stable?
(file #30491)
|
Sat 08 Feb 2014 10:18:59 PM UTC, comment #8:
I checked the Mercurial log on load-save.cc and I don't see anything which seems to suggest a purposeful removal of this feature. There are several candidate changesets which might have caused this as the input processing was heavily reworked to get Matlab compatibility.
|
Sat 08 Feb 2014 10:17:04 PM UTC, comment #7:
I have not bisected or tested to be sure, but it looks to me like a side effect of this changeset that was made to fix bug #37502:
http://hg.savannah.gnu.org/hgweb/octave/rev/e05eafe7105a
So perhaps simply enhancing that test will restore the ability to save to "-" as file name.
|
Sat 08 Feb 2014 05:28:32 PM UTC, comment #6:
What changeset removed the feature and was there some justification for it, or was it accidental?
|
Sat 08 Feb 2014 05:08:34 PM UTC, comment #5:
The /dev/stdout option seems to do the same thing, so I guess I can do it that way as well.
Although load -text /dev/stdin
causes
error: load: unable to find file /dev/stdin
so can you leave in the (already working) option to load from stdin using - (despite the asymmetry this causes?)
|
Sat 08 Feb 2014 04:32:44 AM UTC, comment #4:
Is this feature particularly valuable? It doesn't appear that Matlab supports this, and it seems like we should just change the documentation to eliminate this option.
|
Fri 07 Feb 2014 08:44:18 PM UTC, comment #3:
I see the docstring does indicate that this should work, and indeed it does work for me in version 3.6.4 but not in 3.8.0. Marking as a regression against version 3.8.0
In the meantime, if you need a way to do this, try
|
Fri 07 Feb 2014 08:19:53 PM UTC, comment #2:
That just creates a file called 'a' and saves it there
|
Fri 07 Feb 2014 08:14:14 PM UTC, comment #1:
try save a
|
Fri 07 Feb 2014 08:12:13 PM UTC, original submission:
octave:1> a = [1,2,3,4];
octave:2> save -text -
error: save: Unrecognized option '-'
|