reddit / emacs

New to emacs; will you hold my hand?

DryNick · 2022-09-02 09:30
So, I cannot afford to switch to emacs for my day job (full-stack dev) and take the productivity hit, but I would like to give this emacs thingy a try for fun and start learning. Eventually I want to try to use it for coding (with new for me stuff like lisp and clojure or even with my current stack). So is there some resource online where I can explore 'cool' things to try in emacs? Specifically: 1. are there any 'packages' that I must have, that promote learning the commands and key bindings and exploring? e.g. autocomplete, suggestions, recovering from errors, docs etc. 2. any pointers on how to do FS navigation in emacs? any must-have packages to help with that 3. any pointers on how to do theming? Ideally, to just use some nice theme, with good defaults, not looking for customization at this point. (watched some youtube videos where orgmode looked so much better than mine) 4. is theming done per major/minor mode or based on packages or something else? 5. any pointers on getting started with org-mode? I am going through [orgmode.org](https://orgmode.org) rn and got somewhat familiar with the syntax. I am trying to evaluate it and I don't see the value yet. do i need any plugins for it? 6. I am confused with the package managers and the options you have and how to import. Is there some rule of thumb I can follow that can help me simplify adding packages? I don't need 'options' right now, I need a 'do it this way, it gets you to 90%' 7. I was watching some videos and saw this [https://github.com/daviwil/dotfiles/blob/master/Emacs.org](https://github.com/daviwil/dotfiles/blob/master/Emacs.org), which is *HUUUGE*. Is there some other resource that I can just start with one piece/package at a time and keep adding more slowly? Sorry if this was posted before (it must have, I guess, but not recently), but I am after some specific things. I need someone to take me by the hand cause this thing is deep and wide and I feel lost. Also apologies for the long post. ANY feedback is much appreciated! UPDATE (8 days later): A big thank you to everyone down in the comments. I still feel lost but it is much better, I can kinda find my way now. I don't want to keep adding more questions here to not stray too much from the initial premise. So, here is what I tried and where I am now (any new questions will be posted separately). \- I installed spacemacs first: I loved how it groups commands (e.g all delete commands end with a d). Also, got a nice theme and got to play with toggling vim and messing around with it. After 3 days I realized spacemacs doesn't help me learn mainly because most tutorials are for gnu emacs. \- then I deleted spacemacs and my .emacs.d and started adding packages one by one. Somehow it worked and I managed to install several packages successfully (stating with vertico and which-key) either via package-install or via init.el and did some minor customizations too. \- then I practiced by using an org-mode file for a few days, and got bored with seeing a dummy todo list I created :) \- I installed lsp client and lsp for clojure and clojure and lein. and all of these actually work somehow... still can't believe it. Been playing with a newly generated reframe project. \- in the meantime I have been reading the book mastering-emacs and the docs inside emacs (C-h i). Being on gnu emacs make it so much easier to learn new stuff. I will keep going with the book on the side and trying out every command that is mentioned. This will take some time, but at least after going through all of the above I can actually do some basic stuff and it is fun. Again, thank you all!
IceOleg · 2022-09-02 09:44
Are you familiar with vim style editing? If so, you could give Doom Emacs or Spacemacs a try. I'm not familiar with Spacemacs, but Doom got me up to speed almost instantly. Comes with sensible defaults and a good package selection, so all the functionality you would probably build up is there from the start. I have written maybe 20 lines of configuration in total, I think that speaks for the quality of the default configuration.
grimman · 2022-09-02 10:10
https://emacs.amodernist.com/ That might be a decent place to start config wise. 1. There's a built in tutorial for keys etc. It will only take you so far though. Repetition, ultimately, is key, even if it isn't too smooth when you're starting out. 2. I personally just use the standard visit file command, and switch with the regular buffer switching command (bound to C-x b by default, I think). 3. The link I provided should get you to the starting point. ;) Then it's a matter of messing around in *M-x customize* (that will probably take some getting used to). 4. I haven't bothered even looking into it, so I'll refrain from providing useless thoughts here. 5. I started with a goal in mind. Without a goal, you have no requirements, and thus no need to do anything. So set a goal for yourself, learn the things you need to in order to accomplish it. Look around a little, see what's possible, and potentially revise your goal(s) and start anew / improve on your current implementation. I started out just taking simple notes, and ended up writing my thesis in org-mode. 6. *M-x package-list-packages* (I believe; I'm afk so take my commands with a pinch of salt). Works fine it me. I have melpa added as well, for additional packages, but that's a repo and not a manager. 7. I suppose I can just refer back to the link at the start of this comment. 🙂 You are right though... this is not a small undertaking, but you *can* start small!
DryNick · 2022-09-02 10:17
I am just a little familiar with vim style, but I don't have any knowledge that I can capitalize on. If the defaults are so good I will give it a try, maybe it is worth it. thanks!
DryNick · 2022-09-02 10:31
This modernist generator is perfect, as I can re-generate as many times as I want and test stuff and start getting an understanding on the init.el file too. Thank you so much! 6. your command works fine ;)
electricRGB · 2022-09-02 11:33
I'd strongly recommend Spacemacs. I'd also strongly suggest to have small goals in mind. Use emacs to edit some files, and get comfortable with that. Then bring magit into your workflow. Etc. Trying to learn Emacs as a whole from the get go is.... painful and frustrating. What do you need org mode for atm? Nothing. Get familiar with working with buffers, Emacs (or Spacemacs) commands, etc. THe rest will come.
alcanost · 2022-09-02 12:09
IMHO, there is one must-have package for every beginner (and not so beginner): [which-key](https://github.com/justbur/emacs-which-key). Whenever you type part of a key chord, it will display you all of the possible following sequences. It is excellent to both help you remember shortcuts and discover new functions in emacs.
IceOleg · 2022-09-02 13:17
Looks like you can use Doom without evil mode (vim style modal editing), with some small caveats. Could be worth a shot if modal editing isn't right for you. - https://github.com/doomemacs/doomemacs/blob/develop/modules/editor/evil/README.org#removing-evil-mode - https://github.com/doomemacs/doomemacs/issues/2240 Happy hacking!
FOSSbflakes · 2022-09-02 16:25
My advice is: - with gnu emacs at least, steal someone else's configuration and read through it. Learn what a package does and decide to keep or delete it. This can take a while, but it really exposes you to a lot of possibilities without a lot of troubleshooting ( so long as you are very careful about editing and mind your parentheses) - Start using it for a daily journal and Todo list. Even if it's just a text file. This will get you comfortable manipulating text in the program, and open up org-mode and org-agenda. - keep playing with your settings and rely on it more for general writing/editing. Eventually you'll feel how much easier it is to do certain things in emacs, and get annoyed by editing anywhere else— that's when you'll be ready to start bringing your work into it.
thetemp_ · 2022-09-02 17:11
*One*: No, not that you *must* have. But there are many optional ones. Which-key is nice, but you can also just use the help-key (C-h by default) to view bindings under a prefix you've just typed. See also, [Why Emacs itself is my "favorite Emacs package"](https://protesilaos.com/codelog/2020-10-21-emacs-favourite-package/). Packages can be helpful and sometimes necessary for particular things. But Emacs itself comes with a huge array of features, in particular, the ability to instantly get information about a binding, function, or variable, or to easily locate relevant documentation. The Emacs manual is extremely useful here. You needn't be intimidated by its size. About half of it describes "Advanced Features", which you may or may not be interested in. You can, of course, ignore those. *Two*: you can use C-x C-f. Or you can use dired, C-x d, to browse for files you want to open. If you have a version-controlled file open, you can use C-x p f to limit the completion results to files within the same project root. *Three*: On the menu-bar, go to Options -> Customize Emacs -> Custom Themes. If you have Emacs 28.1, the modus-themes will be built-in (though you can get a more recent version of them from `list-packages`). If you hunger for more themes, the ef-themes package is worth installing. Also doom-themes comes with a really long list of them. And if even that's not enough for you, just go back to list-packages and do "C-s theme RET" and keep hitting C-s till you find something you like. Other eye candy customizations you might be interested in are doom-modeline, moody, nano-theme and dashboard. *Four*: You can define your own, but there are many predefined packages available for setting up colors, fonts, and other elements in an aesthetically pleasing way. In particular, the modus-themes seem to have put in the most attention to detail, so that things just look right, and they come with many options for fine tuning the look. But they are high contrast and comply with standards for folks who may be color-blind, so if that's not your cup of tea, there are many others you can try out. *Five*: Org-mode is a lot of different things, a markup language which can be exported to a hundred different formats, a personal organization system, and more. I think most people find the greatest value when they use it for organizing their life. It's a complex topic, but the best guidance I've seen for getting started is the [Using Org-Mode Features](https://karl-voit.at/2019/09/25/using-orgmode/) series by u/publicvoit. *Six*: Using the built-in package.el (M-x list-packages RET) gets you 90% there. A lot of the time, just installing a package from there is all you need to do. Sometimes, you will need to decide on and set up some keybindings. For that, you can usually find a suggested configuration snippet on the project's web page, which you can just copy into your init.el file. Most other package options can typically be set without even opening the init.el file. Doing "M-x customize-package RET \[name of the package\] RET" will usually bring you to a list of the options for that package. A lot of projects provide instructions on setting things up using the use-package configuration manager. So much so that it might confuse you into thinking certain things are needed that aren't. The purpose of use-package is to assist with organizing your config and doing complicated things like setting up autoloads and deferred loading of packages. But most good packages set up autoloading for you. You said you don't need options, but use-package is an option. I don't use it personally, but there are a lot of people who do. *Seven*: Uh, you mean like building your own config and learning as you go? I guess that's a resource in itself. Certainly the Emacs manual is a resource. You might also find the "Emacs Lisp Intro" manual a good place to start for getting an idea how elisp works. There's also the [Crafted Emacs](https://github.com/SystemCrafters/crafted-emacs) (formerly "Rational Emacs") crowd-sourced config. I haven't looked too deeply at it, but its aim is to provide a "sensible base configuration." As far as specific packages, I'm a big fan of the vertico, consult, marginalia, embark combo. IMHO, setting those up will give you the most bang for your effort, especially when getting started. (And you asked about file system navigation. Consult extends the find-file command so that you get a preview of the selected file before you open it, which is nice.) Good luck, and have fun!
WingFat92 · 2022-09-02 17:14
I use the out the box file explorer. I learned the basic controls from the lessons on the startup screen, I forget how they call it but it’s right there when you open emacs for the first time. Then I added evil mode (vim controls). I don’t go crazy on packages right now but I like the dashboard package to have a nice looking customizable start page. I also like to have org-bullets. You can also setup lsp pretty easily, but I’m not a big fan of that stuff. You gotta first set up melpa and do package-refresh-contents, then installing packages is as simple as alt+x, type in package-install, then the name of the package. My first attempt with emacs was doom emacs, but at some point I decided to go vanilla gnu emacs and I’ve had some good fun making my own config. It’s much more satisfying in my opinion.
DryNick · 2022-09-02 17:26
Thank you so much for all the info. You rock! Well everyone here rocks really, got great suggestions so far.
weevyl · 2022-09-02 17:30
I will stress the start small approach. Use emacs for one thing, then add something else to your repertoire, rinse and repeat. Eventually you will come to the realization that emacs is a programming environment and you can pretty much do anything you want with it. The path I followed was: 1. text editor : papers, documentation, config files, etc 2. eshell: use the emac shell (or any other shell) inside Emacs itself 3. org-mode for task management. 4. org-mode for note taking and document writing 5. magit package for dealing with git 6. ... It took me several years to get to this point (I spent way too many years using emacs only for 1 & 2), but then it kind of exploded. Now my thought pattern is to work inside emacs and every time I need to leave it ask myself if I could do that from inside emacs, then if I should do it from inside emacs. If the answer to both questions is yes, then a quick Google search gets me started on a new path.
DryNick · 2022-09-02 17:41
This is good advice. Thanks. I will focus on orgmode journal and Todo and later use magit to push to my GitHub account.
DryNick · 2022-09-02 17:50
Gnu emacs is like the OG emacs right? So not spacemacs, doom emacs or any other flavor. For Chery picking the packages myself, should I be worried if one package is incompatible with some other package? E.g. sharing key binding or throwing errors? Yes I think I need to focus on simple editing of files for now.
DryNick · 2022-09-02 18:02
After some suggestions here earlier today I tried spacemacs and I liked the experience but I realized that due to my other habits (I use home row mods and colemak-dh on my keyboard) going for vim style is rather uncomfortable due to the hjkl navigation while the default Ctrl based is much easier due to the home row mods. Maybe I try vim key bindings a bit later again. I agree that it sounds more fun to make your own config and maybe now that I got so many good suggestion I can piece it together.
[deleted] · 2022-09-02 18:06
[deleted]
DryNick · 2022-09-02 18:07
Tried spacemacs after your suggestion today. Cool stuff but I think I need to try it without evil mode. Do you know perhaps how I can reset it and re-run the configuration? It had an option to not use evil mode.
WingFat92 · 2022-09-02 18:49
So funny enough, I’ve been using vim for a couple years now and rarely use hjkl to move around. There’s lots of different ways to move in vim. But it takes some time to figure it out. Another general emacs tip I have, is if you can, remap your caps lock key to control, that makes the regular emacs commands a lot easier.
ambirdsall · 2022-09-02 19:20
GNU emacs is the standard/official emacs build; it's the elisp interpreter and environment. Doom/spacemacs/prelude/etc are curated/preconfigured sets of elisp libraries. An analogy would be another language with multiple implementations and frameworks. You can run an express.js server (corresponding to doom et al) on node.js or deno or bun (corresponding to GNU emacs, aquamacs, emacs-mac, XEmacs once upon a time, etc). Similarly, you can run the rails framework on MRI ruby, jruby, etc.
FOSSbflakes · 2022-09-02 19:54
Since ambirdsall got the other point covered, I'll comment on package management issues. In my time tinkering I've found that since many packages operate as discreet modes, it is very rare to run into major conflicts. The nice thing with using another person's init though is that it is opinionated— they chose between packages with similar functions already so conflicts are minimal. It is also usually clear when one package is required by another, but removing things in small batches is recommended :)
hkjels · 2022-09-02 19:56
I agree! Should be included in Emacs if you ask me
electricRGB · 2022-09-02 22:30
go to your spacemacs config (SPC f e d) and look for the option that turns off evil mode. :)
DryNick · 2022-09-03 05:57
w.r.t I have been using home row mods on my custom mechanical keyboard, so all mods are very easy to access, (i don't even have a caps lock key on the usual location) In any case, this is a nice write-up about it, maybe it helps someone here struggling with emacs pinky. [https://precondition.github.io/home-row-mods](https://precondition.github.io/home-row-mods)
DryNick · 2022-09-03 06:02
Got it, thanks. This stuff are really cool :D (although I am so scared when editing files from within emacs)
electricRGB · 2022-09-03 15:00
Make a copy of the folder that you're experimenting on. If you mess stuff up.... meh. Learning experience. :)
RandomStuff3829 · 2022-09-03 15:54
Absolutely a good call. I wish I'd known about this one when I first started using emacs a few years ago
FOSSbflakes · 2022-09-03 16:24
I just ran into this tool you may find useful if you go with GNU Emacs: [Emacs configuration generator](https://emacs.amodernist.com/). I still think a reference file is helpful for learning, but this helps change more basic settings and packages without sorting out lisp code.
ResourceNo6665 · 2022-09-06 02:25
I found Org Mode impossible to learn until I found Rainer König's videos. You can download a zip file with all of them from here: http://angg.twu.net/eev-wconfig.html#learn-org http://angg.twu.net/eev-wconfig/README-rainer-koenig-playlist.html
DryNick · 2022-09-06 05:31
Got it, thanks 🙏
wolfjb · 2022-09-07 02:06
I would not necessarily recommend starter kits like spacemacs or doom or prelude initially. For the never done it before beginner, I'd recommend going through Mastering Emacs, (masteringemacs.org) which is a thorough, from scratch explanation of everything you need to know about Emacs. You can be very productive with it and "vanilla" Emacs. Once you have been through that, maybe circle back around and take a look at the starter kits like spacemacs, doom, or prelude. How they work and why will make more sense to you. If you really want to tinker with it consider Crafted Emacs (I am one of the maintainers). There is a lot of good advice in this thread, not taking anything away from that, just adding my 2cents. Hope you find it useful!
DryNick · 2022-09-07 06:38
I appreciate the feedback, and I have to say I am considering starting over now after playing around with spacemacs since I started this thread. I would also like to update this thread with my learnings/experience, but I don't know what is the best way? add a comment or edit the post? Working with spacemacs was helpful though because I got a taste of what is possible with some sensible defaults and now I can look into replicating the same features on "vanilla" emacs and get a better understanding of them. I totally agree that coming back to spacemacs or doom after that would make a lot of sense. Just to be sure, Crafted Emacs is this [https://github.com/SystemCrafters/crafted-emacs](https://github.com/SystemCrafters/crafted-emacs)? Even now that I have 5 days worth of friction (which I understand is nothing) with the subject I have to say that it is very intimidating to me because of the language used (I have just too many unknowns/uncertainties in every sentence I read) but also because of the mention of several other packages or concepts (e.g. the entire Principles section). This is not to say that something is wrong with Crafted Emacs, just that I am not ready for it. It seems to me that it is meant to be an alternative to spacemacs/doom etc by providing a different/modular way to customization. I will come around to it a bit later.
w0wt1p · 2022-09-07 06:48
I would second this. Start with vanilla emacs and learn the ropes for a while. Then add packages moderately, one at a time. It is always nice to know how to navigate emacs when something breaks your config, and all your usual addons no longer work :)
DryNick · 2022-09-07 07:20
just bought the book, btw. Thanks for the recommendation.
wolfjb · 2022-09-07 12:53
Yes, that is the correct link for Crafted Emacs. And yes it is targeted at someone who has at least a little experience with Emacs, especially those who like to tinker with their configuration. It may not (yet) be something you are interested in. After some time with Emacs, you may be more interested in it, just as the other starter kits will be more approachable for the same reason. Good luck with your journey, feel free to ping me here if you want, but questions to the community will yield good results as well. Update this post or start a new one, either way is fine.
AndreaSomePostfix · 2022-09-08 19:52
Good luck with your trying Emacs out! In case you want to chat one-to-one with a more expert user(s), you may find this initiative interesting: https://github.com/ag91/emacs-buddy
DryNick · 2022-09-10 16:27
this is nice, I think I will give it a try a bit later in 1-2 weeks.