World: r4wp
[!REBOL3] General discussion about REBOL 3
older newer | first last |
Andreas 10-Mar-2013 [1502] | If you can find a way to be more specific on OSX, so that _only_ URLs get handled, that would be great. OTOH, xdg-open is already rather versatile as well (only I fear that OSX's open is even more featureful). |
MarcS 10-Mar-2013 [1503x4] | One problem with the existing implementation is that xdg-open and x-www-browser are searched for in the PATH, so executables with the same names in a PATH directory that takes precedence will yield different behaviour. |
Andreas: yeah, file:/// will open in Finder with this pathc. | |
patch*. | |
(So it's not constrained to the browser.) | |
Andreas 10-Mar-2013 [1507] | That's the same with xdg-open. |
MarcS 10-Mar-2013 [1508] | Right. |
BrianH 10-Mar-2013 [1509] | Yeah. It looks like it just calls open, which can be a bit of a hole. It's better for now but we need to come up with a better solution in the long run. |
MarcS 10-Mar-2013 [1510x3] | Agreed. |
Hmm, why does BROWSE accept NONE? | |
BrianH: I don't mean to present this patch as something it's not. To clarify: still a hacky solution, but at least it brings the current behaviour to OS X. | |
BrianH 10-Mar-2013 [1513] | No, agreed. It's still nowhere near as bad as the #1921 approach, or the last ticket that requested it. But we need to make sure to come up with something better in the long run. |
MarcS 10-Mar-2013 [1514x3] | For sure. |
I might patch this NONE case unless anyone has a good reason to leave it in place? | |
(At the moment, you get usage info on stderr. The current r3 just segfaults on Linux.) | |
BrianH 10-Mar-2013 [1517] | It's none propagation I guess. Because dealing with or ignoring nones is easier to do in Rebol than writing conditional code around everything to avoid triggering errors. |
MarcS 10-Mar-2013 [1518] | Okay, so I guess we just need to handle the NONE rather than attempting to browse it |
BrianH 10-Mar-2013 [1519x3] | The BROWSE code should explicitly do nothing if passed a NONE. It certainly shouldn't segfault. |
If it doesn't explicitly do nothing, that's a bug. | |
Just return unset, I guess. | |
MarcS 10-Mar-2013 [1522x2] | Okay, fixing now. |
not R_NONE? | |
BrianH 10-Mar-2013 [1524] | No, that returns none. Whatever BROWSE normally returns. |
Andreas 10-Mar-2013 [1525] | It normally returns NONE. |
MarcS 10-Mar-2013 [1526] | R_NONE |
Andreas 10-Mar-2013 [1527] | But I think the original intent was for NONE to open an empty browser. Can't find any references for that. |
BrianH 10-Mar-2013 [1528] | Weird. Shouldn't it return unset? |
MarcS 10-Mar-2013 [1529] | https://github.com/rebol/r3/blob/master/src/core/n-io.c#L499 |
Andreas 10-Mar-2013 [1530] | Should probably rather return the URL, that would be more useful :) |
BrianH 10-Mar-2013 [1531] | That treatment of a none argument makes sense, Andreas. However, the function should return unset, like PRINT. |
MarcS 10-Mar-2013 [1532x2] | If we can agree on something, I'll push that the change. |
BrianH: So, R_UNSET? | |
Andreas 10-Mar-2013 [1534] | That's independent of the OSX open fix in any case. |
BrianH 10-Mar-2013 [1535] | Sure. And in the has-a-url case too. |
Andreas 10-Mar-2013 [1536] | So better just file a CC issue for the `browse none` crash, and we can discuss the desired design in there. |
BrianH 10-Mar-2013 [1537] | Yeah, maybe two pulls. |
MarcS 10-Mar-2013 [1538] | Okay, I'll pop this in a separate branch. |
BrianH 10-Mar-2013 [1539] | Marc, did you file a ticket for this? If not, I can repurpose #1921 for this. |
Andreas 10-Mar-2013 [1540] | Win32 browse opens an empty browser for NONE. |
MarcS 10-Mar-2013 [1541] | I didn't, no. |
Andreas 10-Mar-2013 [1542] | Please don't repurpose 1921 :) |
BrianH 10-Mar-2013 [1543] | Let 1921 stay dismissed, OK. |
Andreas 10-Mar-2013 [1544x2] | One ticket for missing BROWSE on OSX, another one for the browse none crash. |
https://github.com/rebol/r3/blob/master/src/os/win32/host-lib.c#L640 | |
BrianH 10-Mar-2013 [1546] | Will do. And I'm still revamping the REWORD ticket example code. |
Andreas 10-Mar-2013 [1547] | Well, I'll briefly write up the crash ticket. |
BrianH 10-Mar-2013 [1548] | If you could write both I'd appreciate it. I have limited R3 time today, I have an R2 task I have to work on. |
Andreas 10-Mar-2013 [1549] | Ok. |
MarcS 10-Mar-2013 [1550x2] | https://github.com/0branch/r3/commit/95e3481ffba473f9191b918dd2eb890e764ff32a |
If that looks good, I can submit pull requests for both issues once Andreas has written up the issues? | |
older newer | first last |