reddit / emacs

Using emacs and learning emacs-lisp as an absolute beginner

Coolrule360 · 2022-10-16 10:12
I am an A-levels student currently in my second year and I have been wanting to make my own emacs config. To give you an idea about my skill level and knowledge I barely understand linux (I only leared to use sed a week ago) but love it due to its customization options. I only know basics of programming (upto functions and procedures) And can only write basic code in python. I have a love for programming but lack of motivation. I use doom-emacs primarily because I like having everything in one software and as a IDE. This is meant to be as much of a learning experience as it is motivation boost. I cant come to a decison regarding any of this and have thus come here to ask the professionals
Bu156 · 2022-10-16 11:10
The thing that I have learned the most from when writing Emacs Lisp is looking at other peoples' configurations. Lisp languages are (as you've probably noticed) quite different from other languages, but they're just lovely to work with imo. Doom Emacs is a fine configuration and is great to get something that just works. I myself realized a way into using Emacs that I wanted something more personal, so I have written my own config but that is absolutely not necessary. Also, if you want to learn lisp and want another language that is somewhat similar to Emacs Lisp, I have found Common Lisp to be quite similar and many concepts are applicable to both languages. It has been very beneficial for me to learn Common Lisp alongside Emacs Lisp. An introduction can be found [here](https://lisp-lang.org/). Scheme languages are also great fun and can be learned to get a deeper understanding for Lisps but I would recommend Common Lisp at first.
Coolrule360 · 2022-10-16 11:13
Thank you! Also happy cake day!
igorepst · 2022-10-16 12:53
[There is another thread](https://www.reddit.com/r/emacs/comments/y56uq7/advise_on_learning_to_emacs_and_computer_science) that may give you an info
big_lentil · 2022-10-16 13:53
It's actually very easy to build your emacs config 1. Start with nothing 2. When you want to add/change something, look up how to do that 3. Copy the bits of elisp you find into your init.el and fiddle around until things work to your liking 4. Goto 2 That's really all there is to it and honestly noone really understands what all the configuration they use or don't use actually do. There's an endless amount of knobs to turn on/off so it's best to not fuss too much about it. Also due to the personal nature of the config it's not something that you can focus on first and then not worry about later: you'll build it as you go according to your own needs as they emerge. So just treat emacs as a tool that you learn over time and keep using it and you'll end up with your own config. It's not really an end goal in itself.
takeonrules · 2022-10-16 14:40
I jumped into Emacs 2.5 years ago. I started with Spacemacs. But chose to pursue my own configuration. Overtime I've built-up my configuration (https://github.com/jeremyf/dotemacs). The process I went through was this: - Write down the principles of my text editor; at the time this was a mix of what it should do and the underpinning philosophy (e.g. open source, extensible)˘ - Ensure I had an editor I could fall back on for my work. (I'm a professional programmer so sometimes I need to just get coding done). - Start from a clean install of Emacs. - Go through the tutorial. - Do my work in this clean Emacs; when I know that my editor should be able to do something (from a previous editor). I'd go and track down how to do that. Then I'd incorporate and practice with this new functionality. I have also kept gardening my Emacs configuration, having switched from Counsel to Consult, Company to Corfu, and most recently from Org Roam to Denote. Counsel, Org Roam, and Company are amazing packages, but I was looking for narrower surface areas (fewer lines of code, leveraging core Emacs functionality, fewer external dependencies, etc). I now have an editor that: - Helps me track my day to day work activities - Powers my personal wiki - Helps me write documentation to export to many different ecosystems; including visual diagrams - Enables me to write and test code I just published https://takeonrules.com/2022/10/16/revisiting-the-principles-of-my-text-editor/, which may be of interest.
soundslogical · 2022-10-16 16:00
Just take it slow. Each time you encounter a problem/common pattern in your workflow, search for packages that may address that problem. If nothing quite fits, look at other packages/code examples on the internet and decide if the problem is small enough for you to attack. Choose a small feature/enhancement and give it a try. Repeat. Don't try to create the perfect config in one go. A gradual evolution is good for your muscle memory, but also for your Lisp learning. Also, get very comfortable with `C-h f`, `C-h v` and `shortdoc`. Emacs' inbuilt documentation makes programming it a pleasure. If you're excited for the learning experience, you have the right mindset. Good luck!
ideasman_42 · 2022-10-16 22:46
Suggest to use Emacs to do your regular work/projects, extend tweak emacs as needed. Take it slowly, check some packages that seem like they might be useful to you: (check https://github.com/emacs-tw/awesome-emacs out for example). Don't get too caught up in details, focus on functionality that gives you measurable benefits. To give some context, I use Emacs for my day job - and maintain some of my own packages, but mostly to scratch my own itch.
Pay08 · 2022-10-16 22:48
>- Powers my personal wiki - Helps me write documentation to export to many different ecosystems; including visual diagrams Could you expand on these two?
takeonrules · 2022-10-17 01:40
This is [my Denote configuration](https://github.com/jeremyf/dotemacs/blob/5120ecae1beb96ced888508a234b58644a05674a/emacs.d/denote-emacs-configuration.org) and [my Org-Mode configuration](https://github.com/jeremyf/dotemacs/blob/5120ecae1beb96ced888508a234b58644a05674a/emacs.d/knowledge-management-config.org) which is the foundation of those two points. > Powers my personal wiki I have a large personal wiki; it is my ~3000 Org-Mode documents and the Emacs functions I use and wrote (and will write) to track information. From that personal wiki, I draw out blog posts. And on my blog, I have as much of that wiki-like behavior that I've compiled. > Helps me write documentation to export to many different ecosystems; including visual diagrams. I write most stuff in Org-Mode and use [Org-Mode's export ecosystem](https://orgmode.org/manual/Exporting.html). I use `org-babel` ([see docs](https://orgmode.org/manual/Evaluating-Code-Blocks.html)) and [PlantUML](https://plantuml.com) to write text-based diagrams that I can export as an image. Here's a [post that shows the syntax](https://takeonrules.com/2022/01/09/using-plant-uml-to-model-rpg-relationship-maps/).
bijinhakumei · 2022-10-17 02:45
Emacs comes with possibly the best documentation for emacs. - Type C-h i to bring up info - Press ? to see the keybinds - Press "m" to open the menu selector - Look for "Emacs Lisp Intro" - Read away Of course, the best way to get really familiar is to really use the language. Try writing some package that does something interesting, or looking at some package you like, and trying to fix bugs or add features.
dm_g · 2022-10-17 03:52
Take the Coursera course in Programming Languages, part 1 and 2. Part 1 lays the foundation, part 2 is about racket (a list variant). Once you have completed part 2 you will have a solid foundation of functional programming that will make it way easier to program in Lisp (and will make your overall programming much better). Oh, and Dan teaches the first part using emacs :)