News for hackers. Stuff that matters.
Re:Toward a “modern” Emacs by oblio on Friday September 25, 2020 @06:06PM (#24594606)
I've personally known 2 Emacs users in my ~15 years in the industry. I've worked in Europe for various startups and a bunch of corporations. Both of them used it as a sort of hobby/side editor, their main money maker was an IDE (VS, IntelliJ).

I've probably worked with 500 developers, if not more.

My personal impression is that Emacs is like the Yeti of programming editors. Everybody has heard about it, few claim to have seen it and even fewer still can claim to have proof of the sighting :-)

Re:Toward a “modern” Emacs by gnulinux on Friday September 25, 2020 @06:37PM (#24594820)
This is amazing.

I already wrote this to another comment, but quoting myself:

> Is this a USA vs the rest thing? I've worked in many startups in the US and almost everyone uses emacs. Last few years, VSCode has been getting popular though. I had a similar experience when I was a student in UC Berkeley, although it seems like there were more vim users in school than in industry. Anyway, pretty much all my current coworkers use Emacs and I work in Boston, MA.

> Personally: I cannot imagine programming without emacs, to me programming is so strongly associated with emacs...

> Of course, I also understand that it's all personal preference.

I don't know if there is a way to prove that I'm lying. :)

Re:Toward a “modern” Emacs by rxhernandez on Friday September 25, 2020 @07:35PM (#24595128)
I've worked in California all my life and have worked in the following industries: medical devices, scientific devices, blockchain, and plasma physics research. I am the only person I've seen use emacs. Almost every developer I've worked with either used VS Code, Visual Studio, or uVision. Everyone else used Sublime Text, Eclipse or a JetBrains IDE.

I haven't even used emacs in years so I don't even know anyone that uses it; I stick almost exclusively to Vim (and for 8 months this was my only "IDE"), PyCharm, and WebStorm.

Re:Toward a “modern” Emacs by addicted on Saturday September 26, 2020 @07:04AM (#24597877)
I mean, just go on YouTube and start clicking around in random presentations at programmer conferences.

Unless it’s an emacs related conference you will rarely see emacs being used as an editor. You will see a few VIM users sprinkled around. But if it’s a recent conference the vast majority are gonna be VSCode users.

Re:Toward a “modern” Emacs by oblio on Friday September 25, 2020 @06:53PM (#24594905)
Isn't Boston where MIT is and where Stallman lives?

Also, Berkeley as in BSD.

You're probably living in a smaller bubble than mine :-)

Re:Toward a “modern” Emacs by how_gauche on Saturday September 26, 2020 @09:33AM (#24598697)
Huge skew depending on what platforms you like to work on. Java or Windows people are significantly less likely to use trad Unix tools. Backend or Linux people, it's 30/30/* in my experience between vim/Emacs/everything else -- this was certainly the case at Google when I was there.
Re:Toward a “modern” Emacs by turing_complete on Saturday September 26, 2020 @04:04AM (#24597178)
I am using Vim. Is it worth it to try emacs?
Re:Toward a “modern” Emacs by quanticle on Saturday September 26, 2020 @04:53AM (#24597362)
If you're happy with vim, stick with it. In general, when it comes to editors, you're better off trying to get really good at the editors you already know than being mediocre at using a bunch of different editors.
Re:Toward a “modern” Emacs by fennecfoxen on Saturday September 26, 2020 @08:14AM (#24598224)
Here's what I do in emacs that makes me like it better than vim. If you want to do things like this, you should consider Emacs. If not, you are likely better served by Vim.

- I write software with unit tests. I have a custom method bound to Shift-F5 that computes the test file associated with the current code file, and switches to the buffer.

- I have a similar method bound to F5 that runs the tests for the current file (code file or test file). Ctrl-F5 to run the previous test again even if you're in a different buffer.

- These are configured for multiple programming languages, testrunners, and different conventions within specific programming languages, in different parts of the codebase.

- Test output goes to a first-class buffer, like any other file I'm working on. If I want to do something like `git blame` the file I'm working in, it's also a first-class buffer. Want to run a shell? `tail -f` some logs? All in first-class buffers.

- Why does it matter that things end up in first class buffers? Well, there's lots of random goodies like `meta-x json-pretty-print-region`, so if your execution dumps a blob of unformatted JSON or whatever, you can manipulate it readily. (Tab complete is available on these commands.)

- Autoformat your code automatically with a save hook. Autoformat it on your own schedule by calling something like `m-x blacken-buffer`. I don't think vi does as good a job of manipulating the contents of your file with internal and external programs.

- undo-tree-visualize.

Re:Toward a “modern” Emacs by demosito666 on Saturday September 26, 2020 @03:21PM (#24601428)
Vim can do all of the above pretty easily. In fact, I have a mapping for json pretty-printing, filtering it with jq; mapping for autoformatting with black or other formatter depending on file type; a plug-in for undo history tree. I don't have configuration for running tests the way you do, but I know a guy who does something very similar in vim.

I don't think the things you describe are the differentiators for the Great Editors. For me it's more their phylosophies that make them stand apart: despite the wide usage, vimscript is far more clunky, narrow-scoped and less powerful than elisp. Which means that stitching together something complex is hard and awkward in vim. Emacs is far more suited for complex processing due it's nature of a lisp machine. The chords are awkward though. So, "emacs is a good OS, but it lacks a good text editor".

Re:Toward a “modern” Emacs by fennecfoxen on Tuesday September 29, 2020 @08:02AM (#24626622)
> I don't have configuration for running tests the way you do, but I know a guy who does something very similar in vim.

I would love to see that: everyone I know who uses Vim ends up typing out test names in a separate terminal, or running some sort of a shell-out command that suspends editing of the current file until it is complete, and then hides its output.

Re:Toward a “modern” Emacs by mkesper on Saturday September 26, 2020 @04:57AM (#24597380)
Try doom-emacs, consequently evil-mode and highly adaptable. https://github.com/hlissner/doom-emacs
Re:Toward a “modern” Emacs by alkyon on Saturday September 26, 2020 @08:08AM (#24598187)
I used to use Vim, but switched to Spacemacs and never looked back. I highly recommend it as it gives you Vim bindings with all Emacs possibilities.
Re:Toward a “modern” Emacs by mark_l_watson on Friday September 25, 2020 @07:37PM (#24595141)
I second gnulinux’s comment, that is amazing. I would estimate that over 1/3 of my colleagues over the years used Emacs at least once a day and for many it is their main driver.

It seems like I spend a fair amount of time mosh/tmux to remote servers and I like copying over my Emacs configuration, be up and running. Same for users of vi or vim.

VSCode has good remote server development support also, so there are great options to keep most people happy.

Re:Toward a “modern” Emacs by hnarayanan on Friday September 25, 2020 @06:11PM (#24594640)
I’m nearly 40 and I’ve used it as my primary text editor since I was a teen and daily for my job.

For your anecdata collection.

Re:Toward a “modern” Emacs by ericd on Saturday September 26, 2020 @01:01AM (#24596561)
Depends on who you know. Among my friends who went to MIT, a good number use emacs. It’s really, really nice to be able to use the same editor everywhere, regardless of whether you’re using your local machine or ssh’d into a VM or server. Also, knowing that it’s not likely to be deprecated in the next couple of decades.
Re:Toward a “modern” Emacs by ashtonkem on Saturday September 26, 2020 @12:44AM (#24596491)
What language? Some languages have Emacs usage in the range of 0%, such as Java and C#.
Re:Toward a “modern” Emacs by oaiey on Saturday September 26, 2020 @02:02AM (#24596758)
That is very fair question. In my experience of html, css, js/ts, C#, VB, java, php, c/c++ and python I have never seen any emacs users in 20 years. I think it is really a language and region cut going maybe back to the universities supporting lisp or something else
Re:Toward a “modern” Emacs by ashtonkem on Saturday September 26, 2020 @11:47AM (#24599641)
Maybe it’s a region thing. Back when I did Python it was fairly popular, but VS Code appears to have largely taken over in that language, much to me continual confusion.

Most of the other languages you listed have extremely poor Emacs integration, both for cultural reasons (C# devs tended to be on Windows), and because some of those languages are so dominated by other IDEs that nobody bothered to write a good emacs extension. Java is a great example of this; the IntelliJ experience in Java is just so good, nobody managed to come anywhere close in Emacs, which created a self reinforcing cycle.

Re:Toward a “modern” Emacs by varjag on Saturday September 26, 2020 @03:40AM (#24597088)
It is fairly common with C programmers, and C++ programmers outside Windows ecosystem.
Re:Toward a “modern” Emacs by quadrifoliate on Friday September 25, 2020 @06:18PM (#24594693)
Since you mention IntelliJ, is it possible that the corporations you have worked in have been heavy on Java?

JDEE (http://jdee.sourceforge.net/) exists, but even I give up on Emacs when I want to write a lot of Java (and I use Emacs for literally everything else, including JS).

Re:Toward a “modern” Emacs by schwartzworld on Friday September 25, 2020 @06:31PM (#24594781)
JS development in IntelliJ/WebStorm is an amazing experience. The refactoring features alone make it easy to write code without worrying about details like "where does the file go" or "what should I name this". You can get the code working and rename / move code with a single click later on, knowing the refactor will propagate through the app.

The intellisense is amazing too. Start typing a method name and you see arguments with type annotations. it's overkill for scripting, but working on tangled legacy code it's very helpful.

Re:Toward a “modern” Emacs by xapata on Friday September 25, 2020 @08:24PM (#24595391)
I've heard people say that, but what I find is that they pick shitty names and never refactor. I'm on a different team now. Most of us use vim.
Re:Toward a “modern” Emacs by schwartzworld on Friday September 25, 2020 @08:58PM (#24595550)
Yeah, but then when someone tells you in code review to pick a less shitty variable name, it still takes one click.
Re:Toward a “modern” Emacs by xapata on Friday September 25, 2020 @09:06PM (#24595586)
Sadly, when you get a reputation for giving that feedback, people stop asking you to review.
Re:Toward a “modern” Emacs by schwartzworld on Sunday September 27, 2020 @09:20AM (#24606410)
Damn. You must work on a shitty team.
Re:Toward a “modern” Emacs by xapata on Sunday September 27, 2020 @03:45PM (#24609574)
I'm on a different team now.
Re:Toward a “modern” Emacs by elevader on Saturday September 26, 2020 @03:24AM (#24597035)
I don't do a lot of java development but https://github.com/emacs-lsp/lsp-java works really well for me.
Re:Toward a “modern” Emacs by User23 on Friday September 25, 2020 @11:56PM (#24596289)
I wouldn’t write Java in an editor that wasn’t hosted in the JVM. The advantages are simply too great. On the other hand that’s a very Lispy attitude so Emacs still influences me. And Eclipse at least has tolerable Emacs style bindings available. Still it sucks how much more of a PITA it is to create an Eclipse plug-in than to just write a page or two of elisp.
Re:Toward a “modern” Emacs by oaiey on Saturday September 26, 2020 @01:57AM (#24596740)
Same here. 20 years, Europe, corporate and open source projects, zero emacs users. Seen vim, notepad++, sublime, uedit, atom and vscode. And all types of fat ides
Re:Toward a “modern” Emacs by guenthert on Saturday September 26, 2020 @02:49PM (#24601187)
Yeah, we European Emacs users went to the states to earn real money :^)
Re:Toward a “modern” Emacs by oaiey on Sunday September 27, 2020 @02:08AM (#24604580)
Uh ... That was a punch. Love it :)
Re:Toward a “modern” Emacs by johnisgood on Monday September 28, 2020 @12:02AM (#24612843)
Well, one Eastern European Emacs user here. :D
Re:Toward a “modern” Emacs by formerly_proven on Saturday September 26, 2020 @06:07AM (#24597643)
I use Emacs for writing plain text because of Alt-q, and for tiny snippets. For coding I use real IDEs (JetBrains / Visual Studio) and can't be arsed to use a dumb editor, plus trying to configure to do "the right thing" w.r.t. to code style and indentation across a couple language is very annoying.