stack_rescue icon indicating copy to clipboard operation
stack_rescue copied to clipboard

Fix default search to stackoverflow

Open jeaxelrod opened this issue 11 years ago • 6 comments

jeaxelrod avatar Jun 21 '14 02:06 jeaxelrod

When you specify the site: it will filter all results down to that domain only. I think we may want to make the config option to set the site like you suggest and then also add the site: into the query later on. What do you think?

excid3 avatar Jun 21 '14 16:06 excid3

I think it's best to add the "site:" into the query later on. Asking the users and ourselves to type in "site:" for every site sounds like a bit much.

Is there a way to specify multiple sites?

Currently the link results are being printed onto the terminal or console. It would be to cool to print the link within the stack trace within the browser. Do you know where I can look to find more information on how to do this? I'm having trouble finding it on google. Thanks.

Jeremy

On Sat, Jun 21, 2014 at 9:57 AM, Chris Oliver [email protected] wrote:

When you specify the site: it will filter all results down to that domain only. I think we may want to make the config option to set the site like you suggest and then also add the site: into the query later on. What do you think?

— Reply to this email directly or view it on GitHub https://github.com/excid3/stack_rescue/pull/2#issuecomment-46758845.

jeaxelrod avatar Jun 23 '14 21:06 jeaxelrod

If we go as far as adding multiple sites, we may just want to allow you to specify extra google search query text that way you can customize it as much as you want. Otherwise we go down the rabbit hole of adding configuration options for every advanced search function Google supports. Maybe we rename the site option to something that better describes the extra query text?

On OSX/Linux you can use the open command to open a url in the default app for it. open http://github.com would spawn a new browser tab for me in Chrome for example.

My ideal solution here is to work with better_errors and have our gem extend better_errors to include a widget of related links so it happens entirely in browser. What do you think?

excid3 avatar Jun 23 '14 21:06 excid3

"Otherwise we go down the rabbit hole of adding configuration options for every advanced search function Google supports." I agree with you on this. I think the only user configurable option should be which website google searches. Even then though, I'm not quite sure which other sites the user would want besides from stackoverflow. You know of other sites?

I think the most ideal situation is that we handle all of the configurations and work in order to obtain to best five search results. So the user doesn't have to add extra query text or anything else. I'm also not sure what extra query text the user would want to add. Did you have some ideas? And would this extra search query text be added for every search?

To use the open command with the stack_rescue gem, would the user still have to type out the whole url? That would be difficult.

Let me check out better errors.

Jeremy

On Mon, Jun 23, 2014 at 2:52 PM, Chris Oliver [email protected] wrote:

If we go as far as adding multiple sites, we may just want to allow you to specify extra google search query text that way you can customize it as much as you want. Otherwise we go down the rabbit hole of adding configuration options for every advanced search function Google supports. Maybe we rename the site option to something that better describes the extra query text?

On OSX/Linux you can use the open command to open a url in the default app for it. open http://github.com would spawn a new browser tab for me in Chrome for example.

My ideal solution here is to work with better_errors https://github.com/charliesome/better_errors and have our gem extend better_errors to include a widget of related links so it happens entirely in browser. What do you think?

— Reply to this email directly or view it on GitHub https://github.com/excid3/stack_rescue/pull/2#issuecomment-46907205.

jeaxelrod avatar Jun 24 '14 23:06 jeaxelrod

Regarding opening the links, perhaps you could point out in the readme known shortcuts for various terminal apps. E.g. cmd + click in iTerm2 or cmd + double click in Terminal on Mac OSX.

lexh avatar Jun 25 '14 02:06 lexh

Great tips @lexh. I forgot about cmd+click!

Maybe we just have an option for filtering to stackoverflow or not? I can't think of any better sites either. I could imagine people wanting to filter out results with certain terms, but seems rare.

With open you could probably just use backticks to run the command easily. If you type this into irb, it will open Github.

`open http://github.com`

Obviously this is going to be very annoying so I don't think open is a great solution. Integrating with better_errors still seems like the best approach but probably requires a rewrite to be a Rack middleware.

excid3 avatar Jun 26 '14 14:06 excid3