unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* google search result differ in Opera and w3m
@ 2008-08-14 12:20 Xah
  2008-08-16 20:33 ` Xah
  0 siblings, 1 reply; 7+ messages in thread
From: Xah @ 2008-08-14 12:20 UTC (permalink / raw)
  To: help-gnu-emacs

it's kinda odd that it seems google search results shows up
differently when used in Opera and w3m with emacs interface.

For example, i've defined this:

(defun lookup-google ()
"Look up the current word or region in google.\n
This command generates a url for google search and switches
you to browser."
 (interactive)
 (let (myphrase myurl)
   (setq myphrase
         (if (and transient-mark-mode mark-active)
             (buffer-substring-no-properties (region-beginning)
(region-end))
           (thing-at-point 'symbol)))
  (setq myphrase (replace-regexp-in-string " " "%20" myphrase))
  (setq myurl (concat "http://www.google.com/search?q=%22" myphrase
"%22"))
  (shell-command (concat "open -a opera " "\""  myurl "\""))
  (w3m-browse-url myurl)
;;    (browse-url myurl)
   ))

the command send the region text as quoted search in google and shows
results both in Opera and w3m.

I have the region like this: “but this starts looking like plain hard
slog.”. Then the command searches with this string “"but this starts
looking like plain hard slog."”.

but the result is different in Opera and in w3m. This is just one
example. I noticed many other examples when using this command.

Any idea why?

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: google search result differ in Opera and w3m
  2008-08-14 12:20 google search result differ in Opera and w3m Xah
@ 2008-08-16 20:33 ` Xah
  2008-08-17 11:51   ` Nikolaj Schumacher
  2008-08-17 12:52   ` Thorsten Bonow
  0 siblings, 2 replies; 7+ messages in thread
From: Xah @ 2008-08-16 20:33 UTC (permalink / raw)
  To: help-gnu-emacs

The results from using Opera, Safari, Firefox, in google search seems
to differ from results shown in w3m.

To test, try this url in Firefox and w3m/emacs:

http://www.google.com/search?q=%22The%20computer%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize%22

Firefox shows many results, top one is this time mag article:
http://www.time.com/time/magazine/article/0,9171,981238-1,00.html

but in w3m it just shows one vocabulary page on my website that quoted
this phrase.

Anyone reproduce? I'm suspecting this is w3m bug or the w3m-mode bug?

  Xah
∑ http://xahlee.org/

☄

