Personal tools

Emacs/API searching

From HaskellWiki

< Emacs(Difference between revisions)
Jump to: navigation, search
(First commit.)
 
m (fix typo of 'an')
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
  +
[[Category:Emacs|*]]
  +
{{Haskell infobox}}
  +
 
= Searching approaches =
 
= Searching approaches =
   
Line 36: Line 39:
 
[http://richardriley.net Richard]
 
[http://richardriley.net Richard]
   
Note: Using and URL like this should work too and will give better results (not yet tested as I'm not an emacs user):
+
Note: Using an URL like this should work too and will give better results (not yet tested as I'm not an emacs user):
   
 
<code>
 
<code>

Latest revision as of 07:39, 29 June 2013

Emacs for Haskell

Installing haskell-mode
Keybindings and simple usage
Indentation
Unicode symbols
Inferior Haskell processes
Automatic unit testing
Automatic building
API searching
Code folding
Project navigation
Snippets
Literate programming
Formatting

[edit] 1 Searching approaches

[edit] 1.1 Hayoo

My newly installed system would not allow me to hoogle what I wanted (no xmonad or xmonadcontrib in hoogle) so someone suggested Hayoo.

(define-key haskell-mode-map (kbd "<f3>")

 (lambda ()
  (interactive)
  (browse-url (format "http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=%s&start"
                      (region-or-word-at-point)))))

region-or-word-at-point is available in the thing-at-pt+.el library.

Added 22-12-2008 - Promt for hayoo word

(defun rgr/hayoo()

 (interactive)
 (let* ((default (region-or-word-at-point))

(term (read-string (format "Hayoo for the following phrase (%s): "

                                   default))))
   (let ((term (if (zerop (length term)) default term)))
     (browse-url (format "http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=%s&start" term)))))


(define-key haskell-mode-map (kbd "<f3>") 'rgr/hayoo)

Alternatively use the excellent browse-apropos-url stuff:

http://www.emacswiki.org/emacs/BrowseAproposURL#toc6

Richard

Note: Using an URL like this should work too and will give better results (not yet tested as I'm not an emacs user):

http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=%s

Tbh 00:56, 25 January 2009 (UTC)