darcs patch: +XMonad.Util.Search: new module (and 1 more)

Thu Dec 13 15:51:59 EST 2007 gwern0@gmail.com * +XMonad.Util.Search: new module This module is intended to provide helpful functions for easily running web searchs; just hit a bound key, enter your query, and up opens a new tab/browser/window with the search results. In theory anyway; the Wikipedia and Google ones work fine for me, but the Internet Archive's docs on how to do don't necessarily seem to be correct. If you were, like me, previously running shell commands to call Surfraw or similar shell scripts to do the same thing, you can now scrap them and replace them. There aren't too many search engines defined here; new ones would be good, and they're easy to add! Thu Dec 13 15:56:54 EST 2007 gwern0@gmail.com * +cabal support for XMonad.Util.Search

On 12/13/07, gwern0@gmail.com
Thu Dec 13 15:51:59 EST 2007 gwern0@gmail.com * +XMonad.Util.Search: new module This module is intended to provide helpful functions for easily running web searchs; just hit a bound key, enter your query, and up opens a new tab/browser/window with the search results. In theory anyway; the Wikipedia and Google ones work fine for me, but the Internet Archive's docs on how to do don't necessarily seem to be correct. If you were, like me, previously running shell commands to call Surfraw or similar shell scripts to do the same thing, you can now scrap them and replace them.
There aren't too many search engines defined here; new ones would be good, and they're easy to add!
One ultimate s.e. is definitely missing: http://yubnub.org/ -- vvv

On Dec 13, 2007 3:58 PM,
Thu Dec 13 15:51:59 EST 2007 gwern0@gmail.com * +XMonad.Util.Search: new module This module is intended to provide helpful functions for easily running web searchs; just hit a bound key, enter your query, and up opens a new tab/browser/window with the search results. In theory anyway; the Wikipedia and Google ones work fine for me, but the Internet Archive's docs on how to do don't necessarily seem to be correct. If you were, like me, previously running shell commands to call Surfraw or similar shell scripts to do the same thing, you can now scrap them and replace them.
There aren't too many search engines defined here; new ones would be good, and they're easy to add!
Thu Dec 13 15:56:54 EST 2007 gwern0@gmail.com * +cabal support for XMonad.Util.Search
Applied, thanks. Note that I also pushed a third patch which fixes a couple problems: there was a warning caused by some name shadowing, and there were also a few haddock syntax errors. Anyway, I like it! Although I wonder whether this should be in XMonad.Prompt rather than XMonad.Util? -Brent

On 2007.12.14 11:36:42 -0500, Brent Yorgey
On Dec 13, 2007 3:58 PM, <[1]gwern0@gmail.com> wrote:
Thu Dec 13 15:51:59 EST 2007 [2]gwern0@gmail.com * +XMonad.Util.Search: new module This module is intended to provide helpful functions for easily running web searchs; just hit a bound key, enter your query, and up opens a new tab/browser/window with the search results. In theory anyway; the Wikipedia and Google ones work fine for me, but the Internet Archive's docs on how to do don't necessarily seem to be correct. If you were, like me, previously running shell commands to call Surfraw or similar shell scripts to do the same thing, you can now scrap them and replace them.
There aren't too many search engines defined here; new ones would be good, and they're easy to add!
Thu Dec 13 15:56:54 EST 2007 [3]gwern0@gmail.com * +cabal support for XMonad.Util.Search
Applied, thanks. Note that I also pushed a third patch which fixes a couple problems: there was a warning caused by some name shadowing, and there were also a few haddock syntax errors.
Oh, were there any? It compiled cleanly for me before I sent it in. Well, thanks.
Anyway, I like it! Although I wonder whether this should be in XMonad.Prompt rather than XMonad.Util?
-Brent
I was wondering what to name it. I ultimately decided against prompt because it seemed to me that for each search engine, there were three functions you might want to use appertaining to it: #A function to which you pass the browser and string - this could be used anywhere by anything, eg. one of the man page modules might offer search' functionality or something. This has nothing to do with a prompt. #A function to which you pass the browser, and it pops up a prompt asking the user for the string. This does has something to do with a prompt. #A function to which you pass the browser, and it goes and fetches the string all on its own from somewhere (in the current case, from the copy-paste selection buffer). Again, nothing to do with a prompt. So there really didn't seem to be anywhere good for it to go other than Actions or Utils. -- gwern Peking DREC CATO Koancho imagery Cross Ermes TRANSEC fish Psyops

Applied, thanks. Note that I also pushed a third patch which fixes a couple problems: there was a warning caused by some name shadowing,
and
there were also a few haddock syntax errors.
Oh, were there any? It compiled cleanly for me before I sent it in. Well, thanks.
Oh, hm, maybe it's a warning under 6.8.2 but not earlier?
Anyway, I like it! Although I wonder whether this should be in XMonad.Prompt rather than XMonad.Util?
-Brent
I was wondering what to name it. I ultimately decided against prompt because it seemed to me that for each search engine, there were three functions you might want to use appertaining to it: #A function to which you pass the browser and string - this could be used anywhere by anything, eg. one of the man page modules might offer search' functionality or something. This has nothing to do with a prompt. #A function to which you pass the browser, and it pops up a prompt asking the user for the string. This does has something to do with a prompt. #A function to which you pass the browser, and it goes and fetches the string all on its own from somewhere (in the current case, from the copy-paste selection buffer). Again, nothing to do with a prompt.
So there really didn't seem to be anywhere good for it to go other than Actions or Utils.
Hmm, fair enough. I guess it's fine where it is. =) -Brent

On Thursday 13 December 2007 14:58:16 gwern0@gmail.com wrote:
Thu Dec 13 15:51:59 EST 2007 gwern0@gmail.com * +XMonad.Util.Search: new module This module is intended to provide helpful functions for easily running web searchs; just hit a bound key, enter your query, and up opens a new tab/browser/window with the search results. In theory anyway; the Wikipedia and Google ones work fine for me, but the Internet Archive's docs on how to do don't necessarily seem to be correct. If you were, like me, previously running shell commands to call Surfraw or similar shell scripts to do the same thing, you can now scrap them and replace them.
There aren't too many search engines defined here; new ones would be good, and they're easy to add!
Thu Dec 13 15:56:54 EST 2007 gwern0@gmail.com * +cabal support for XMonad.Util.Search
The network dependency is unacceptable, so I've removed the escapeURI stuff. Perhaps we can copy it into xmonad? Spencer Janssen
participants (4)
-
Brent Yorgey
-
gwern0@gmail.com
-
Spencer Janssen
-
Valery V. Vorotyntsev