Bug 856348
| Summary: | Please add DuckDuckGo to elinks | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Prakash S <prakash> |
| Component: | elinks | Assignee: | Kamil Dudka <kdudka> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | kdudka, ovasik |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | elinks-0.12-0.31.pre5.fc19 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-10-08 11:05:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Prakash S
2012-09-11 20:17:17 UTC
Please explain what exactly you mean by "add DuckDuckGo to elinks". AFAIK, elinks does not have any web-search widget like Firefox. I wasn't aware of elinks not having a search option. Thanks! We can add a dumb prefix for URI rewriting to the default elinks' configuration: http://repo.or.cz/w/elinks.git/blob/88be88c:/src/protocol/rewrite/rewrite.c#l112 There is "g " prefix for Google search already. Is there a similar prefix for DuckDuckGo in any other browser? Anyway, this is something that we need to negotiate upstream first... Or perhaps a _smart_ prefix. I am not quite sure why the "g " prefix appears in both of them... Sorry, this is actually explained in the documentation. "g" without any argument means "just go to http://www.google.com/" (dumb prefix), where as "g expression" tells elinks to search the given expression using Google (smart prefix). Thanks, Kamil. Can we use a ddg prefix for DuckDuckGo? Looks like d is being used on dict.org. Prakash, we need to send a patch upstream. I guess that using "t=fedora" is inappropriate for the upstream patch. Could we use "t=elinks" or something like that instead?
--- a/src/protocol/rewrite/rewrite.c
+++ b/src/protocol/rewrite/rewrite.c
@@ -121,6 +121,7 @@ static struct option_info uri_rewrite_options[] = {
INIT_OPT_DUMB_PREFIX("cia", "http://cia.navi.cx/"),
INIT_OPT_DUMB_PREFIX("b", "http://babelfish.altavista.com/babelfish/tr"),
INIT_OPT_DUMB_PREFIX("d", "http://www.dict.org"),
+ INIT_OPT_DUMB_PREFIX("ddg", "https://duckduckgo.com/?t=elinks"),
INIT_OPT_DUMB_PREFIX("g", "http://www.google.com/"),
INIT_OPT_DUMB_PREFIX("gg", "http://www.google.com/"),
INIT_OPT_DUMB_PREFIX("go", "http://www.google.com/"),
@@ -158,6 +159,7 @@ static struct option_info uri_rewrite_options[] = {
INIT_OPT_SMART_PREFIX("cambridge", "http://dictionary.cambridge.org/results.asp?searchword=%s"),
INIT_OPT_SMART_PREFIX("cliki", "http://www.cliki.net/admin/search?words=%s"),
INIT_OPT_SMART_PREFIX("d", "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query"),
+ INIT_OPT_SMART_PREFIX("ddg", "https://duckduckgo.com/?q=%s&t=elinks"),
INIT_OPT_SMART_PREFIX("dmoz", "http://search.dmoz.org/cgi-bin/search?search=%s"),
INIT_OPT_SMART_PREFIX("foldoc", "http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?%s"),
INIT_OPT_SMART_PREFIX("g", "http://www.google.com/search?q=%s&btnG=Google+Search"),
t=elinks works. Thanks, Kamil. proposed upstream: http://thread.gmane.org/gmane.comp.web.elinks/3536 fixed in elinks-0.12-0.31.pre5.fc19 |