[racket-dev] DrRacket PF1 Search Bug?
On Fri, Nov 21, 2014 at 12:34 AM, Eli Barzilay <eli at barzilay.org> wrote:
> On Thu, Nov 20, 2014 at 10:38 PM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
>> No, the browser isn't hiding the query part.
>>
>> Here are the content of two script files:
>>
>> $ cat a.scrpt
>> open location "file:///Applications/r/doc/search/index.html?q=xyz"
>> $ cat b.scrpt
>> open location "file:///Users/robby/Library/Racket/development/doc/search/index.html?q=xyz"
>>
>> Running "osascript a.scrpt" doesn't work, but running "osascript
>> b.scrpt" does work. And by "work" I mean that in both cases the
>> corresponding webpage is visited in Safari, but in the first case, the
>> q parameter disappears.
>
> Not that it matters, but did you try to see if it's the file
> permissions?
Oh, they are!
$ ls - at l /Users/robby/Library/Racket/development/doc/search/index.html
-rw-r--r-- 1 robby staff 5386 Nov 19 14:00
/Users/robby/Library/Racket/development/doc/search/index.html
$ ls - at l /Applications/r/doc/search/index.html
-rw-r--r--@ 1 robby admin 4929 Nov 20 03:41
/Applications/r/doc/search/index.html
com.apple.quarantine 67
And that was it!!
If I run:
$ xattr -d com.apple.quarantine /Applications/r/doc/search/index.html
then osascript works again!
> Another thing: I googled "osascript open url drops query" and got a
> bunch of racket results, and dropping "osascript" make the results more
> sensible. So perhaps "osascript" is outdated? Some more searching
> makes it look like you can just run the open command directly, and that
> might make a difference.
It's the same.
... I don't know the ramifications of just calling "xattr" from inside
DrRacket to fix things up. It may be better to just create the file in
the user's directory instead.
Robby