Hacker News new | past | comments | ask | show | jobs | submit login
Learn Elisp the Hard Way (2011) (github.com/hypernumbers)
84 points by AndroidKitKat on Jan 31, 2022 | hide | past | favorite | 21 comments



The linked document isn't representative of books on Lisp or Emacs---it reads like a half-finished idea for a sketch of a pitch for a book. Since it is more than 10 years old, the project likely got abandoned at a very early stage. Writing a book is a lot of work, so don't mean this as criticism against the author. Just thought I'd say it in case someone doesn't want to waste time downloading and building something unfinished.


The easy way is thru the late Robert Chassell's book "Emacs Lisp Intro". I know someone mentioned it , but I bought a hard copy of Chassell's book and its great to learn, esp from one of the core members, in a different style. My brain refuses to dig books written in the same "new" way.


Learn Elisp the Easy Way: M-x info "Emacs Lisp Intro"


This is the way.

Sadly this documentation isn't distributed with the Ubuntu version of Emacs, and a newcomer has to jump through some hoops to get it installed. Which is probably an appropriate learning experience.


I agree with an appropriate learning experience, but the docs are the stuff supposed to get one started:

sudo apt install emacs-common-non-dfsg


The Emacs Lisp Intro manual is also available online here: https://www.gnu.org/software/emacs/manual/html_node/eintr/in...


The right way IMO is to just start customising your Emacs with a very ready and very introspectable distribution (like Doom or Spacemacs) and then poke around to fix what you don’t like.

Though I guess a book can be helpful to learn best practices. But with how excellent the emacs documentation (including describe-function, describe-variable and describe-key, to know what you should edit) you can just jump in right away.


In a timely manner, this just popped up:

https://old.reddit.com/r/emacs/comments/sh5msl/the_basics_of...

The guy shows how to configure and basic elisp stuff

ps: direct link to the video https://www.youtube.com/watch?v=OaF-N-FuGtc&t=193s


I wanted to use an Emacs distribution, but ended up against them as I've always preferred to just use the tool barebones and add on functionality when I need it. Maybe I'll dedicate some time to trying out Doom or Spacemacs and see if I am really missing anything that I haven't cobbled together from reading the built-in documentation and snippets of lisp.


I have found `use-package`, some hooks and some modules with provide/require are enough. These Emacs distribution come and go and I'm not sure doom Emacs will be there in 15 years. Also while they are good at providing something coherent for newcomers they just get in the way if I need to fix something. It's similar to the debate frameworks versus libraries. I'm just looking at them for inspiration sometimes and taking the good parts.


How can Doom get in your way, when you can simply remove entire modules and/or specific packages with ease? And even if I keep those packages, I can simply change anything I want by just putting the setting in my init with "use-package!"?

I never had this problem, I have been using Doom for two years, and Emacs without Doom for years before that.


I think a distribution is just much more convenient, mostly because of package discovery and the time it takes to set things up. Other people take care of making your editing experience nice, and some things just take a long time to get working otherwise.

That said, it's true that you can in principle do the same thing yourself :)


That is my experience as well. I had a messy, ball of mud .emacs file for a couple of decades.

When I found Doom, I dropped my .emacs and it became just a few dozen lines of org/templates config. The rest is all doom.

I even adopted Vi (A lifelong Vi avoider..) and am getting proficient with it.

Sometimes you want to get your hands dirty and configure everything. Sometimes you adopt something that is created and supported by experts and just enjoy it. Both are fine I guess.


I think if I were to start over learning Emacs (I only really started using it about 6 months ago), I would have decided to choose a distro only for package discovery. I haven't found myself really pining for new functionality, but perhaps I am completely oblivious to things I'm missing. I've only really added magit to Emacs since I hated working with git on the command line.

I still imagine I would have found myself just finding what packages I like and adding them to a "pure" Emacs, since I've done that for the other tools I use on a day-to-day basis.


I understand where you're coming from. I did the same I still recommend Doom Emacs. It's excellent. Bare ones Emacs will probably take a lot more work than you anticipate.


The link to http://learn-elisp-for-emacs.org/ seems to be broken, redirecting to https://www.gooroo.com/ instead...


Another option is to look at existing modules on MELPA, standing on the shoulders of the giants etc.

I really learned a lot from org-roam-ui [0]:

- websockets - http server - creating an API - and of course internal emacs functionality.

[0]: https://github.com/org-roam/org-roam-ui


Creating my own non-trivial minor mode was what really got me to start understanding Elisp and Emacs as a whole more under the hood.


What was the minor mode that you created?


vertical-center-mode: https://github.com/trevorpogue/vertical-center-mode

It let's you "scroll above the top line" so that the top text in a file can be centered in the screen.

I still need to clean it up and submit to MELPA


I've been looking for ideas for my own minor mode for the same purpose. Thanks for sharing!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: