reddit / emacs
Learning emacs without learning elisp?
[deleted] · 2022-04-23 18:39
Hi :)
I am focusing quite heavily on Node JS + svelte. I guess you could say I am a novice programmer. I generally build stuff for my self and my company.
I moved from Vim + Tmux to emacs today. I was not an advanced vim user (only 2 months.). But I moved because I wanted one environments that I could customize.
My question is this: ***do you believe learning elisp is vital to using emacs long term?***
akirakom · 2022-04-23 18:55
In the long term, yes. Learning elisp can mean various degrees (there are many great people, and I am like a novice), but even modest elisp skills will increase your productivity with Emacs.
Also note that JavaScript was inspired by lisp (not Emacs Lisp, but there are many things in common). If you are a JavaScript programmer, learning lisp won't be hard.
[deleted] · 2022-04-23 19:11
Interesting. So, to be clear, will i need to learn LISP or ELISP to get better with emacs?
xtifr · 2022-04-23 19:20
No, learning elisp is not *vital*. It can be *useful* for getting the most out of Emacs, but you can get a long way with blind cut-and-paste of various snippets that will be listed in the instructions for packages or found in wikis and blog posts and such . You will, almost inevitably, pick up *bits* of elisp (like how to set a variable), but many people get by just fine without *ever* learning much more than that.
akirakom · 2022-04-23 19:23
If it is only about getting better with Emacs, learning Emacs Lisp will be fine. Actually, I don't know what it will be like to starting out with Emacs Lisp, because I had read part of SICP when I started to use Emacs. Emacs Lisp is a LISP-2 with dynamic binding by default, while most modern programming languages are lexical binding. There are many great textbooks on Common Lisp and Clojure, and they are also great server-side languages, so it would be a great idea to study either of them (or even both).
BetterEventually · 2022-04-23 20:16
I find rudimentary elisp to be essential. elisp expertise isn't. Essential things include mostly higher-level concepts like key-bindings and mode-hooks. It can also be a learn-as-you-go experience over time rather than a prerequisite to initial use.
thetemp_ · 2022-04-23 21:15
Not at all. Careful though. It can be addictive.
00-11 · 2022-04-23 21:51
Is it *vital*? Only if you want to have *fun*. ;-)
(Oh I suppose *some* fun can be had without Lisp...)
00-11 · 2022-04-23 21:55
Elisp is Lisp. So are many other Lisps. You don't *need* to learn any of them.
But if you want to use Emacs then Elisp is the one to learn.
Think of Elisp as Lisp with a bunch of functions predefined for *manipulating editor things*, in particular buffers of text and windows where buffers can be displayed.
*Editing operations on text.* You won't get this in other Lisps. (You might get predefined operations on *strings*, but that's not the same thing.)
TeMPOraL_PL · 2022-04-23 22:10
> My question is this: do you believe learning elisp is vital to using emacs long term?
Vital to "just" using? No. Vital to getting the best value out of Emacs? Absolutely.
The way I see it: If what you're looking for is an editor/IDE for popular tech stacks which you can repaint here and there, Emacs isn't the best tool for the job - in the same sense that a PC with Linux isn't the optimal choice if all you want from it is watching Netflix.
What makes Emacs different from all other editors out there, is that it's first and foremost *a computing platform* that's designed to grow and evolve to fit you individually. Editing text is a fundamental I/O concept of Emacs, but it's only a part of the story. Emacs is (IMO) best seen as Emacs Lisp runtime, on which the editor is just the default code that runs. You get to explore, modify and add to it whatever you want; Emacs Lisp is the language in which you do it. Emacs wants you to do it. In most software, there's a clear separation between the program (owned and controlled by developers), the plugins (owned and controlled by third parties) and "userspace" (the part the user experiences). In Emacs, there's no such separation - you can inspect, modify or rewrite anything you want; Emacs goes out of the way to make it easy.
In other words: Emacs is designed so that, over time, you mold it into shape that you want, you make it solve problems you have - whether or not they're about editing text. This is its "unique selling point". The more you invest in it, the more you'll get out - there's no ceiling there. But you need to learn Elisp for it.
BunnyLushington · 2022-04-23 22:14
Vital? No. I know plenty of folks who are long time Emacs users and know no lisp at all.
That said, as 00-11 says, it sure is fun. I have two thoughts about that:
1. You can only customize so far, eventually there'll be some -- maybe trivial -- bit of functionality you'll want that requires a little hacking to get there. It's very satisfying.
2. You'll be a better programmer in general if you have some lisp under your belt. Emacs lisp is immediately useful and so is an obvious dialect to choose. (Though you run the risk of being sad that hacking lisp isn't your day job.)
The Emacs Lisp Intro info doc is well worth reading. (Or the [dead tree version](https://shop.fsf.org/books/signed-introduction-programming-emacs-lisp-3rd-edition) if you want to kick it old school.) For an introduction to Common Lisp (which is by no means required, and may even be contraindicated, for learning Emacs lisp) [Practical Common Lisp](https://gigamonkeys.com/book/) is free to read online.
TeMPOraL_PL · 2022-04-23 22:20
> will i need to learn LISP or ELISP to get better with emacs?
You don't need to learn Elisp to use Emacs as-is. You'll need it long-term, if you want to make Emacs work better for you, in a way that goes beyond basic configuration (which, worth noting, is already done in Elisp).
You don't need to become proficient in Elisp up front. Just remember that, whenever you'll think thoughts like "I wish Emacs behaved slightly differently here", or "I wish it could do this thing", or "I wish these operations were more streamlined", etc. - in Emacs, you can actually make these things happen. So whenever one of such things starts bugging you, you can attempt changing Emacs to suit your needs, and you'll learn some Elisp on the fly. The more you do it, the more you learn, the easier it becomes next time - until eventually, it becomes a second nature.
TeMPOraL_PL · 2022-04-23 22:23
Definitely. I found it to be quite a trap.
You find something that you wish was different. In other editors, you'll quickly check if there's a configuration option for it, or maybe a plugin. If there isn't, you'll just accept it and move on.
In Emacs, *you know you can* change the thing to work the way you want. So it's incredibly easy for any annoyance or improvement idea to suddenly become a new side-project you find yourself working on.
LordOfSwines · 2022-04-23 22:38
>I wanted one environments that I could customize.
Yes.
char1zard4 · 2022-04-23 22:51
I’ve been using emacs for 3 years and am only getting more into learning elisp now. In the short term, you can mostly get by using references or example config files, at the very least you’ll eventually figure out the basics of calling modes, remapping keys, setting variables, and going to the documentation first when you want to modify something
kiki_lamb · 2022-04-23 23:06
Long term, if you want to genuinely customize things, yes, learning at least a little bit of elisp will become necessary. You don't need to master it, but without learning at least a bit, all you can really do to cusomize it is copy/paste chunks of elisp you find on the 'net.
Luckily, it's not a hard language to learn and the built-in documentation is excellent.
[deleted] · 2022-04-24 02:42
I just want to point out that the emacs community is the best one ive joined so far... these answers are massively helpful. Thank you all!
[deleted] · 2022-04-24 02:44
Thanks for the extensive answer.
I moved from Vim + Tmux to emacs so I can "create an environment that works for me" instead of stringing together third party tools.
Is there a book or resource on elisp that you recommend?
[deleted] · 2022-04-24 02:46
This might sound like a weird question but... because I run a business, im already time poor.
What would you say is the "return on investment" from going down this rabbit hole?
[deleted] · 2022-04-24 02:46
hahahahah! i love this.
[deleted] · 2022-04-24 02:49
Is there a free online resource for elisp that you think is good?
[deleted] · 2022-04-24 02:51
>copy/paste chunks of elisp you find on the 'net.
haha! this has been my last 24 hrs. Have no idea what it means but it works :D
thetemp_ · 2022-04-24 03:59
Do you mean the rabbit hole of Elisp, or the rabbit hole of Emacs?
If you mean Elisp, well that depends on your objectives I suppose. I don't think there's much of a market for "Full Stack Elisp Developers" (or whatever it would be called). On the other hand, maybe it could be a first step to learning a more commercially viable Lisp, like Clojure. I'm not a professional programmer, so I can't really say. But if you're looking to make money directly off of Elisp, I think there are very few people that do.
But if you're just talking about the ROI from learning Emacs, you don't need to invest nearly as much time. It might take a while to really get good at the keybindings and pick out the packages you like. But if you can resist diving into the hole, you don't have to.
In other words, abandon hope, all ye who enter here. ;-)
kiki_lamb · 2022-04-24 04:14
Only 24 hours?! That was me for about a decade, before I gave in and tried to learn elisp in earnest and started to customize emacs in ways I could never have imagined previously.
[deleted] · 2022-04-24 04:48
>customize emacs in ways I could never have imagined previously
Everything about this sentence sounds satisfying!
Do you have a good resource for picking up basic elisp?
[deleted] · 2022-04-24 04:51
Nice.
Yeah so im talking about the rabbit hole of learning elisp to make emacs "my space".
I also have no intention of becoming a professional programmer. Programming is more of a hobby for me. Mainly Nodejs + Svelte
SignSpice · 2022-04-24 06:28
Not original commenter, but here are some links I've found to be useful.
[https://github.com/chrisdone/elisp-guide](https://github.com/chrisdone/elisp-guide) (plus lots of links at the end of this article.)
[http://wiki.systemcrafters.net](http://wiki.systemcrafters.net)
[http://xahlee.info/emacs/index.html](http://xahlee.info/emacs/index.html)
kiki_lamb · 2022-04-24 07:03
> Do you have a good resource for picking up basic elisp?
The built in manual is really quite excellent. In emacs, hit 'M-x info <RET>' to launch the info browser and then hit 'C-s elisp <RET>' to locate the link to the 'Emacs Reference Manual' and browse it at your leisure.
For very specific questions, 'just Googling it' continues to be useful, but as far as learn-a-programming-language books go I've found the built-in manual to be quite good. Clear, to the point, fairly well organized, and neither too detailed nor not detailed enough.
Once you grasp the basics, and want to look up documentation for specific elisp functions, definitely become familiar with 'M-x describe-function' and bind it to a convenient key.
wargreymon_messatsu · 2022-04-24 08:03
There is no point in thinking how much you should learn on elisp, elisp isn't complex at all.
Lisp is very easy, it's the simplest computation model (lambdas) with the simplest data structure (list). If you never touch compsci, you also learn while learning lisp, there's nothing to lose.
madia_leva · 2022-04-24 09:29
It depends on how disciplined you are. If you have a great focus capacity you can automate away quite easily small annoyances quite easily, so you can be super efficient in the day to day. If you are easily distracted, though, you can end up wasting enormous amounts of time in things that look "very important" (they aren't) of just fun.
[deleted] · 2022-04-24 11:43
I totally got easily distracted when I first moved to vim. 2 months gone!
I immediately felt that emacs was gonna be 10x of an issue so I have pulled back for now. Im only gonna focus on org mode and writing. And then build from there.
BunnyLushington · 2022-04-24 15:23
[An Introduction to Programming in Emacs Lisp](https://www.gnu.org/software/emacs/manual/html_node/eintr/index.html)
(This content is also distributed with Emacs. `C-h i mEmacs Lisp Intro<ret>`)
AuroraDraco · 2022-04-24 21:05
No, you can use emacs as is. And due to it being a very well documented 40 year old program you can solve a lot of your problems by looking up the solution and copy pasting it.
However, one of the biggest values of emacs is the fact that its infinitely customizable through emacs lisp.
My recommendation is don't worry about learning elisp. You won't need it in the start but the more you move to the emacs ecosystem, the more you will want to try learning it. And once you start writing some code and get familiar with the language, then it's easy