sábado, 12 de noviembre de 2011

change emacs url-browser

When you click an url in emacs, it'll open a browser with that url. That's fine.

Problems arise when you have multiple browsers and they fight to be your preferred one. In a coworker's box, it tries to open konqueror (WTF?!).

One way to fix the issue is changing browse-url-browser-function.


(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "chromium-browser")


Not only that, but the nice thing would be that emacs reused a browser if you have one opened (firefox or chrome) and opened a new one (chrome) otherwise.

I've been messing a bit with proced.el to find out how to list external processes programmatically, but had no luck. If I find out how, I 'll modify this post with new info.

If you have related info, please, comment :)

Thanks to Davazp that pointed me to list-system-processes function, I just wrote the code to use an already opened browser to open a given url.



A good quickreference to look for function signature differences between elisp, scheme and cl is here. It helps quite a lot

1 comentario:

David dijo...

I think you are looking for LIST-PROCESSES. It is described in the Elisp manual. Also, you have LIST-SYSTEM-PROCESSES if you want to list all system processes.

I hope this helps!