Hacker News new | comments | show | ask | jobs | submit login
Learn Emacs and Lisp with simple, bite-sized screencasts (emacsbites.com)
142 points by ColinWright 1384 days ago | hide | past | web | 36 comments | favorite

I like the approach (two birds with one stone) but the first bitecast has left me the impression that I've learnt some emacs lisp and very little emacs. Since total newbies are supposed to be the audience of this first bitecast, I'll give my opinion as a total newbie...

From the video, here are the features of emacs that I've learnt by just watching:

1. Emacs will read your environment variables. You can override them as you'd expect.

2. You can override your HOME directory by setting the environment variable to any path. From my point of view, it seems like too much work - will emacs use your current working directory? Seems like it doesn't.

3. C-x C-e evaluates.

Here's what I would have liked to learn, that I didn't:

1. What shortcuts is the author using throughout the video?

2. Basic emacs functionality: moving around, opening / closing files, saving files... Granted I know some movement shortcuts because they're commonly used in other contexts (C-a / C-e for begin/end of line, C-f, C-b to move cursor forward/back, etc), there are many other tips we could use as newbies.

3. Does emacs only evaluate lisp? Will it evaluate Python? Javascript?

4. Although I know I can extend functionality, I'd love to learn about the ecosystem (plugins or modules, what tools, if any, exist for plugin management, etc).

Showing around shortcuts is missing the point about Emacs. As the great Heraclitus once said: "No man ever uses the same Emacs". Emacs is about tailoring your tool to yourself. To use emacs Effectively you only need to know about Emacs core abstractions (buffers, strings, modes, keymaps, etc), emacs lisp and at most the C-h commands.

I'm clearly doing a bad UX job with this somehow. There are a collection of little videos wrapped by web pages documenting what is in the video. Eventually they will add up to something substantial (hopefully) and comprehensive (hopefully).

I toyed with the idea of using something that would show you the keys... but those things are never totally reliable and always a bit of added complexity. So I decided instead to offer the web page approach.

I admit, I'm probably not doing a great job for complete Emacs newbies right now. I am unclear if I have to, there are a lot of starting Emacs screencasts around. This one is about starting with EmacsLisp, not really Emacs.

Having said that... if that's what people want I may go back and alter the structure of the thing so that total newbies could join in.

It would probably only mean having fewer expectations in the crash course.

I think you should identify a target audience. e.g. Emacs users who don't know elisp. The the questions which were posed become non existent. Keystrokes, editing etc. are best taught separately.

Regarding target audience, I think if the screencasts were "emacs for beginners and elisp for beginners" it would be too much and there would be no real audience: people who are starting out in emacs don't need to bother about elisp yet, people who are starting out in elisp probably know at least the basics, if not more, of emacs.

So either do emacs for beginners (of which there are already quite a few screencasts) or do elisp for intermediate emacs users but those new to elisp

Disclaimer: I am being amazingly selfish here as I've been using emacs for quite a while, but only now getting into elisp (and lisp in general)

I've just watched all 3 screencasts and found them really very useful. Not just the elisp stuff, which is great, but also the modes that help you use elisp (smartparens etc).

I would happily pay/gittip for a series that aimed at programmers who already use emacs (or can figure out the editing/movement functions) that takes you from no elisp to being able to write your own (useful) packages. Tips for getting the most out of emacs for the development of lisp would be a huge plus (for example, an episode on setting up/using smartparens, eldocs or whatever).

you're in luck! that's absolutely what I'm trying to do.

I do have secondary audience, people who want to learn Lisp, not necessarily elisp. Emacs is the best way to do that imo.

I expect those people to have at least looked a bit at Emacs before they start though.

This sounds spot on for what I'm after. Looking forward to seeing how this progresses.

Thanks for the link to the other vids, will check them out.

wait. there are more than 3!


2. There's a built-in tutorial like Vimtutor for this, it's under the help menu.

3. Looks like you can use Python[1], but you'd better just bite the bullet and learn a bit of Emacs Lisp, it's how you'll be configuring it anyway, and it's unlikely that you'll need to program something too complex if you can just fetch a bunch of Elisp from the net which does sort of what you want.

