Live data from Hacker News

Master Emacs in one year

github.com

61–70 of 121 posts

Re: Master Emacs in one year

#61
post #57

A friend of mine asked me this recently: are there many young programmers investing in emacs? I only know a few... it's kind of depressing.

23 year old third year computer science student. I only know of two students (me included) that are emacs users.

Same here. The intro course taught us emacs and vi in the first course. Then kinda left it up to us. Only a small handful stuck with them. People either loved it, or hated it.

Re: Master Emacs in one year

#62
post #42

Can anyone share what they feel are their top 3 greatest workflow improvements in productivity going from a point and click IDE to a shortcut based IDE like emacs?

1. On-the-fly keyboard macro generation. I use M-[, record, M-]. f9 to execute. (C-x e, e... if function keys not available) Even very small, one-time, but repetitive tasks can be automated.

2. First-class functions that can be bound to anything. I always bind "goto-line" to a single key (like f7). That alone saves me lots of time. And custom functions work the same way. You can put a macro to insert that if __name__ == '__main__' in python scripts with a single keypress, or with a "M-x ".

In addition to language boilerplate, you can use these facilities to help enforce arbitrary coding standards. I have a function template for C that adds a comment "/* end */" after the close bracket, for example.

These facilities apply to any file you might want to work with. This is in addition to whatever editing modes might already exist for the language.

3. Working in text-only terminal on a remote server is only slightly different from working on my desktop. Not having to manually sync files or mess with X configuration is a huge win for me.

Re: Master Emacs in one year

#63
post #39
post #10

Once you have mastered Emacs, you are good at all other editors I haven't found that to be true at all. I find that due to archaic idiosyncrasies and the customization possible with emacs, the more time I spend with it the more difficult it becomes to use different editors.

I spent 5 years learning and using vi (n perhaps a dozen different Unix-like OSes, so they were all different, meaning I could only use a core set of features. I then spent a few years working on Windows where I had Vim, but other editors I used were, well, 'standard'. Then ViEmu came along and I now move between Vi-like editing in VS and Vim, and 'normal' editing in other apps. It's not too bad, to be honest. I'm ed…

Vimium is really good for mouseless vi-like browsing in Chrome though. https://vimium.github.io/

Re: Master Emacs in one year

#64

A friend of mine asked me this recently: are there many young programmers investing in emacs? I only know a few... it's kind of depressing.

I graduated from undergrad last year working at AWS. Of ~30 engineers on the team, there's 2 of us using emacs. The other guy is around his mid 30's.

Re: Master Emacs in one year

#65
post #39
post #10

Once you have mastered Emacs, you are good at all other editors I haven't found that to be true at all. I find that due to archaic idiosyncrasies and the customization possible with emacs, the more time I spend with it the more difficult it becomes to use different editors.

I spent 5 years learning and using vi (n perhaps a dozen different Unix-like OSes, so they were all different, meaning I could only use a core set of features. I then spent a few years working on Windows where I had Vim, but other editors I used were, well, 'standard'. Then ViEmu came along and I now move between Vi-like editing in VS and Vim, and 'normal' editing in other apps. It's not too bad, to be honest. I'm ed…

I use It's All Text! (Firefox) to edit text boxes on the Web with my text editor if what I'm going to write is longer than a paragraph.

Re: Master Emacs in one year

#66

A friend of mine asked me this recently: are there many young programmers investing in emacs? I only know a few... it's kind of depressing.

I'll be using emacs as the sole text editor with my students in September, so there'll be a few more young programmers learning how to use it.

I hope you will be teaching Intro to Emacs. Why else would you impose a text editor on students?

Re: Master Emacs in one year

#67

Earlier quoted context omitted.

>I became more afraid of the sustainability of newer editors [such as Textmate]. I'm not afraid. After 22.5 years on Gnu Emacs, I'm considering a jump to Textmate 2. (I probably would not be considering a jump, however, without the boost to sustainability caused by Textmate 2's having been open-sourced. ADDED: also, being able to edit files on remote hosts is not important to me.)

I gave Sublime Text a shot (20 years emacs), but ran into the same thing that has kept me from using emacs x11 for more than a few weeks at a time, which is that I spend maybe 30% of my time editing files on remote machines, connected over ssh, often through complicated tunneling arrangements that make using Tramp a pain to use. I keep thinking that what I really need is to switch all the machines I use to Plan9 to a…

I've had trouble using Emacs to edit remotely via SSH/tramp, but the following ~/.ssh/config settings helped me a lot:

  # stop ssh connections from freezing
  KeepAlive yes
  ServerAliveCountMax 10
  ServerAliveInterval 10
  
  # Lets you bounce through an arbitrary number of hosts.
  # ex: ssh 1sthost/2ndhost/3rdhost
  Host */*
  ProxyCommand ssh $(dirname %h) nc -w1 $(basename %h) %p

Re: Master Emacs in one year

#69
post #53

Earlier quoted context omitted.

If you do decide to try a lisp, don't start with Emacs Lisp. It's a mess. Go with Clojure, out of all lisps it's one of the least self-congratulatory about how awesome they all are for using lisp.

Well, Clojure also was a mess when I tried it (2 years ago maybe?). Leiningen (a/the build system) was pretty slow, and I couldn't find a way to use the language in a more lisp-like way easily, like editing a few files and (re)loading them into a running REPL (other than iterating through all buffers in Emacs and loading/evaluating them manually; there may have been other problems as well, I don't remember). You know…

I also tried getting into Clojure around that time. I was coming from CL where we have nice things like conditions and restarts, dynamic variables, and CLOS -- being able to hit an error in the debugger, inspect the slot of the instance of some object that caused the error and recompile the class definition to fix the error without restarting the program is really nice (all of the running instances are updated). I was not used to Clojure's unhelpful tracebacks.

I don't understand what age has to do with anything... CL is still a good language.

Re: Master Emacs in one year

#70
post #35

Earlier quoted context omitted.

> nevermind why I should consider taking a year (an eternity in technological time) to master it. I don't want to proselytise, but maybe that hints at one of the core appeals of emacs. A year is nothing in terms of the span of time emacs has been around, and so time invested in making emacs your editor is effort that won't be discarded in the next technological cycle. The other aspect is what I mean by "making emacs…

Visual Studio, or Eclipse have been around for a fair while as well now. Its not like they will disappear with the next text cycle. And you can get productive with them in far less than a year.

Emacs still runs on more platforms than VS and Eclipse, using fewer system resources, and is applicable to a larger diversity of programming / work tasks. There are not so many tools that are both that ubiquitous and long-lived.
Post reply on HN