1

I'm fairly new to emacs. I'm using OS X 10.10. I have been learning to use helm. I was interested in its integration with surfraw. I installed surfraw from teh source tarball following the instructions at surfraw.alioth.debian.org.

However, when I use helm-surfraw, I originally got a file not found error. Following this discussion, I determined this was partly due to lack of a default browser.

I installed lynx as follows:

sudo mkdir /usr/local/src
cd /usr/local/src
sudo curl -O http://lynx.isc.org/lynx2.8.7/lynx2.8.7.tar.gz
sudo tar -xzvf lynx2.8.7.tar.gz
cd lynx2-8-7
sudo ./configure --mandir=/usr/share/man
sudo make
sudo make install

Then, I did the following:

$ mkdir -p ~/.config/surfraw
$ echo "SURFRAW_text_browser=/usr/local/bin/lynx" >> ~/.config/surfraw/conf
$ echo "SURFRAW_graphical=no" >> ~/.config/surfraw/conf

The good news is that I can now run surfraw from the terminal. However, helm-surfraw still doesn't work. I'm not given any options for a search engine (see screenshot).

I'm interested in helm-surfraw alternatives, but I'd also like to understand what I'm doing wrong.

enter image description here

  • "However, helm-surfraw still doesn't work." Can you elaborate? – nanny Jun 22 '15 at 13:24
  • Yes: "I'm not given any options for a search engine". – hartshoj Jun 22 '15 at 22:28
1

You should try two twings:

  1. Open Terminal and type surfraw -elvi. If you get GLOBAL ELVI: and nothing else go to next step
  2. Install gnu-sed from Mac-Ports. And relink the new gnu-sed with the old one (I think it's located on /usr/bin/sed/)
  • I didn't realize that Mac-Ports still existed. A quick search of www.macports.org doesn't reveal a gnu-sed though. But why will this help? – hartshoj Aug 15 '15 at 19:43
  • Yes sorry, you should download using homebrew . The problem is connected with sed. OSX has a built in sed which is not recognized by surfraw. – Enrico Pirani Aug 15 '15 at 20:48
  • OK, got that far. I'm not sure what you mean by 'relink' though. There isn't anything in /usr/bin/sed/, either. There is a binary file sed in /usr/bin/ – hartshoj Aug 16 '15 at 21:34
  • If you have installed gnu-sed from homebrew you should have two sed files one located in /usr/local/bin/ installed by homebrew (named gsed) and another one in /usr/bin/ which is the one installed by default on OSX (named sed). Now move/rename sed in another location. After that give this command :sudo ln -s /usr/local/Cellar/gnu-sed/4.2.2/bin/gsed /usr/bin/sed. – Enrico Pirani Aug 17 '15 at 8:24
1

Since you asked for alternatives as well, here are some: try helm-google for general searches and sx or sos for stackexchange searches. sx uses native api. There are other specialized searches, such as helm-dash to search documentation for over 150 APIs. Search for engine or search to a list of packages on MELPA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.