4. Yes, from Emacs 24 and on it has a built-in package manager and repositories.

You know what a good way to learn Emacs is? Reading the docs. No, really! Anytime you request documentation for your buffer (C-h m by default), it will be based on your current key bindings and modes, so it's a great starting point to explore, as it'll tell you of all the shortcuts your active plugins have defined.

As of late, I've learned more of the capabilities of the modes I use by dicking around than by searching the web or reading manuals, as I sometimes just start typing in the extended command shell (M-x), using IDO mode's[2] fuzzy completion, and seeing what comes up. For instance, by typing "replace", I just learned of query-replace, which prompts you before each substitution for a string. Afterwards, I can run "M-x where-is" to see if the command is bound to any shortcut right now, as I did with query-replace, which turned out to be bound to M-%.


1. http://pymacs.progiciels-bpi.ca/index.html

2. http://www.emacswiki.org/emacs/InteractivelyDoThings

The built-in tutorial (C-h t) was extremely useful for me in learning emacs.

First, it's just a document that you can edit. You start at the very beginning by navigating the document itself. You can save or discard your changes to it.

Second, it's marked up to show you when the key bindings it's talking about have been re-bound. This wouldn't be an issue for a "vanilla" emacs, but is useful with preconfigured packages.

By the time you get through the tutorial, the basics are second-nature.

More power to the videos -- just agreeing that the built-in docs are ample.

M-x apropos was also a hugely important part of the learning process for me.

Maybe this goes against the point of the video, but I really don't think beginner emacs users should be learning any lisp. As you're saying you should know the basic keys to do basic things, you should know fundamental concepts (point, mark, kill ring, etc), and you should know how to use the help system.

Then when you can use emacs as an EDITOR, you can worry about learning the lisp. Don't get me wrong, the lisp is awesome, but is there really a need to make the learning curve any steeper?

There are lots of videos showing you how to use Emacs. Emacs Bites is about teaching you Lisp.

For videos that focus more on emacs itself check out this chap's youtube videos. He also has a decent haskell collection too.

I'm still in the process of switching from Vim+Extensions to Emacs+Evil+Extensions. What I say now mostly applies to the Cocoa version of both editors, such as MacVim and Emacs/Cocoa: What I like so much about Emacs so far is the better editor component: Text can be a little bit rich:

- Inline images are kinda supported - There can be different font sizes - There can be styled (bold / italic) text.

So a good syntax definitions could have different background colors for code, different foreground colors, different text sizes, different text weight / italics.

I find this much more pleasant for the eye. In vim, all text has to be the same size and all text has to be the same font. In emacs, you can even (with some hacking, as I remember) have different color themes for different windows/views.

If I'm looking at an editor all day long, I want it to look pleasant. Period. Have a look at https://github.com/jasonm23/emacs-soothe-theme to see how beautiful it can look.

Apart from that, the other reason why I'm trying to switch is that I wanted to become better at lisp and I really wanted to have an editor that I can shape like a tool to suit my needs. And I could never get the hang of vimscript. So if I already learn a new language Lisp sounds like a better investment than vimscript.

So far, I'm happy with emacs, though I can't use it for all my coding yet. Most notably, it lacks a good Objective-C code completion. On vim, there's YouCompleteMe, which does a formidable job of connecting with clang complete. I started porting youcomplete me over to emacs a couple of weeks ago but had to stop due to other priorities. I'm at a point now where I can get the correct completions in emacs in a popup when I'm over a symbol or at the end of a property (self.???). However, I still have to solve a couple of issues and it is not ready for usage yet which is why I've never shared it. If somebody knows a bit of emacs lisp, python, and objective-c and wants to help out here, I'd be glad to share this project on Github.

I rock emacs 24/7 for all code outside of xcode or android studio (php, phantomjs scripts... anything not java or objectiveCMethodWithAnIncrediblyDescriptiveButEffingLongName), and I've found "calm forest" in the color themes package to be a wonderful general theme. It's a great place to start for building in custom syntax settings for "less supported" languages.

