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

gwern0 at gmail.com gwern0 at gmail.com
Fri Dec 14 12:32:16 EST 2007


On 2007.12.14 11:36:42 -0500, Brent Yorgey <byorgey at gmail.com> scribbled 3.0K characters:
>    On Dec 13, 2007 3:58 PM, <[1]gwern0 at gmail.com> wrote:
>
>      Thu Dec 13 15:51:59 EST 2007  [2]gwern0 at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20071214/44a90654/attachment.bin


More information about the xmonad mailing list