Option --line of xed command tool does not work and produces an error

Originator:gcerquant
Number:rdar://10626303 Date Originated:26-Dec-2011 12:19 PM
Status:Duplicate/9232064 Resolved:YES
Product:Xcode / xed Product Version:xed version 4.0
Classification:Bug Reproducible:Always
 
26-Dec-2011 12:19 PM Guillaume Cerquant:
Summary:
xed command line tool has the option --line to select a given line in the last file opened.
This option does not work anymore and produces an error.

Steps to Reproduce:

Create a new file with:
echo -e "Hello World\nSeems xed has a bug:\nthe --line option produces an error" > File.m

Try to open this new file in Xcode, and select line 2:
xed --line 2 File.m 


Expected Results:
Xcode open the file File.m and place the cursor on line 2

Actual Results:
Xcode open the file File.m and the cursor stays on the first line (or where it already was if the file was already open).
An error is printed in the console:
2011-12-26 12:09:41.046 xed[2945:407] Error: Error Domain=NSOSStatusErrorDomain Code=-1728 "The operation couldn’t be completed. (OSStatus error -1728.)" (e.g.,: specifier asked for the 3rd, but there are only 2. Basically, this indicates a run-time resolution error. ) UserInfo=0x4001b3fa0 {ErrorNumber=-1728, ErrorOffendingObject=<XcodeParagraph @0x1bb540: XcodeParagraph 1 of XcodeTextDocument 0 of application "Xcode" (2637)>}

Regression:
This used to work in previous versions of Xcode.
I cannot say exactly where this regression has been introduced.


Notes:
Using xed version 4.0 with Xcode 4.2.1 (Build 4D502) on Lion (10.7.2 - Build 11C74).
No combination of the option when calling xed changes anything in the result.

Comments

Problem similar with the xed version in /usr/bin and in /Developer/usr/bin


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!