Godspeed on the project, and perhaps if I can get some time to force myself into ob-c in emacs at work, I can help.

How does storyboarding work out, or are you just writing the markup directly?

I'm currently only interested in native code auto completion as good as in XCode where it understands the complete class hierachy and types half the boilerplate for you. For Storyboards or Xibs you'd still need XCode. I've long thought about a nice compiler from a simple text format to xib in order to have better version management capabilities, and it may be reasonable now with layout constraints to implement something like that, but I think storyboards would be best done in XCode.

I'll comment on this thread again once I've shared the objective-c emacs code.

I think that what makes Vim inferior nowadays is its scripting language, and its clunky implementation in general. It takes a lot more effort to build something like org-mode in vimscript.

Year, it didn't really work well for me and the objective-c support was subpar. But I used some of the code for pointers. I think I tried all available emacs clang completion limbs before trying to port youcompleteme

OOC, how were your first times using paredit ?

A littlebit confusing. I still need to set it up correctly, I think. First, C-<left> moves me to a different desktop space here on my Mac. So I didn't play with it much more after that. I should try it out again.

I understand; I'm temporarily using Mate (instead of xmonad) and this WM is intercepting a lot of emacs keybindings.

I'm asking for comparison in learning. It took me 3 attempts, separated by many months, before feeling at home with paredit (even though I loved lisp s-exp and the idea of structure-aware edition). But when I clicked[1], that was it, can't live without it (and other languages will feel slow after that). I think swapping, wrapping expressions, helps in the process of thinking.

I hope you'll be at ease with it.

[1] it helped that I was following a MOOC using Racket (regular motivation) while chatting on irc with emacs/lisp users (less frustration).

One problem for a vim user like me is emac's terrible first use experience. The delete key doesn't delete, it opens up help [1] and quitting is very difficult [2]. Also what people don't know at first start is which key is their meta key. A key that is super important in emacs. That it gets this first basic experience so terribly terribly wrong turns a lot of people off within a few critical settings of having run the thing.

[1] http://www.gnu.org/software/emacs/manual/html_node/emacs/DEL...

[2] http://www.ugrad.cs.ubc.ca/~cs219/CourseNotes/Unix/emacs-sta...


> In some unusual cases, Emacs gets the wrong information from the system, and <Backspace> ends up deleting forwards instead of backwards.


That's not the case with the GUI version because it works like any other application (File->Quit or the [x] button). In terminal it's a bit different but it's not like vim is any easier here.

I have been using Emacs for a long time and I can't remember the last time it got the wrong key.

If you're using a graphical Emacs (for OSX or X or Windows) I think it hardly ever happens? Doesn't happen to me and I use all 3 of those.

Does this run on elnode, the web dev based on elisp?

Yes. The github is here: http://github.com/nicferrier/emacsbites

Does Emacs support or have any extension that "tabs" the right amount of spaces based on the programming language/filetype? I use Vim and it annoys me that this isn't built-in, nor can I find any good script for it. I know I can write it manually, but I want it for all languages.

> Does Emacs support or have any extension that "tabs" the right amount of spaces based on the programming language/filetype?

Probably - I mean it depends what you want. Emacs is almost infinitely programmable. If you want to set it up as a Python IDE then there're sites like this telling you how:


This is a quick clip of Emacs using Rope for instance:


If you want to set it up as a Lisp IDE then you're probably wanting to go and install SLIME:


It depends what you want it to do, but emacs is an incredibly powerful program and learning it pays off massively, in my experience. :)

Just about any language has an emacs major-mode which does things like syntax highlighting and auto-tab. And the major languages are shipped with emacs.

fyi, the 'why' link is broken due to a naming mismatch.

thanks! I've fixed that. Good catch.

Actually, the "contact" and "terms" links seemed also to come back to the same page - you might want to check all your links thoroughly.

And again thanks. Fixed. The reason for this breakage is that I had to change the name after it was launched (in a hurry).

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact