Hacker News new | past | comments | ask | show | jobs | submit login

I use emacs all the time, but I don't really extend it. More recent editors are extensible via web tech such as javascript, which sadly often comes at the price of having an electron base. Javascript does have the advantage that you can console.log() everything and discover functions easily for a given object. I still don't know how to discover stuff when I need it in elisp except M-X apropos which often fails to find something useful.



M-x elisp-index-search casts a wider net the M-x apropos does (but relies on the Elisp manual's being installed).


Do you use something like `counsel` or `helm`? I personally use `helm` and have found `helm-apropos` to be a much better experience mainly due to fuzzy matching. I'm sure there is a counsel analog.

Out of curiosity, do you happen to have an example of a search you've tried that doesn't produce something useful?


Did not know about helm. I just installed it and I think that this alone might solve 75% of the problem, thanks!

As an example, let's say I'm new to elisp and I am wondering how to insert a character to a buffer. `apropos` "insert" just returns too much stuff. `heml-apropos` seems much better though, with a readable output. However, you still have to know that the function is named "insert", which you can spend lots of minutes on. In a Javascript parallel universe, there is a high probability that I would have done `console.log(buffer)` and I would have found the `buffer.appendChars()` method in seconds. You can quickly find what you can do with an object in Js/Python/PHP, but in elisp, I have yet to find.


> Did not know about helm. I just installed it and I think that this alone might solve 75% of the problem, thanks!

Helm has a lot of extensions, here are some popular ones: https://emacs-helm.github.io/helm/#helm-applications

> As an example, let's say I'm new to elisp and I am wondering how to insert a character to a buffer

You can use google as with any other software. If you search for 'elisp insert character' with google the first hit is the insertion section of the manual which tells you the functions:

https://www.gnu.org/software/emacs/manual/html_node/elisp/In...

As with any other software using google you can find things much more efficiently than with the builtin searching functions.


The fact that google is your goto method shows that the discoverability is poor. I could code in JS offline for hours if needed, because all the information is there in the objects, but I would hit a wall in 5 minutes with elisp because this "object oriented" concept and console.log(anyObject) simply do not exist.


I use google when coding JS code too, because completing functions of objects for discovery is useful only in the more trivial cases. For anything non trivial using google gives much quicker results than browsing any kind of documentation.

In case of Emacs I use the manual as a reference (looking up things which I already know about) and I use google for discovery of new elisp concepts.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: