Ask HN: Resources to grok Emacs and use it well?
21–30 of 179 posts
Re: Ask HN: Resources to grok Emacs and use it well?
#22I'd say it depends on what your aim is: (1) would be the way to go if you primarily want to get fluent with emacs, or are content to use tools you already know for other work, and learn plain emacs gradually in the background. (2) would be best if you want to get productive quickly using emacs for real work, at the risk of a more occluded understanding of emacs per se.
I'd put in a word for Prelude (https://github.com/bbatsov/prelude) as a possible compromise, making emacs immediately usable but without putting many layers between you and it. Some might consider it a little old-fashioned however (no use-package etc).
I've used vanilla emacs on and off for many years for quick edits, but only recently for actual programming (using Prelude, and prompted by learning Clojure). It's taking over my computing lifestyle. I've laughed in the past at people using it for email, but found myself using mu4e lately. Scary.
Re: Ask HN: Resources to grok Emacs and use it well?
#23Credentials established, I cannot recommend this tutorial enough:
https://david.rothlis.net/emacs/tutorial.html
He walks you through most of the core of what makes Emacs great by showing you how to make a change to a project in the idiomatic Emacs way.
I would have learned it years faster had I started there.
Beyond that, learn basic Emacs keybindings via the tutorial, as others have suggested.
I started in Emacs but installed evil-mode a few years ago and have never looked back.
I do not recommend Spacemacs. Install the tools you want as you find you want them, so that you know what's doing what, and so you have a decent chance of knowing what broke things when something stops working.
Keep your packages in version control as part of your .emacs.d repository. That keeps updates and deleted packages from screwing you.
Use "use-package" (https://github.com/jwiegley/use-package) for configuring what you install. It's written by one of the Emacs maintainers and will help you do things right by default.
I'm not the best Emacser out there, but if you're curious, my config is on my GitHub account: https://github.com/NateEag/.emacs.d
Happy hacking.
Re: Ask HN: Resources to grok Emacs and use it well?
#24https://sites.google.com/site/steveyegge2/effective-emacs
http://steve-yegge.blogspot.com/2006/06/shiny-and-new-emacs-...
http://steve-yegge.blogspot.com/2008/01/emergency-elisp.html
Re: Ask HN: Resources to grok Emacs and use it well?
#25Emacs user here, it's been my go-to editor for about 40 years. I have a few customizations, not many. My .emacs file is 63 lines long, doesn't include any other files, and mostly just tweaks some key bindings and turns off features that I don't like. The only modes I use are built-in ones (e.g., C-mode, auto-wrapping text mode, etc.). I can't write elisp without a reference manual, and I think that's okay. I suggest:…
Forgive the noise, but I second this. I haven't committed a hundred key combinations to memory. I find that knowing the twenty things I need to know (which are different for everyone), and having another twenty in my back pocket for once or twice a year has lasted me since 1992, and left me very satisfied indeed with emacs.
Beyond that, add language modes for anything you need that's not already included.
If you use 'git', 'magit' is very nice.
Beyond that, helm is interesting, though very large and kind of mind-blowing.
Recommend these in your ~/.emacs.d/init.el, to avoid being that guy:
(setq-default show-trailing-whitespace 't)
(setq-default indicate-empty-lines 't)
; try not to use tab characters ever when formatting code
(setq-default indent-tabs-mode nil)
(setq-default require-final-newline 'ask)
(setq-default mode-require-final-newline 'ask)Re: Ask HN: Resources to grok Emacs and use it well?
#26They are at: https://www.youtube.com/channel/UC0uTPqBCFIpZxlz_Lv1tk_g/vid...
Most of the videos are focused on practical tasks you would want to do. It's one of the few really good Emacs focused channels IMO.
Re: Ask HN: Resources to grok Emacs and use it well?
#27* Motivation
This is inspired by an ongoing conversation about emacs with a friend and a debugging interview that I really enjoyed.
* Exchanging emacs tips with a friend
A friend of mine is pretty proficient in emacs: org-mode all the things, written >500 LoC of elisp, tried several distributions. We still regularly teach each other about existing emacs functionality and exchange messages along the lines of: - I just found that there is a function foo, which I have made a keybinding foo and can now search open a tab with a SO search with text from the clipboard - whaaat? That's super useful! - I know, right?
He works with a couple of greybeards, who also seem to be constantly finding emacs functionality that makes their lives easier, which suggests it would be beneficial for all of us to watch others in emacs.
* Interview
I was given a real git repo that I needed to load into my environment (spacemacs on Linux) to debug and fix failing tests. They sat me down during the onsite (the days when we would go to interview in person), told me to download the repo from the URL, told me how to run the tests (after activating the python venv) and watched me debug and fix failing tests - only 5 were failing from about 100. The interviewers were not proficient in emacs, but I felt that they could follow my thought process and workflow. I had only recently set up python dap-mode and felt clunky navigating in pdb through dap, so ended up print debugging.
It made me think how interesting it would be to watch other people with different backgrounds and experiences debug the same problem and how often I would learn new tricks or debugging techniques. Having a good understanding of the problem and the code allows you to focus on the activity of programming and watch out for new ways of tackling the same problem.
* What will we investigate
Furthermore, it might be interesting to see what debugging practices are statistically more succesful in tracking down the bug faster (and control them for overall years of programming experience and emacs proficiency).
If our sample is big enough we can answer questions like: Correlation between overall years of programming experience and debugging time? Who is faster at debugging: printf or gdb debugger people? Which keybindings and modes are most frequent across users? Is there a correlation between having custom elisp functions and debugging time?
* Format
I will prepare a representative repo in the most popular language (I am most comfortable in Python, happy to consider other languages, if people prefer), bury some bugs in it (that will be easy), administer the study and summarise the findings in a spreadsheet/write-up.
Following the debugging session outlined above. Every participant:
starts recording their screen
Starts a fresh emacs instance with their config and loads a emacs lisp script that we provide for printing keypresses and recording keypresses + function calls to a log file.
download the prepared repo
run tests
investigate failing tests
fix them
commit their changes
The participant ends the screen recording session before sending me
- the video to me or youtube/dailymotion URL
- plaintext keylog history
- link to their elisp config
I appreciate logging keypresses/function calls might feel intrusive, so if you are uncomfortable doing that - don't! At the same time, if we want to share good debugging practices and general emacs tricks - I see this as the most impactful way to share techniques and elisp snippets.I watch it, sumarise the findings and present a write-up.
Who is interested?
Re: Ask HN: Resources to grok Emacs and use it well?
#28Emacs user here, it's been my go-to editor for about 40 years. I have a few customizations, not many. My .emacs file is 63 lines long, doesn't include any other files, and mostly just tweaks some key bindings and turns off features that I don't like. The only modes I use are built-in ones (e.g., C-mode, auto-wrapping text mode, etc.). I can't write elisp without a reference manual, and I think that's okay. I suggest:…
Re: Ask HN: Resources to grok Emacs and use it well?
#29If you're currently a vi user, I'd recommend spacemacs ( https://www.spacemacs.org/ ) to soften the learning curve. It comes batteries included (as opposed to a stock emacs install which requires a _lot_ of customization) and uses evil mode (vi keybindings) by default. You can expose yourself to more and more of the emacs way slowly. Also emacs is largely self-documenting. Learn the keys for querying documentation fi…
Re: Ask HN: Resources to grok Emacs and use it well?
#30Helm is pretty amazing and almost worth the cost of Emacs by itself: https://emacs-helm.github.io/helm/