Hacker News new | past | comments | ask | show | jobs | submit login
A curated list of Emacs Lisp development resources (github.com/p3r7)
122 points by andsoitis on July 2, 2023 | hide | past | favorite | 23 comments



I found that learning lisp development follows logically from using emacs. To configure emacs you have to use elisp, so you naturally become proficient in it.

That also finally elucidated the staying power of emacs. I don’t know of any other software system that has the same introspective capabilities as emacs. That makes learning and modifying emacs a natural extension of whatever you’re doing.


I've been down this rabbit hole, to the level of reading disassembled bytecode to optimize preformance. Elisp is alright for what it is, but Emacs itself contains so many hacks and subsystems at the C level that elisp isn't allowed the comprehensive level of access that it would need to make m̶e̶ ̶h̶a̶p̶p̶y̶ highly performant extensions.

To be clear, these limitations in reasonable package scope come with positive trade-offs in the broader ecosystem such as promoting stability, inter-operability within emacs, and the insulatory disuse of FFI. I just feel like Emacs promised me I could do anything with elisp, and then denied me the low-level control that a lisp like Guile or Common Lisp is capable of. Helix does this better by not h̶a̶v̶i̶n̶g̶ ̶e̶x̶t̶e̶n̶s̶i̶o̶n̶s̶ making any promises.


For the uninitiated, writing Emacs Lisp is pretty easy. The only thing that requires some getting used to is all the existing functions to work with Emacs. There are thousands of them, acting on different facets of the editor, like for receiving user input, manipulating text and interacting with "modes" ; Emacs' abstraction that specifies behavior based on which file is currently being edited.


I found this overview of https://emacs.zeef.com better to find quickly Emacs resource you might need.


Every link just reloads the site. For me, at least.


Last month, after about 10 years, I decided to write a small package for emacs [1]. I decided to use chatgpt to help me do it, as I had completely forgotten common functions and what not. While, it got the syntax always right, it kept hallucinating function names, or was completely wrong about function arguments.

Quite annoying, because all I was asking for it was to move the point around or search backward or forward for specific strings. Eventually, I had to reference stackoverflow and rewrite most of what chatgpt produced to get something working. Some of these resources would have been quite useful last month.

The package itself is a markdown-notebook minor mode. If you trying to write a readme for your github python package, the mode allows you to add codeblocks, execute them and put the results just below them in the document. Works well for text right now, but need to figure out how to make it put images.

[1] https://gist.github.com/abdullahkhalids/83055b1abbd2cdf2416a...


You might like Org Mode

https://orgmode.org/


I use org mode quite a bit.

But github readmes should ideally be in markdown, and it makes no sense to write in org-mode and export to markdown.


I’m sure you know that GitHub handles README.org files too. What’s the downside of using org for readmes?


I have yet to have a collaborator who uses emacs, let alone org mode. Best to provide people open source stuff in the format they are familiar with. I wouldn't want learning the org format be an impediment to contributing to a project.


> What’s the downside of using org for readmes?

Popularity.

That's it. orgmode format was around long before Markdown, then all of a sudden Markdown got pushed hard for some reason.


> orgmode format was around long before Markdown

That's not really true. org-mode (2003) and markdown (2004) only have a year between them. Markdown was pushed more broadly (versus org-mode) because it was not tied to a specific implementation in a specific editor and was just for marking up text whereas org-mode was meant to tie in with more of emacs' other packages and capabilities.

If you weren't already using emacs, you likely wouldn't have known of org-mode in the late '00s. Markdown had already been incorporated into a lot of static blogging systems and forum comment systems by then with many independent implementations. Additionally, org-mode wasn't made a default element of emacs until 2006, two years after markdown was publicly documented.

All that said, I still prefer org-mode and use it for my own readmes outside of actual work where I stick to markdown.


Pandoc has by far the best org->md conversion.


Have you found a good way to drive pandoc from emacs?


Thank you for sharing this! I don't know how I'd missed this resource until now. Brilliant stuff, cheers, I'll be going through some of these tutorials.


I can code code in C, Python, and Java. But I don't have courage to learn Lisp.


Lisp isn’t too difficult to learn. The syntax is off-putting to some people, but what helped me adapt to Lisp syntax quickly was my familiarity with RPN calculators; I used an HP graphing calculator in college and I regularly use dc in Unix. In my opinion, the best way to start is to learn Scheme and work through The Structure and Interpretation of Computer Programs, which is a very nice read even for experienced programmers. Scheme is a nice small language, and many undergraduates have written Scheme interpreters in Scheme. After mastering Scheme I recommend moving on to Common Lisp, which is a large language with many features that are not common in more popular languages, such as conditions for error handling, the Common Lisp Object System and its support for multiple dispatch, the metaobject protocol, support for image-based development, and support for REPL-based development and debugging.


It's really not as weird or as esoteric as the memes would lead you to believe.

(Common) Lisp is multi paradigm so you can write code that looks very much like "C with the parenthesis in the wrong spot" and it'll work just fine until you evolve a more idiomatic/"lispy" style.

If you're proficient in C, Java, and Python you already have everything you need to be proficient in lisp. It's honestly not that difficult to learn.


I can't code in anything, and I'm using Emacs since a couple of years, know some basic Elisp, and have recently started doing Common Lisp. Still baby steps, but it's really very fun, and I don't find it so hard.

Doing the book "Gentle Introduction to Symbolic Computation" at the moment, it's lovely.

So that's all I wanted to say - there's no courage required. Just doing. Emacs is a joy, and there's no rush on these things.


> But I don't have courage to learn Lisp.

Give it a shot! What have you got to lose?


Obligatory video "Interview with an Emacs Enthusiast in 2023 Colorized" https://www.youtube.com/watch?v=urcL86UpqZc. "Emacs is a part-time job". I agree.


You do realize that's satire, right? I'd hope the channel name ("Programmers are Also Human") would have given it away, but . . .


Gosh, who knew? You mean... it's satire!!!?! Wow, it seems so real.... I especially like the fact that it was colorized. Real progress.

But gee whiz, what other editing system allows different colored left-and right-paren pairs as one's lisp nesting level goes up?

Emacs isn't an editor. It's a Way of Life. As the young lady said, "I said, Live it, or Live with it!"




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: