4 ms·
I wish there was a solid competitor to Emacs, but the thing that keeps me coming back is that I have the time to tinker with it a lot and the community is great
by _huayra_ 5y ago
I wish there was a solid competitor to Emacs, but the thing that keeps me coming back is that I have the time to tinker with it a lot and the community is great. Vim and Vscode have some valiant maintainers of projects, but from what I've seen it's nothing compared to the big Emacs projects, especially Org mode for which I haven't found a reasonable alternative in Vscode.
However, I don't like fact that most of the editor is a single event loop. This is not a big deal most of the time, but if, say, you're using magit on a large repo and a command finishes and the buffer must refresh, you're gonna wait there for several seconds being unable to do anything else (no switching to other buffers, much less continuing to use Magit while it is updated asynchronously).
(btw if I'm wrong about this, for the long of god enlighten me!)
elisp is a bit quirky and dated, and very hard to figure out incrementally. I am still at the place of "copy-paste from other smart people's configs" because I have not really sunk the time to gain a deep understanding of the language; the lack of types and a somewhat tricky (although functional) debugger prevents many of the things about the language from being elucidated, especially because the powerful macros.
However, I don't really know what an effective alternative would be besides perhaps Javascript (which I'm also not a fan of) or Python.
- rich_sasha 5y agoI have found it very difficult to pickup elisp, but the latest concerted effort worked. I found learning it to be a very fulfilling experience.
- _huayra_ 5y agoWas there any resource that help you get over the understanding hurdle?
- alex_smart 5y agoEmacs comes with everything you need to learn emacs-lisp. Take some time to familiarize yourself with the help facilities* and then jump over to info, start with "Emacs Lisp Intro" and eventually continue with "Emacs" and "Emacs Lisp". * At the very least, familiarize yourself with "C-h f (describe-function)", "C-h v (describe-variable)" and how to read info pages. To view what other help facilities emacs provides glance over "C-h ? (help-for-help)".
- _huayra_ 5y agoI've been able to get by so far with the inbuilt doc and reading the code for installed packages, etc. I can read other people's config and reasonably copy needed chunks, debug issues (I've submitted PRs to magit, org mode, and Doom to fix various issues). The problem is that the last little bit to get to a fluent understanding has been elusive, e.g. how some of the macro-heavy features work (e.g. the common lisp stuff), or how to handle async code (e.g. how magit runs a command, and then refreshes the buffer after it completes). I have this fluency to some degree for the languages I'm paid to produce code in (e.g. C++, to some extent; Stroustrip himself said his knowledge of C++ was "7 out of 10 on a good day" or something like that), but these last few advanced features have been a tough nut to crack in elisp.
- alex_smart 5y agoThe good thing is that the source is always right there and you can read it or set breakpoints and step through it to see how things work. > how to handle async code (e.g. how magit runs a command, and then refreshes the buffer after it completes) Emacs's primary mechanism for async code is: spawning an asynchronous process and interacting with them using a process filter/sentinel. This allows you to do things like detect when that process has emitted a certain output or signal and run some code based on that. For example, magit user the process-sentinel for a pull/fetch command to call (magit-refresh) to refresh the buffer. (How to fish: I guessed that magit-refresh was probably the function refreshing the buffers, set a breakpoint in it, and voila now I have the entire stackframe.) Relevant pages from info: "(elisp) Filter Functions", "(elisp) Sentinels".
- b3morales 5y agoAs someone who's very comfortable writing Elisp and reading the Emacs documentation, I must disagree. Emacs documentation is comprehensive and it is very clearly written, some of the best I've seen -- but as reference documentation. It is still somewhat short on examples/practical how-tos. You need to be comfortable with the system and have some idea what you're looking for. A great example is [`display-buffer-alist` actions][0]. Thoroughly described, with appropriate cross-linking, but still kinda [hard to really grok without resort to existing code][1]. [0]:https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Display-Action-Alists.html https://www.gnu.org/software/emacs/manual/html_node/elisp/Bu... [1]:https://www.reddit.com/r/emacs/comments/cpdr6m/any_additional_docstutorials_on_displaybuffer_and/ https://www.reddit.com/r/emacs/comments/cpdr6m/any_additiona...
- mdm12 5y agoAn Introduction to Programming in Emacs Lisp[0] is how I've been learning it recently. [0]https://www.gnu.org/software/emacs/manual/eintr.html https://www.gnu.org/software/emacs/manual/eintr.html
- Jtsummers 5y agoFor what it's worth, Emacs Lisp clicked for me properly when I learned Common Lisp and then threw out what I knew and treated it as a cousin language (which it is) with some different design elements and read the documentation. However, learning two languages to learn one is a big ask, I just had no choice on CL thanks to a college course (and have no regrets, easily my favorite language to program in even if I never get to use it professionally; most of my classmates would vigorously disagree).