7 ms·
Learning eLisp
- gordonguthrie 16y agoThis is a follow up to: http://news.ycombinator.com/item?id=2057483 http://news.ycombinator.com/item?id=2057483
- sausagefeet 16y agoThis is great. I have been dabbling in elisp myself (trying to debug a major mode I modified) and it is a nightmare, partially do to the lack of resources. The more resources the better.
- gordonguthrie 16y agoI feel your pain - precisely why I started writing the book :(
- tjr 16y agoWhile more resources surely are better, was there anything in particular you found lacking from the GNU documentation on Emacs Lisp? The reference manual or tutorial?
- jrockway 16y agoWhat lack of resources? Every symbol in Emacs is documented in detail via describe-function or describe-variable. Emacs ships with four entire books; "Emacs", "Emacs FAQ", "Emacs Lisp Intro", and "Elisp". "Emacs" documents pretty much every user-visible feature in Emacs, and "Elisp" documents every programmer-visible feature. (And yes, they are built in; try 'M-: (info "Elisp")'. And if that's not enough, it comes with nearly a million lines of example code, that you can get at with three keystrokes; describe-function / describe-key (etc.), TAB (to select the link to the source code), ENT (to follow the link). From there, you can edit the code, press C-M-x, and immediately play with your changes. Emacs is written in Emacs Lisp, and you can view the code and edit it at runtime. This makes Emacs Lisp significantly easier to learn than pretty much anything else, where all you have books with snippets of code that nobody ever used or ever will use. Emacs does not lack resources for learning Emacs Lisp.
- gordonguthrie 16y agoEmacs has plenty of resources if you know Lisp - if you don't all it has is the reference manuals. I learnt to programme from IBM 360 Systems Manuals, and guess what, learning from reference manuals was shite then and is shite now. I want to write a book that will get you to where you can profitably read the manuals.
- jrockway 16y agoNah, the elisp intro is quite conversational and starts with "this is a list". The "Elisp" info page is a bit of a reference manual, but it is all well-organized and readable cover-to-cover. I learned Emacs Lisp this way and have a couple of the more popular Elisp projects on github, so the manual must have done something right :)
- J_McQuade 16y agoBut dude - that might take more than 21 days.
- r00k 16y agoPage seems cut off on the bottom "Generally? Well pleased..." If that is really the end, it could use some padding.
- gordonguthrie 16y agoThat really is an interesting Hypernumbers bug/feature which I will fix...
- gordonguthrie 16y ago(spoof fixed on the site)
- joebananas 16y agoLesson #0: It's Elisp or Emacs Lisp, not some intercapped 90s abomination.
- gordonguthrie 16y agoThat's what they said on StackOverflow but I have not yet summoned the courage to work through the pages. Waiting for a rainy evening with nothing on the telly :(
- mapleoin 16y agoHe was talking about your HN submission title. It should be Elips or Emacs Lisp, not eLisp.
- gordonguthrie 16y agoWell its through the book as well. I might be wrong but at least I am consistently wrong :( The book will be fixed, the submission not so...
- mapleoin 16y agoHave people stopped designing for Firefox? This is what I get on 3.6.13: http://i.imgur.com/26vC4.png http://i.imgur.com/26vC4.png The scrollbars disappear if you remove this attribute: .hn-wc-body { overflow: auto; }
- naner 16y agoHave people stopped designing for Firefox? It does not look like that for me on Firefox on Linux. The author probably just missed it because of different font availability/preferences.
- gordonguthrie 16y agohmm - what o/s are you on? On windows with Firefox 3.6.13 I get: http://imgur.com/G4yl8 http://imgur.com/G4yl8 On Linux with Firefox 3.6.13 I get: http://imgur.com/x5WRt http://imgur.com/x5WRt It might be a font issue. We are finalising some layout features at Hypernumbers - this side project website is layout in a spreadsheet (I know, I know) so there are going to be some glitches. I suspect it is might be font related.
- mapleoin 16y agoLinux as well. It might be that I'm using really big fonts on a really big monitor.
- keeptrying 16y agoAwesome. Am looking forward to the whole book.
- silentbicycle 16y agoDon't forget that since you can safely assume somebody learning emacs lisp is using emacs. You could provide some text as a commented emacs lisp buffer that can be evaluated in place, like a variant of literate programming.
- gordonguthrie 16y agoOne of the problems that I am trying to solve is 'finding the information' so using a traditional HTML/PDF documentation generating package (Sphinx from Python Docs) is the way I decided to go. That is why there is a big focus on 'key words in URL's' and link-juice and so on and so forth... I also need to write a set of documentation for another project that couldn't be evaluated in place as a commented lisp buffer and this is kind of a practice for that, so...
- silentbicycle 16y agoNo worries, just a suggestion.
- jrockway 16y agoAnd, Emacs comes with documentation on both Elisp and every built-in feature of Emacs itself... but apparently nobody reads that. It really confuses me, as the built-in documentation is like the whole point of Emacs...
- silentbicycle 16y agoNo kidding! I've led a couple sessions where I've taught other developers how to use Emacs (basic or advanced usage), and I continually emphasize that the built-in help system (including info) is very good. You just have to get comfortable with the idiosyncratic terminology, and you can pick up half of that just from the C-h t tutorial.
- gordonguthrie 16y agoI can't make the help documentation work in Emacs - and I use it every day and have done for 6 or 7 years... I can open it but I don't know how the navigation works.
- Kilimanjaro 16y ago.hn for honduras Clever.
- raju 16y agoThis looks nice. Looking forward to reading it. On a related note, here is an interesting article from Steve Yegge on elisp (useful for folks like me who just want a quick primer) http://steve-yegge.blogspot.com/2008/01/emergency-elisp.html http://steve-yegge.blogspot.com/2008/01/emergency-elisp.html
- gordonguthrie 16y agoYeah, I learned a chunk of stuff from that when I started writing the book as well...
- Peaker 16y agoDynamic scoping is eLisp's downfall :-(
- eschulte 16y agothere is now a "lexbind" branch in the Emacs development repository, so this won't be the case for long...
- jrockway 16y agoHonestly, the frequent "answerers" on SO don't know their arse from their elbow either. The way to learn Lisp is reading the Emacs source code. When you wonder how something words, do a describe-key and follow the link to the code. Explore. Edit. Learn.
- ezy 16y agoWhat kind of modes are people writing nowadays? I'm mostly a vim user, but everytime I dabble in emacs (usually to play with org-mode :-)), it seems to have just about everything covered... Just curious.