[racket-dev] DrRacket PF1 Search Bug?

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Nov 21 16:13:54 EST 2014

On Fri, Nov 21, 2014 at 3:16 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
>
> Oh, my apologies. I thought you meant something different.
>
> Yes, this works.

Ah, in this case, the patch that I sent earlier should work fine.
(I could do a pull request, but it should really be tested...)

> I don't have a good idea which is the better approach now.

[Bear in mind that I don't really know what the issue with the file
permissions is (looks more like some security attributes):]

I think that playing with such attributes is a worse option -- it's
something that I'm not sure would work in all settings (but see above),
and if there is a way to make it work now, it might not be possible in
the future.  The trampoline approach is relatively robust and well
behaved.  There is a minor price of these temporary files, but they do
get cleaned out (whenever `send-url/contents' is called), so it should
settle on a small number that will not grow indefinitely[*], so this is
not a problem.

Also, on the "it's already there" side -- this trampoline approach is
already there for the windows version, and it's needed for the
`xdg-open' thing anyway, so abstracting it into a new (internal)
function makes sense already, so in terms of additional code there's no
cost for doing the mac version too.


([*] It might be a problem if, for example, your cat sits on the f1 key
and the os doesn't take the focus away from drracket...  It might be
useful to change it from using a random temp file to a name based on a
hash of the forwarded url, which will further minimize the number of
files.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.