After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723088 - Allow to search selected text on Web
Allow to search selected text on Web
Status: RESOLVED OBSOLETE
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 702200 (view as bug list)
Depends on: 723007
Blocks:
 
 
Reported: 2014-01-27 11:18 UTC by Sindhu S
Modified: 2021-06-10 20:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Search On Web (3.30 KB, patch)
2014-01-27 11:18 UTC, Sindhu S
none Details | Review

Description Sindhu S 2014-01-27 11:18:42 UTC
Created attachment 267291 [details] [review]
Add Search On Web

Patch to search selected text in g-t on the web.
The search provider has been hardcoded to duckduckgo.com for now.

Because there was no direct function in VTE API that I could use to obtain selected text from the terminal, I had to trigger copy and then grab the text in the primary clipboard. I have a filed a bug about the lack of get_selection function in VTE [1].

I'd like to address an argument that's likely to come up against this patch: "it's not a good idea to pollute the context menu". This feature is as useful as the [select text, right click and search] we use in our web browsers. We can always open up a new tab and type in our search query but we can also search by selecting text and rightclicking. Same idea.

Please give your comments and should this be a feature developers wish to see in gnome-terminal, I will clean up and add feature to switch search providers in the code based on reviews.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=723007
Comment 1 Egmont Koblinger 2014-01-27 12:15:25 UTC
Just some random thoughts from a random guy who is absolutely not in the position to make any decision:

- What's your use case for this, and are you sure it's a quite common use case? I, for one, have never missed this functionality and probably would have never used so far and would never use. (What I do sometimes with a manual copy-paste is that I look up the meaning of a word, but for that I use an online translation service rather than a generic search engine.)

- Are there any other non-browser apps providing this feature? If not, should gnome-terminal be the first/only(?) to support this, shouldn't this be something generic (e.g. gedit, evince etc. should all have this). Shouldn't all applications with copy-paste provide this functionality?

- Why necessarily a web search, not a local or a mixed (like Ubuntu's Unity stuff (or is it called Ubuntu One??? I'm really not sure))?

- Which search engine is the default, and which search engines are offered should probably be generic across the whole Gnome desktop, including Gnome's browser, and preferably integrated with Firefox and Chrome too.

- Which search engine is the default, and which search engines are offered is I'm afraid a highly political decision with Gnome partners/sponsors and other profit oriented companies in the game and whatnot. I'd guess it's way more complicated than just putting someone's personal favorites there.

- You should limit the query length to a reasonable maximum size. (There's an API call to select all the text, and we have unlimited scrollback feature. I'm not sure what happens when big data is placed in the clipboard, hopefully it's limited. But the clipboard can still be way larger than what you'd want to place in a GET parameter.)

- In Firefox, the menu entry looks like >>Search Google for "this particular text"<<. In your patch, it's simply >>Search on web<<. I'm not sure if it's obvious for users that the selection will be searched, and so that they send a (potentially sensitive) data to some 3rd party. (This of course requires get_selection().)
Comment 2 Daniel Aleksandersen 2016-05-29 20:20:07 UTC
Duplicate of bug #702200.

The OS X Terminal.app has this feature and it’s very useful. I select text in terminals (errors mostly) and search for them online all the time.
Comment 3 Debarshi Ray 2016-05-31 17:12:10 UTC
*** Bug 702200 has been marked as a duplicate of this bug. ***
Comment 4 GNOME Infrastructure Team 2021-06-10 20:41:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7407.