reddit / emacs
What's the best way to learn Emacs?
SteveTheGreate · 2022-01-28 06:55
Before I start I just want to apologize if this is a "noob" question, I'm just trying to learn.
​
I've used Doom Emacs for a few months now, and from what I've seen, it is EXTREMELY powerful, so I \*want\* to use it. But here's the problem for me. Some other programs, like VS Code are less powerful, but far, far easier for beginners. For instance the wide array of tutorial videos on YouTube, the way you change keybindings, or the way you download extra packages.
I think that Emacs can be far more powerful than VS Code, provided you have the proper knowledge about how it works. A great example of this is dired, it's so good that for a while I used it as my main file-manager. What's the best way to go about learning Emacs though? Should I just stop using Doom Emacs, download GNU Emacs and learn that way?
Danrobi1 · 2022-01-28 07:02
> What's the best way to go about learning Emacs
Emacs vanilla could be a good way to start.
TheTratz · 2022-01-28 07:17
Look up System Crafters is YouTube
SteveTheGreate · 2022-01-28 07:31
Haha, as I read this message I had one his videos playing in another tab lol.
And happy cake day!
0x1bee · 2022-01-28 07:56
I would suggest you to learn some emacs lisp (very important), and always use the describe commands (describe-function, describe-key etc.)
pinacoelho · 2022-01-28 08:56
Install Emacs, M-x info, read the documentation (It’s good and complete), use it even when it would be easier to do task X on vi.
Build up your muscle memory.
Sndr666 · 2022-01-28 09:20
Came here to recommend just this.
He is the guy behind the Emacs From Scratch github, a constant source of inspiration.
chandaliergalaxy · 2022-01-28 09:50
Make a list of a few things you absolutely want to start using Emacs and commit yourself to it. You'll be looking up 'how to...' and once you become comfortable in a limited set of tasks, then start expanding into other ones.
agumonkey · 2022-01-28 10:06
Be warry of judging vscode, it sits on top of a browsers rendering engine with recent javascript, it's a lot of leverage (it uses a tons of resources) but having dom + css makes for very interesting user interface sometimes (emacs only has overlays IIRC)
I don't know the best way to learn emacs, one thing though is that I, and others, are still learning even after decades into it. even after somehow dilligent RTFM multiple times, and knowing various lisps. so my conclusion is:
**patiently**
now for pragmatic ideas:
- emacsrocks videos are short and brilliant demos of emacs features
- there are more recent people who made emacs tutorials
- there's emacsconf videos which were deeper and very inspiring (you get to see how other users operate and extend emacs)
- then there's reading elisp, extension code, people's configs, maybe even reading lisp books because lisp idioms are still a tiny bit peculiar even in 2020
seshna · 2022-01-28 10:23
Really awesome resource, I just wish they didn't go for an hour or more each. I understand it's streamed live, that's just a really long time for me
anaumann · 2022-01-28 10:44
I've only ever learned enough lisp to kind of understand what I'm typing into my .emacs :D
I think, I did most of my learning by just using emacs, on and off for a couple of years and at some point just accepting my fate and taking the plunge :)
It can be a bit overwhelming, some things are quite different, but in the end, I think I completed the emacs tutorial from the start screen once and after that just starting by using it as an editor and as needs arose, I had a look around if there's a package for that and installed and configured that and continued..
And that's still my main mode of operation in emacs.. just use it and if it falls short in some regard, look for a package that can change that :D
Ok, nowadays, I also go package shopping in the package manager every now and then to see if there's something that I find interesting.. I then install it, give it a spin and then decide to either keep or ditch it..
With this stumbling method of learning emacs, I made it far enough to read my mail in wanderlust and work in projectile/magit/lsp and since switching to MacOS at work, also use terminals a lot.. At work, I usually only have four open programs: Teams, Outlook, a browser and emacs.
I didn't quite get emacsclient to work as nicely as on Linux, but since I'm also using emacs for terminals, I usually never close it, so it's ok :)
loufer · 2022-01-28 12:55
Emacs has a very complete internal help system and tutorial that should be the first place to start, even before watching online videos which are often too high-level. Start with the tutorial by choosing "Tutorial" from the Help menu, or by typing "M-x tutorial" (alt-x then type "tutorial" and press enter) or "C-h t" (Control-h, then t). I actually recommend using the menu to start, since it is discoverable, and many of the possible functions. As you get better, you will drop it for keyboard shortcuts.
After that, you can read the info pages: "M-x info" then move the cursor to the Emacs heading, and press enter to jump into the emacs manual (or just click it if you are in a GUI version). There, there is a lot of good info, tips, and explanations, for example the section describing what you see on the screen.
Even if you are using Doom, the manuals will be relevant for most things. actually think Doom is a good idea, as it pre-loads a lot of very useful packages and makes some things friendlier and more discoverable even if it adds some complexity on top of a vanilla init. However, remember that Doom by default configures emacs to emulate Vim (a completely different editor!), so it doesn't use emacs keyboard shortcuts by default, and that can be confusing! I recommend disabling "evil-mode" by editing the doom init.el file and commenting out "evil", then doom will be very similar to vanilla emacs.
BobKoss · 2022-01-28 13:07
Let’s see how many down votes I can get.
There‘s nothing wrong with sticking with Doom Emacs.
stayclassytally · 2022-01-28 13:12
In my experience the best "Emacs content" is inside of Emacs already by means of the help system.
konrad1977 · 2022-01-28 13:39
I am also new to Emacs. I have been using it for just a few weeks. Watched the system from scratch series. Decided to ditch spacemacs in favor of my own config.
There is no shame in watching other users configs for smart solutions.
Hectosman · 2022-01-28 13:51
Prepare yourself for the process to take years. It's a love/hate relationship.
I think learning by doing is the best method.
thetemp_ · 2022-01-28 13:59
+1
I've learned more by looking through Doom Emacs's source code and other configs' and package's source code than anything else.
The Elisp manual is essential, but there's something about seeing an actual implementation that clears up ambiguities and makes things plain.
Frostmaine · 2022-01-28 14:21
Systemcrafters youtube and maybe take like an hour each day to experiment with a new feature. Just to build muscle memory and knowledge of all the tools at your disposal
mattaccount · 2022-01-28 14:23
I also learned emacs because I could tell I wanted to use it after trying Doom.
Best way was actually to learn vanilla emacs. I started by following along in the book 'mastering emacs'. It's a quick and easy read and you can follow along in emacs.
xwfwuerbt0o3z · 2022-01-28 14:30
A better starterkit for usability is Spacemacs. I don't think I would be an Emacs user without Spacemacs. Eventually, once you start customizing things Spacemacs will get in the way. At that point, just try vanilla Emacs and starting going to town.
ramin-honary-xc · 2022-01-28 14:44
I've been meaning to write a blog post about how you can quickly get started experimenting writing Emacs Lisp programs. But I want it to be a high-quality article with an accompanying YouTube video and just haven't got around to writing it yet.
#### Learn how to navigate the Emacs documentation:
- C-h f <function name> describes a function and gives you a link to the code that defines it. It is a fuzzy match with tab completion so you don't need to know the exact name, so you can search for functions that do stuff by keyword.
- C-h v <variable name> describes a global variable you can configure.
- C-h w <function> tells you if there is a key binding that you can use to call the function you typed
- C-h k <any key> tells you what function is called when you press a key binding. Great for writing macros.
#### Browse through the Emacs Lisp documentation.
- It is [available online](https://www.gnu.org/software/emacs/manual/html_node/elisp/index.html#SEC_Contents )
- But it is better to read it in Emacs Info mode. If it isn't installed, try to get it installed using whatever package manager your operating system provides.
#### Play around with writing your own code
Use the scratch buffer, and use the `C-M-x` key (or I think `<leader> d` in Doom normal mode), to evaluate a `(progn ...)` block of code:
(progn
(switch-to-buffer-other-window "*elisp-output*")
(erase-buffer) ;; This is a dangerous function, use it with care.
;; Now do whatever you want.
(insert "Hello, world!\n")
(insert (format "123 + 546 = %S\n" (+ 123 456)))
;; Prompt the user for input:
(let ((name (read-from-minibuffer "What is your name? ")))
(insert (format "Hello, %s, nice to meet you.\n" name)))
;; Build data structures, prompt the user:
(let*((colors
(apply #'vector
(split-string
"red orange yellow green blue indigo violet" " ")))
(num (read-minibuffer "Type any number: "))
(lucky (elt colors (% num (length colors)))))
(insert (format "Your lucky color of the day is %s.\n" lucky))
(insert (format "Your lucky number today is %i.\n\n" (1+ (random 100))))
(insert "-------------\n")
(insert "Other colors could have been:\n")
(mapc ; This is like a "foreach" loop
(lambda (color)
(insert (format "%s\n" color)))
colors))
;; Programatically find and replace text
(search-backward "Hello")
(replace-match "Goodbye")
(search-forward "nice to meet")
(replace-match "it was nice meeting")
;; Apply colors and styles (i.e. "faces") to text
(let ((line-start (move-beginning-of-line 1))
(line-end (move-end-of-line 1)))
(set-text-properties
line-start line-end
'(face (bold :foreground "blue")))))
SlowValue · 2022-01-28 14:52
Read the Book [Mastering Emacs](https://www.masteringemacs.org/book).
gzrrt · 2022-01-28 15:49
I started off in a similar way, but with Spacemacs. Not sure if it's the best approach for everyone, but I just tried to slowly build up and transition over to a new, custom config that replicated my spacemacs setup (and basically learned a lot of Emacs/elisp in the process). Trying to switch all at once would be really frustrating, I think
BobKoss · 2022-01-28 15:57
DistroTube on YouTube has a few videos on Doom and also vanilla emacs.
BobKoss · 2022-01-28 15:58
I learned a lot by watching System Crafters.
BobKoss · 2022-01-28 16:04
That’s how I got started. 20+ years of vim/vi and then I tried Spacemacs. Then I tried crafting my own vanilla emacs and decided that I would end up configuring it just like Spacemacs so didn’t see the point of that move. I decided to try doom and that’s where I am now and I love it.
spacepawn · 2022-01-28 16:19
Sure but most go very fast and superficial leaving you with a ton of questions, I guess his channel is a goldmine for those that really want to master emacs.
trhawes · 2022-01-28 16:26
You really could go either way. With Vanilla Emacs the menu and toolbar system can be very helpful to the uninitiated. What's more, is the list of available packages and package configuration work in a relatively user-friendly way. I would recommend the moment you see the value of using `straight.el` for package management and strictly using elisp for all package configuration, to either switch back to Dooom, or start using Doom as your reference for your own config.
Doom Emacs is actually better for the long haul because you have an idempotent configuration that is repeatable. It separates package installation from startup and configuration. All configuration is done through elisp. Yet this might be too challenging to the uninitiated.
Both paths are legitimate ways of learning Emacs. Regardless of which path, I highly recommend you learn org-mode. It will forever change the way you think about documentation forever. It also makes a great word processor (not WYSIWYG) inside of Emacs.
seshna · 2022-01-28 16:39
sheesh. easy on the salt there buddy - people have been really wanting to master emacs well before his youtube channel came out
BeetleB · 2022-01-28 16:48
Hard disagree. I was a power user for a decade before I learned Emacs lisp - it's definitely not needed (beyond basics like setting variables for your config).
aaronryder773 · 2022-01-28 17:07
[Mike Zamansky's playlist on emacs](https://www.youtube.com/playlist?list=PL9KxKa8NpFxIcNQa9js7dQQIHc81b0-Xg)
sedentarious · 2022-01-28 17:12
Totally agreed on doing the builtin tutorial, but to add, i suggest you try to force yourself to not use the arrow keys at all.
Its very painful for the first week, but keeping your fingers in emacs 'home' position is huge. Emacs is (at least partially) about efficiency and speed, so learn fast habits first. Be patient, i'm still getting faster after almost 15 years using it.
00-11 · 2022-01-28 17:18
Use it.
And start by learning the basics of how to ***ask Emacs***.
00-11 · 2022-01-28 17:19
This.
CookiShoos · 2022-01-28 17:33
I am a recent emacs fan and now a daily user. For me, I really liked Doom Emacs, but ran into some uses I wanted with Customize (which was turned off in Doom) and I decided I'd learn more about vanilla Emacs. I also use it on my work Windows machine, and wanted a faster startup time (it's very slow on Windows for me). What I recommend below was basically the best way to learn for me:
I recommend trying vanilla, then looking at Doom and what you use out of it (which-key, evil, etc..) and then start going to those projects Github pages and learning how to install each of them. After you get a small config going, you'll keep adding to it, and growing your own config. It'll be fast to startup, and might even drive you back to Doom, but this time you'll be equipped with more knowledge on how you want your Emacs to run, and how it works/allows customization.
Sethaman · 2022-01-28 17:36
It's a perfectly reasonable question haha. I started with https://www.youtube.com/watch?v=74zOY-vgkyw&list=PLEoMzSkcN8oPH1au7H6B7bBJ4ZO7BXjSZ
And did their entire custom config over a couple of weeks.
That got me "up to speed" using emacs and elisp.
Now I feel I can comfortably hop into doom or space and enjoy those preconfigs much more readily now that I have a sense of what's going on.
SteveTheGreate · 2022-01-28 17:45
I would just like to thank everyone for your friendly responses, all of which I appreciate very much.
When I first realized that there's a subreddit for Emacs I was worried it would have a somewhat "elitist" attitude, similar to the Arch Linux subreddit, but I've been pleasantly surprised to find that this is not the case, and all of you are very very friendly, thank you.
na85 · 2022-01-28 17:57
That's actually the worst way. The documentation may be complete but it's certainly not an easy read. Taking that route? You'll read all kinds of things without perspective on why you should care.
The better way to learn is to just start using it and every time you come up against a roadblock, read about how others have solved it.
jahkeup · 2022-01-28 18:00
I can't tell if you're joking, but seriously, maybe stick to Doom Emacs!
I've had success reintroducing coworkers who had a hard time giving Emacs a fair shot in their pasts - Doom is where I point these folks to try Emacs and they're pretty quick to "get" why we Emacsers love staying in our buffers all day.
After years of hand crafting configuration (both plain elisp as well as literate+tangled over the years), I've landed on using Doom with my own modules and by advising functions to make Doom Emacs work for me! The library it provides along with it's great sensible "defaults" makes it a no-brainer to recommend. Plus, the docs for modules make it straight forward to tweak the provided modules' config for newcomers.
Fwiw: a few of these folks tried spacemacs and found they really didn't like Emacs, they didn't feel the same about Doom Emacs. So, again, Doom Emacs is my go-to recommendation! If/when simpler configuration is wanted, well, you can always shed all of Doom Emacs and still come away with an idea of what and how to write your own `.emacs`
PanamanCreel · 2022-01-28 18:26
That's exactly how I started! I've been learning it by using it.
danderzei · 2022-01-28 18:38
I have written a series of articles for beginners you might like: https://lucidmanager.org/tags/emacs/
Also recommend reading the Emacs manual - very well written.
justsomerandomchris · 2022-01-28 18:40
Someone posted [this](https://www.reddit.com/r/emacs/comments/sdruyo/learn_emacs_by_asking_it_questions_oc/) a couple of days ago. It's a pretty short and spot-on answer to your exact question.
kevstev · 2022-01-28 19:49
Yeah- I have been using emacs for almost 20 years... mostly vanilla. I had no idea the things he showed were possible. I thought I was fancy by having bindings to kick off a build and deploy. This was really eye opening. This was also the first time I was ever compelled to give a youtuber money, its that good- at least compared to any other emacs resources out there.
TheTratz · 2022-01-28 19:54
Yep, David's pretty accessible and engaging. He responds to comments & suggestions, too. He seems to really care about what he does and most importantly has a sense of curiosity. Curiosity leads to new ideas/methods.
ftrx · 2022-01-28 20:17
For me have worked (very) well YouTube, thanks to channels like:
- Mike Zamansky :: https://cestlaz.github.io/stories/emacs/ (https://www.youtube.com/playlist?list=PL9KxKa8NpFxIcNQa9js7dQQIHc81b0-Xg)
- Stavrou Protesilaos :: https://www.youtube.com/playlist?list=PL8Bwba5vnQK14z96Gil86pLMDO2GnOhQ6
- Rainer König (mostly old, but still valid) :: https://www.youtube.com/playlist?list=PLVtKhBrRV_ZkPnBtt_TD1Cs9PJlU0IIdE
- System Crafters :: https://www.youtube.com/c/SystemCrafters/playlists
- Uncle Dave :: https://www.youtube.com/playlist?list=PLX2044Ew-UVVv31a0-Qn3dA6Sd_-NyA1n and https://www.youtube.com/playlist?list=PLX2044Ew-UVV0CNIrlst0MkKbu85O7_QT
- Emacs-Elements (unstructured, short, but useful cherry-picked per topic) :: https://www.youtube.com/channel/UCe5excZqMeG1CIW-YhMTCEQ/videos
- Tony Aldon (as Emacs-Elements, shorter) :: https://www.youtube.com/channel/UCQCrbWOFRmFYqoeou0Qv3Kg/videos
And many others. Beside *channels* you might just look for specific topics and likely you find some single, interesting video tutorials. Some nice both to showcase and learn: Literate DevOps - Howard Abrams https://youtu.be/dljNabciEGg and even better https://youtu.be/B6jfrrwR10k topic-specific https://youtu.be/lCc3UoQku-E or https://youtu.be/5ViUBaarsbw and countless others.
Why? Because they show, not only describe, so you can decide seeing if it's interesting to learn or not, the "lesson" and the "wow effect" plus "visual (pre)learning" are IME/IMO the most effective keys.
For the rest the key is doing. You start using Emacs, you use it and you are stuck somewhere, you search how to solve, find it (e.g. also for countless public users config, look GitHub/sr.ht etc), implement it and have learnt something (it's more than mere copypasting in general). It takes time, that's normal. Emacs is an operating environment lacking a Lisp Machine underneath, you do not learn an editor in the modern sense, you learn a classic Desktop operating system from an era where desktop == computing and the human not the service is the center of the computing world.
In VS Code you learn how to use an app, in Emacs how to interact with a computer, what you've learned for VS code will go to trash at a certain point in time in future, you can't improve, you can't go further, you are just "an user" of "a tool", like a human arm of a machine. In Emacs what you've learned last for lifetime, Emacs is not a tool, is a desktop and is a personal one, any Emacs is different than any other Emacs because is a digital extension of the human mind, and any human is closely similar to any other, similar, but not equal, sharing such differences as an endless process provoke evolution, like in the physical world.
The above might sound philosophical or exaggerated but that was and is my experience. I'm an old-school unix-er who thought that unix model was a landmark success in human-computer interaction, the base of modern computing, in few years of Emacs i have learned that no, unix was a poor man pale and crappy solution to sell low cost crap instead of real systems (hw and sw), and discover in Emacs the last living vestige of them. After less than an year my decade old hyper-curated home taxonomy, witch was my digital life at a whole, get completely dropped, switched to Emacs/org-mode/org-attach and after org-roam. I do have forgot a bit to deal with files, to traverse directory structure, to care about them etc. So yes, sound exaggerated and a past edition of me can't be convinced by such words without seeing Emacs in action ad learn/doing myself. But it's a complete different beast absolutely worth a BIG investment diluted in a variable length time span. My advise if not trying to "learn Emacs then after use it" but just play with it a bit at a time, learning can't happen like modern tools.
kingpatzer · 2022-01-28 20:21
Honestly, it depends on what you mean by "learn Emacs."
Emacs is as deep and wide as an ocean.
Personally, I think the "best" way is to do this -- keep multiple \~/.emacs.d directories.
Use Doom for when you want to be doing "real" work.
Use you're on hand-rolled config for when you want to be learning.
Learn one thing at a time.
How to learn? First, commit to using a mode in Emacs to do that thing. For example, if you want to learn Dired, then decide you'll not do any file management using any other tool, at all. Period.
Second, write extensions to modes. If you really want to learn how to use Dired, for example, write code that extends Dired. You can't do that if you don't know how Dired works.
Don't move on to something else until you really feel like you know the thing you're learning.
For larger things like "Org," learn the sub-components, not the whole thing. For example, focus on just the outline manipulation aspect, or the table handling, or some small aspect of what the whole mode does. Break it down into logical chunks and be prepared to take time. You won't learn a mode that took a huge team a decade to write in a few days.
ftrx · 2022-01-28 20:23
Personally (not anymore a newcomer, but still hyper young in Emacs usage terms) I consider GNU Info the best documentation system in UI terms, hyper-accessible, always aside etc. UNFORTUNATELY it's horrific markup perhaps might be the cause, the informative content inside such excellent system is all but excellent... For things like variable/functions/... docs works well enough, for single package docs is mostly meh, for general documentation is horrific...
But try it first and learn the paradigm of integrated documentation is not only nice to have, is a solution to learn doing thing locally, try things locally *before* look for something on-line. Learn such system later might be negative due to it's "bad" information content, pushing the user to on-line only tools that are far less integrated, available and usable/trustable than local docs. Also in the meantime a small storm of questions on integrated docs might trigger positive effect in term of content, pushing single package devs, core devs etc to think that's about time to update docs not only elisp and not only blog posts on that...
jwd630 · 2022-01-28 20:23
The way I finally learned Emacs, decades ago, was through immersion. Pick some project, a personal one on your own time would be best, and use ***only*** Emacs to complete that project. Force yourself not to fall back on any of the other tools that would let you complete aspects more quickly *now*, because you don't yet know the Emacs equivalent. Web search your way to solutions to accomplish those tasks in Emacs instead. Use Emacs' extensive built-in help too but now a days I suspect the web will get you to the pluses and minus of various solutions faster. Don't throw away your other tools and IDEs either, but learning the ways that vanilla Emacs can help in general will serve you well for your entire career.
cretan_bull · 2022-01-28 21:24
I second all this advice. There's also two other ways of interacting with elisp that have their place:
- `M-x ielm`, which gives you a REPL. This is great for learning the language and figuring out how to do something incrementally.
- `M-:` or `M-x eval-expression`, which allows you to run a lisp expression in the minibuffer. I find it especially handy if I want to try out some change to a local variable in a buffer, but it has many uses.
Also, `M-x shortdoc-display-group` is very useful for giving a quick overview of the functions used for interacting with emacs data structures.
osugisakae · 2022-01-28 23:00
Came here to say this. I have been using Emacs for over 20 years and learned several things in Mastering Emacs that I now use every day.
art_else · 2022-01-28 23:21
As a starter I can highly recommend the [Pragmatic Emacs](http://pragmaticemacs.com/) website. A pity the author stopped adding to a great collection of cookbook like simple tricks and configs. Be sure to check the [index](http://pragmaticemacs.com/all-posts/) of the site!
Scriptod · 2022-01-29 04:39
Idk if it helps, but [here](https://www.reddit.com/r/emacs/comments/raebf5/comment/hnr53wk/) ya go
SlowValue · 2022-01-29 20:17
(sort of) same here. :)
bitwize · 2022-01-29 23:23
Doom Emacs _is_ GNU Emacs. Doom is Emacs Lisp code that provides different keymappings and other enhancements. You _can_ go back to "vanilla Emacs". If you do, I recommend starting with C-h t to start the Emacs Tutorial to show you the ropes of the basics. Then, once you're comfortable doing basic editing stuff, the whole C-h series of commands comes in handy. C-h k lets you press a key and see what it's bound to. C-h w shows you which key invokes a particular function. C-h f lets you look up function documentation and C-h v lets you look up variable documentation.
Emacs will gladly show you anything you might want to know about how to use it. All you have to do is ask!
AegisCZ · 2022-01-30 21:38
rtfm rtfm rtfm rtfm c: