Live data from Hacker News

How to Learn Emacs (2012)

david.rothlis.net

31–40 of 47 posts

Re: How to Learn Emacs (2012)

#32

This tutorial is painfully out of date, and I would argue a very bad way to learn emacs today. As an example, don't learn to use ETags unless you are going to specifically be working with a C project where other developers use them. You would be better served these days learning LSP and treesitter, which is now built-in. I would also strongly suggest using Doom Emacs, and working your way backward to a minimalist con…

To be honest, as a sometime Emacs user, I'm not sure it's that compelling to learn emacs at all these days if you don't already know it.

Re: How to Learn Emacs (2012)

#33
Its great that Emacs is still with us and long may it last. Its incredibly powerful and flexible, but it also really hard trying to sell it to a new user. Most of them will just download and use VS Code. Is is still possible to popularise its use? Most people just want to get up and running straight away, something which Code lets them do, they dont have the time or patience to learn how to use Emacs. It comes from that RTFM era where you were expected to learn to use something however steep the learning curve, and people will just give software like that a miss.

I dont want to see it die out an I really hope someone does come up with a tutorial that can draw novices in or at least can show them the real power of Emacs and get them excited enough to want to learn to use it.

Re: How to Learn Emacs (2012)

#34
What is the coolest thing you can do with emacs?

I tried emacs a few years ago, but I didn't stick with emacs for more than a couple weeks, if even. I had already been using vim for many years before that without pain, so I could not find a compelling reason to switch.

Re: How to Learn Emacs (2012)

#35

My learning path was 1) use vim/nvim for a couple years 2) use Doom Emacs. I was shocked at how intuitive Doom is for me. Of course not everyone would agree but it’s worth checking out

Legitimately asking, not trying to start a holy war - what did you find lacking in vim that you found in emacs? I've been using vim for barely a year, and have yet to find anything I can't do in it that I want to do.

Org mode was the biggest draw. Magit is amazing, lisp is much better than vimscript, and everything is easy to inspect and modify.

At the time I much preferred vim’s approach of being an excellent IDE. I didn’t like Emacs’ approach of being… everything. However, being able to browse the web, check email, read ebooks, use the terminal, interact with JIRA or GitHub or Notion etc etc, all within my IDE really does have its appeal.

But I’ll always love vim and nvim, I think every software developer should learn it

Re: How to Learn Emacs (2012)

#36

What is the coolest thing you can do with emacs? I tried emacs a few years ago, but I didn't stick with emacs for more than a couple weeks, if even. I had already been using vim for many years before that without pain, so I could not find a compelling reason to switch.

I am programming SQL exploratorily in org mode. It renders server responses using org mode’s built-in spreadsheet engine. At the end of the day I mark the better queries for „tangling“ to create the schema changeset for me. In find that quite convenient.

Last time I was really impressed I had two remote dired buffers open (using tramp mode: „C-x f“: ssh:user@server.com:/foo/bar), one on server A and one on server B. Then I selected some files to copy (using „m“) and then hit „C“. Emacs then recommended the server B location automatically, I hit enter and it copied the files from A to B. Nice. You need „ dired-dwim-target“ (Do What I Mean target) set to true for this to work. But I use this trick regularly two run test queries on production machines.

Re: How to Learn Emacs (2012)

#37

What is the coolest thing you can do with emacs? I tried emacs a few years ago, but I didn't stick with emacs for more than a couple weeks, if even. I had already been using vim for many years before that without pain, so I could not find a compelling reason to switch.

What I also love is the built-in „compilation mode“. I‘ve bound „C-c l“ to „compile“ and „C-c r“ to „recompile“. We have different tests in different directories so I‘ve sprinkled a couple of “.dir-locals.el” in all the relevant places populating all the right default “compilation commands” for me. So when I want to run or create a new test I hit “C-c l” once, select the right default and then recompile after every iteration using “C-c r”. This boosts my turn over so much as any errors are also captured in separate buffer. The tests may even run remotely transparently by leveraging “ssh”.

So you don’t even need a complex configuration for easing many of your daily routines.

Re: How to Learn Emacs (2012)

#38

What is the coolest thing you can do with emacs? I tried emacs a few years ago, but I didn't stick with emacs for more than a couple weeks, if even. I had already been using vim for many years before that without pain, so I could not find a compelling reason to switch.

In the menubar I can click on Help->Describe->Describe Key or Mouse Operation... and then click on Tools->Compile Project to get information about what Tools->Compile Project does. It's easy to learn about the various tools available to me in a way that I find severely lacking elsewhere. Is it the coolest thing you can do in Emacs? Probably not, but it's something I really appreciate.

Re: How to Learn Emacs (2012)

#39
post #18

This tutorial is painfully out of date, and I would argue a very bad way to learn emacs today. As an example, don't learn to use ETags unless you are going to specifically be working with a C project where other developers use them. You would be better served these days learning LSP and treesitter, which is now built-in. I would also strongly suggest using Doom Emacs, and working your way backward to a minimalist con…

> don't learn to use ETags > You would be better served these days using LSP and treesitter Could you elaborate? How do I transition from etags to treesitter? Suppose I'm working on a dynamic C or C++ project where I might need to regenerate the tags daily.

> How do I transition from etags to treesitter?

… to LSP: You don’t throw your tags away. If you run an LSP client it will add an “xref-backend” transparently, so Emacs will get all references and definitions from the LSP server. If you turn off LSP mode, Emacs will fall back to the etags backend. I don’t think you need any configuration for this to work.

Treesitter modes do not implement an “xref-backend” AFAIK.

Re: How to Learn Emacs (2012)

#40

What is the coolest thing you can do with emacs? I tried emacs a few years ago, but I didn't stick with emacs for more than a couple weeks, if even. I had already been using vim for many years before that without pain, so I could not find a compelling reason to switch.

Customisability is the biggest selling point of emacs. I tried it many years ago as a user of Visual Studio. This way way before LSPs became a thing. I decided I much prefered Visual Studio at that time.

Then I transitioned to doing a lot less in C/C++ and more in Python, Java and shell scripting. I used Pycharm and Idea for a while as I got the licenses at work, eventually I tried Vscode with all the plugins, LSPs etc. I tried emacs again at the time. I liked the much better customisability, but I hated the fact Emacs was no faster than vscode on large codebases with lsp.

Eventually neovim with treesitter showed up and I embraced it as a nice quick editor. Then I heard emacs 29 has treesitter too so I decided to give it a try. Why? I was relatively happy with neovim, but certain things bugged me. I wanted ability to have different fonts and font sizes and other things.

So I started looking into emacs again. I wanted to learn the "emacs way" as opposed to the evil mode so I stayed away from distros like doom emacs. I set up treesitter (including for extra languages like hcl) an extra color theme and I'm happy enough to pursue it further this time.

Post reply on HN