On Aug 14, 5:20 am, Xah <xah...@gmail.com> wrote:
> it's kinda odd that it seems google search results shows up
> differently when used in Opera andw3mwith emacs interface.
>
> For example, i've defined this:
>
> (defun lookup-google ()
> "Look up the current word or region in google.\n
> This command generates a url for google search and switches
> you to browser."
>  (interactive)
>  (let (myphrase myurl)
>    (setq myphrase
>          (if (and transient-mark-mode mark-active)
>              (buffer-substring-no-properties (region-beginning)
> (region-end))
>            (thing-at-point 'symbol)))
>   (setq myphrase (replace-regexp-in-string " " "%20" myphrase))
>   (setq myurl (concat "http://www.google.com/search?q=%22" myphrase
> "%22"))
>   (shell-command (concat "open -a opera " "\""  myurl "\""))
>   (w3m-browse-url myurl)
> ;;    (browse-url myurl)
>    ))
>
> the command send the region text as quoted search in google and shows
> results both in Opera andw3m.
>
> I have the region like this: “but this starts looking like plain hard
> slog.”. Then the command searches with this string “"but this starts
> looking like plain hard slog."”.
>
> but the result is different in Opera and inw3m. This is just one
> example. I noticed many other examples when using this command.
>
> Any idea why?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: google search result differ in Opera and w3m
  2008-08-16 20:33 ` Xah
@ 2008-08-17 11:51   ` Nikolaj Schumacher
  2008-08-17 12:52   ` Thorsten Bonow
  1 sibling, 0 replies; 7+ messages in thread
From: Nikolaj Schumacher @ 2008-08-17 11:51 UTC (permalink / raw)
  To: Xah; +Cc: help-gnu-emacs

Xah <xahlee@gmail.com> wrote:

> To test, try this url in Firefox and w3m/emacs:
>
> http://www.google.com/search?q=%22The%20computer%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize%22
>
> Firefox shows many results, top one is this time mag article:
> http://www.time.com/time/magazine/article/0,9171,981238-1,00.html

Not here.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: google search result differ in Opera and w3m
  2008-08-16 20:33 ` Xah
  2008-08-17 11:51   ` Nikolaj Schumacher
@ 2008-08-17 12:52   ` Thorsten Bonow
  2008-08-17 20:16     ` Xah
  1 sibling, 1 reply; 7+ messages in thread
From: Thorsten Bonow @ 2008-08-17 12:52 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> "Xah" == Xah  <xahlee@gmail.com> writes:

    Xah> The results from using Opera, Safari, Firefox, in google search seems
    Xah> to differ from results shown in w3m.

    Xah> To test, try this url in Firefox and w3m/emacs:

    Xah> http://www.google.com/search?q=%22The%20computer%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize%22

    Xah> Firefox shows many results, top one is this time mag article:
    Xah> http://www.time.com/time/magazine/article/0,9171,981238-1,00.html

    Xah> but in w3m it just shows one vocabulary page on my website that quoted
    Xah> this phrase.

    Xah> Anyone reproduce? I'm suspecting this is w3m bug or the w3m-mode bug?

You can reproduce the two different results if you call your browser with or
without the quotes `"' surrounding your query expression, which are translated
to `%22' at the beginning and end of the string sent to the browser.

So I think you call emacs/w3m with and firefox without them.

Toto

-- 
Contact information and PGP key at
http://www.withouthat.org/~toto/contact.html

I'll learn to play the Saxophone,
I play just what I feel.
Drink Scotch whisky all night long,
And die behind the wheel.
They got a name for the winners in the world,
I want a name when I lose.
They call Alabama the Crimson Tide,
Call me Deacon Blues.
		-- Becker and Fagan, "Deacon Blues"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: google search result differ in Opera and w3m
  2008-08-17 12:52   ` Thorsten Bonow
@ 2008-08-17 20:16     ` Xah
  2008-08-17 21:41       ` Thorsten Bonow
  0 siblings, 1 reply; 7+ messages in thread
From: Xah @ 2008-08-17 20:16 UTC (permalink / raw)
  To: help-gnu-emacs

On Aug 17, 5:52 am, Thorsten Bonow <thorsten.bo...@post.rwth-
aachen.de> wrote:
> >>>>> "Xah" ==Xah <xah...@gmail.com> writes:
>
>    Xah> The results from using Opera, Safari, Firefox, in google search seems
>    Xah> to differ from results shown in w3m.
>
>    Xah> To test, try this url in Firefox and w3m/emacs:
>
>    Xah> http://www.google.com/search?q=%22The%20
          computer%20wizards%20at%20Industrial%20
          Light%20and%20Magic%20help%20alchemize%22
>
>    Xah> Firefox shows many results, top one is this time mag article:
>    Xah> http://www.time.com/time/magazine/article/0,9171,981238-1,00.html
>
>    Xah> but in w3m it just shows one vocabulary page on my website that quoted
>    Xah> this phrase.
>
>    Xah> Anyone reproduce? I'm suspecting this is w3m bug or the w3m-mode bug?
>
> You can reproduce the two different results if you call your browser with or
> without the quotes `"' surrounding your query expression, which are translated
> to `%22' at the beginning and end of the string sent to the browser.
>
> So I think you call emacs/w3m with and firefox without them.

This is kinda odd. The double straight quote needs to be part of the
search.

In OSX 10.4.11, in Safari, Opera, Firefox (all latest public version),
they all return mulitple results with the following line on top:

«Information No results found for "The computer wizards at Industrial
Light and Magic help alchemize".

Results for The computer wizards at Industrial Light and Magic help
alchemize (without quotes):»

in w3m and icab, they give just 1 result.

So, perhaps somehow when google search automatically switch to a non-
exact-phrase search when the exact-phrase search got only one result?
But this couldn't be because some FF in linux apparantly return just 1
result from exact phrase search too.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: google search result differ in Opera and w3m
  2008-08-17 20:16     ` Xah
@ 2008-08-17 21:41       ` Thorsten Bonow
  2008-08-18  1:32         ` Xah
  0 siblings, 1 reply; 7+ messages in thread
From: Thorsten Bonow @ 2008-08-17 21:41 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> "Xah" == Xah  <xahlee@gmail.com> writes:

    Xah> Anyone reproduce? I'm suspecting this is w3m bug or the w3m-mode bug?
    >>
    >> You can reproduce the two different results if you call your browser with
    >> or without the quotes `"' surrounding your query expression, which are
    >> translated to `%22' at the beginning and end of the string sent to the
    >> browser.
    >>
    >> So I think you call emacs/w3m with and firefox without them.

    Xah> This is kinda odd. The double straight quote needs to be part of the
    Xah> search.

    Xah> In OSX 10.4.11, in Safari, Opera, Firefox (all latest public version),
    Xah> they all return mulitple results with the following line on top:

    Xah> «Information No results found for "The computer wizards at Industrial
    Xah> Light and Magic help alchemize".

    Xah> Results for The computer wizards at Industrial Light and Magic help
    Xah> alchemize (without quotes):»

    Xah> in w3m and icab, they give just 1 result.

    Xah> So, perhaps somehow when google search automatically switch to a non-
    Xah> exact-phrase search when the exact-phrase search got only one result?
    Xah> But this couldn't be because some FF in linux apparantly return just 1
    Xah> result from exact phrase search too.

Hi,

I can't reproduce your problem.

If I type your query with quotes (`"The computer wizards at Industrial Light and
Magic help alchemize"'), I get one result (as expected) in epiphany, firefox and
emacs/w3m and w3m. If I type it without quotes (`The computer wizards at
Industrial Light and Magic help alchemize'), I get many results---nothing
unexpected here.

If I paste your URL
(`http://www.google.com/search?q=%22The%20computer%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize%22')
in a browser or call the browser with your URL as argument from the command
line, again I get one result---with all my browsers.

If I remove the quotes, translated to `%22', at the beginning and end of the
search phrase
(`http://www.google.com/search?q=The%20computer%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize'),
I get many results---again as expected.

I can't reproduce your claim that with the *same* string you can get different
results from google depending on the browser.

Are you calling the browsers from a script and add quoting in one case but not
the other? Am I missing something?

Toto

-- 
Contact information and PGP key at
http://www.withouthat.org/~toto/contact.html

After visiting America for a while, it's always nice to get back
to New York.

Kinky Friedman: Frequent Flyer



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: google search result differ in Opera and w3m
  2008-08-17 21:41       ` Thorsten Bonow
@ 2008-08-18  1:32         ` Xah
  0 siblings, 0 replies; 7+ messages in thread
From: Xah @ 2008-08-18  1:32 UTC (permalink / raw)
  To: help-gnu-emacs

On Aug 17, 2:41 pm, Thorsten Bonow <thorsten.bo...@post.rwth-
aachen.de> wrote:
> >>>>> "Xah" ==Xah <xah...@gmail.com> writes:
>
>    Xah> Anyone reproduce? I'm suspecting this is w3m bug or the w3m-mode bug?
>     >>
>     >> You can reproduce the two different results if you call your browser with
>     >> or without the quotes `"' surrounding your query expression, which are
>     >> translated to `%22' at the beginning and end of the string sent to the
>     >> browser.
>     >>
>     >> So I think you call emacs/w3m with and firefox without them.
>
>    Xah> This is kinda odd. The double straight quote needs to be part of the
>    Xah> search.
>
>    Xah> In OSX 10.4.11, in Safari, Opera, Firefox (all latest public version),
>    Xah> they all return mulitple results with the following line on top:
>
>    Xah> «Information No results found for "The computer wizards at Industrial
>    Xah> Light and Magic help alchemize".
>
>    Xah> Results for The computer wizards at Industrial Light and Magic help
>    Xah> alchemize (without quotes):»
>
>    Xah> in w3m and icab, they give just 1 result.
>
>    Xah> So, perhaps somehow when google search automatically switch to a non-
>    Xah> exact-phrase search when the exact-phrase search got only one result?
>    Xah> But this couldn't be because some FF in linux apparantly return just 1
>    Xah> result from exact phrase search too.
>
> Hi,
>
> I can't reproduce your problem.
>
> If I type your query with quotes (`"The computer wizards at Industrial Light and
> Magic help alchemize"'), I get one result (as expected) in epiphany, firefox and
> emacs/w3m and w3m. If I type it without quotes (`The computer wizards at
> Industrial Light and Magic help alchemize'), I get many results---nothing
> unexpected here.
>
> If I paste your URL
> (`http://www.google.com/search?q=%22The%20computer%20wizards%20at%20Ind...)
> in a browser or call the browser with your URL as argument from the command
> line, again I get one result---with all my browsers.
>
> If I remove the quotes, translated to `%22', at the beginning and end of the
> search phrase
> (`http://www.google.com/search?q=The%20computer%20wizards%20at%20Indust...),
> I get many results---again as expected.
>
> I can't reproduce your claim that with the *same* string you can get different
> results from google depending on the browser.
>
> Are you calling the browsers from a script and add quoting in one case but not
> the other? Am I missing something?

Am not sure what's going on myself.

Apparently, in my system, OSX 10.4.11 and latest public versions of
Safari, FireFox, Opera, all automatically returns the multiple results
that came from non-exact phrase search. This is done by pasting the
line

http://www.google.com/search?q=%22The%20computer%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize%22

as it is into the browsers url field.

Alternatively, the same behavior can result by running these commands
in the Terminal:

open -a opera "http://www.google.com/search?q=%22The%20computer
%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize
%22"

open -a safari "http://www.google.com/search?q=%22The%20computer
%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize
%22"

open -a firefox "http://www.google.com/search?q=%22The%20computer
%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize
%22"

while in w3m itself (without using emacs interface), and in iCab, the
single result of exact phrase search is returned.

w3m behavior can be produced on my machine by running these in
Terminal:

w3m http://www.google.com/search?q=%22The%20computer%20wizards%20at%20Industrial%20Light%20and%20Magic%20help%20alchemize%22

w3m "http://www.google.com/search?q=%22The%20computer%20wizards%20at
%20Industrial%20Light%20and%20Magic%20help%20alchemize%22"

----------------

From your post, and other's reply i've asked in irc, it appears that
in linux, the single result is seen in Opera and Firefox. So far i
don't have confirmation of reproducablility in OSX 10.4.11, or on
Windows.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-08-18  1:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-14 12:20 google search result differ in Opera and w3m Xah
2008-08-16 20:33 ` Xah
2008-08-17 11:51   ` Nikolaj Schumacher
2008-08-17 12:52   ` Thorsten Bonow
2008-08-17 20:16     ` Xah
2008-08-17 21:41       ` Thorsten Bonow
2008-08-18  1:32         ` Xah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).