[racket-dev] DrRacket PF1 Search Bug?

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Nov 21 01:34:17 EST 2014

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?

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.


In any case, if it just doesn't work, then doing the trampoline thing
should be easy -- it should do the same thing that `send-url/win' does:
if the URL has a query or a fragment, then use `send-url/contents' with
the same contents as the windows case.

And since there's the linux case too, then it's worth an abstraction,
something like the simple shuffle in the attached patch.  (Completely
untested, and wrapping xdg-open in the linux function since it looks
like it's still as broken as I remember it to be.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p
Type: application/octet-stream
Size: 1802 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20141121/a8c81140/attachment-0001.obj>

Posted on the dev mailing list.