reddit / emacs

What's the most important tip for beginners in Emacs?

[deleted] · 2022-07-13 13:45
[removed]
[deleted] · 2022-07-13 13:48
do the tutorial and read the emacs and elisp info pages
deaddyfreddy · 2022-07-13 13:50
> because I've been using it for a while but it still feels unnatural for me what does feel unnatural? The most important tip is to understand what annoys you and find an extension to fix the issue (most likely it already exists).
qZeta · 2022-07-13 14:05
Given that you ask for the most important tip: do not disable the menubar. It provides a lot of discoverable (and context dependent) functions, including the help system.
anaumann · 2022-07-13 14:06
I'd say the most important thing is to stay with it for a while and not trying to fight it. Emacs is old, it even predates most graphical user interfaces, so some things are bound to be quirky.. But as an ecosystem, it does make sense and the more you get used to it, the more you're going to enjoy it :) Personally, I've played around a lot with running random stuff by pressing M-x and tab-completing lisp functions, just to see what happens :)
Hagge5 · 2022-07-13 14:13
You should know that emacs primary strength isn't that it's a good text editor out of the box. It's that it can be modified and hacked to do almost anything you want with ease, relative to other programs like it. Gnu Emacs, out of the box, won't feel *great*, imo. Look through the tutorials, learn to do some basic changes with Elisp. Then, try to figure out what features that you want, and install packages or hack your own solution for that. For example, with completion through tab: Emacs already lets you complete prompts in completing-read using tab, which is what happens when emacs asks you to choose one option from several in the mini buffer, e.g. when running M-x to choose an arbitrary command to run. But what you can also do is to install packages like helm or Vertico to get the options in completing-read shown to you in a list, and you gradually type what you want to narrow down the options. Ido is another option, a built-in that does something similar. When modifying text, there is the built in completion-at-point function which you can bind to tab to complete whatever you're writing. For this, you can install e.g. company to get a drop down of completions as you're typing. And there's many more options for solving just these simple problems. If you specify exactly what is feeling unnatural, people can point you to a solution (or you can search for it on google or M-x package-list-packages) but you need to be specific. What's bugging you?
AlanYx · 2022-07-13 14:29
I agree with this. I find the menu is often the most accessible introduction to any new mode you're learning. Then eventually you get tired of going through the menus and decide to learn what keystrokes do the same thing, and you're off to the races.
BetterEventually · 2022-07-13 14:35
Echoing what others have said, emacs' main feature is that if something, invariably, doesn't feel right, you can change it. Unfortunately, however, this leads to a lifetime of (possibly obsessive, for some of us) emacs tinkering.
astro · 2022-07-13 14:37
Learn the basic help commands, like \`C-h i\`, \`C-h k\`, \`C-h m\`, etc. There is so much help built in, the sooner you learn how to find it, the sooner you can learn everything else.
mickeyp · 2022-07-13 14:47
> You should know that emacs primary strength isn't that it's a good text editor out of the box. It's that it can be modified and hacked to do almost anything you want with ease, relative to other programs like it. Emacs is an excellent text editor out of the box. Sure, you should customize it, and it's amazing at that also; but the fundamentals are there and work well. For both movement and editing.
snubbyJspreaker · 2022-07-13 14:47
100%!
Linuxllc · 2022-07-13 14:57
Just learn how to use it. Just learn the basics. Two websites did the trick for me. http://xahlee.info/emacs/emacs/emacs_basics.html Love at the end of this webpage. Congratulations! You are now a Emacs Master! https://www.youtube.com/user/jekor/videos I even did a video about it a long time ago. https://www.youtube.com/watch?v=3x0U1-X9TQY
gravygrowinggreen · 2022-07-13 15:00
It's hard to figure out the most important tip, but the two things that have helped me the most were this: First, don't let perfection be the enemy of good. Starting emacs with a distribution, even if that distribution isn't perfect, is fine, particularly if the default state of Emacs proves to be a barrier to your productivity (as it did mine. Nothing wrong with Emacs default state for those who know how to use it, but I come from a background of microsoft word and using the mouse to do everything short of putting letters on the screen, for instance). My ability and knowledge with emacs started rapidly increasing once I said to myself "just reinstall Doom, it was intuitive enough, and you can later start from scratch again after you know what you're doing". Not to endorse doom or anything, just try out a few distros and pick the one that was most intuitive for you, and that appears to be well documented. For me that was Doom. For others, it might be prelude or spacemacs, or something else. Second, Emacs is extremely well documented. Make use of it! Almost every module you can install features useful documentation of the functions and variables those modules introduce. At the very least, any function called for in emacs has source code that can be examined. Knowing that I can call SPC-h-v or SPC-h-f and then a variable or function name, respectively, has been enormously helpful both in my ability to learn emacs (since I get to see practical examples of elisp), and in my ability to use emacs (since i've been able to take those practical examples, and make small, easy modifications to create new functions that do exactly what I want). The bindings I mentioned above are for doom. I believe the normal binds for the help/describe commands in vanilla emacs are: C-h f (or M-x describe-function), C-h v (or M-x describe-variable), and C-h x (or M-x describe-command) (note that C-h f also works to get command documentation, since all commands are lisp functions anyways). Continuing with the second point Emacs is self-documented, in that it can tell you what anything is bound to, what things are bound to a key or key chord, etc. C-h k tells you what command is bound to a key-press, key-sequence, or key-chord. C-h w allows you to look up a command to see what it is bound to. I highly recommend installing the module ["helpful",](https://wikemacs.org/wiki/Helpful) which improves upon the information in these commands (full disclosure, I didn't actually realize I had helpful installed until I went digging to make this post. It comes on doom by default. So I don't have true experience with these commands in a vanilla set-up. However, other people I've read, such as the person who maintains the mastering emacs book, recommends learning the self-documentation commands no matter what distro you went with for emacs, IIRC).
MrTinyToes · 2022-07-13 15:16
Learn LISP. It's great :^)
sunnyata · 2022-07-13 15:41
Thank you. I'm increasingly fed up with hearing that line.
donio · 2022-07-13 15:41
- Go through the tutorial and make sure that you know how to use the built-in and info documentation - Always be in full control of your configuration. Start with an empty one and add things one at a time as needed. Make sure that you always understand every line in your config, why it's there, what exactly it is doing. Don't copy snippets from elsewhere without fully understanding them.
brennanfee · 2022-07-13 15:49
(Same advice for Vim\Nvim) Don't try and learn or configure "everything" all at once. The best way to make it your "forever editor" is not to have it be able to replace your current tools, all within the next week or so. The goal should be to slowly phase in features/functionality over say a year. Making sure that as you go you are REALLY learning things as you go (key mappings, settings, etc.) You are truly making them part of your muscle memory. If you do that, eventually it will be able to replace your old tools and more importantly you will understand everything so as things change over time you will be able to adjust your config to adapt.
WallyMetropolis · 2022-07-13 16:01
Absolutely; and exactly what my recommendation was going to be. Emacs has an abundance of documentation that can be engaged with interactively as you use the tool. Learning to effectively use the help system has compounding, radiating benefits for every other thing you'd want to do in emacs.
noman_032018 · 2022-07-13 16:07
You can still access it via F10 & M-` (presented as minibuffer-menus) when you want it for discovery purposes.
Imaproshaman · 2022-07-13 16:24
Getting the Vim Keybinds package, and learning it when coming back to Emacs and making my config from scratch with less things, really helped me not only learn how .emacs works better, but also how to navigate it much better! The Vim Keybinds were definitely strange to get used to but man, keyboard movement is so much more efficient.
NoisyFrequency · 2022-07-13 16:34
`C-h r`
HM0880 · 2022-07-13 16:46
Just keep using Emacs. It took me ~10 months to get comfortable. Switch back to your old workflow when you need to get things done. Be persistent, think about what you want Emacs to do, see if a package exists (it probably does), and enjoy the process.
varsderk · 2022-07-13 16:51
Small list: - Get the movement keystrokes down pat. Avoid the arrow keys. - Turn on `icomplete-vertical` or installing [Vertico](https://github.com/minad/vertico); I feel like it really helps discoverability. - Learn how to split windows and work with them. - Keyboard macros! - Learn how to read the built-in manuals