Live data from Hacker News

Toward a “modern” Emacs

lwn.net

411–420 of 539 posts

Re: Toward a “modern” Emacs

#411

Earlier quoted context omitted.

> I think this statement is untethered from reality, and matches approximately zero people I know. Note that I'm referring to Visual Studio, not VS Code. In my last job, we didn't use any plugins with Visual Studio for a bunch of years before one developer convinced the rest to use Resharper. > Almost everyone using a text editor is using it for purposes which would definitely be helped by task-specific enhancements…

> a lot of people use Emacs for all kinds of things unrelated to programming: TODO management, document authoring, writing emails, etc. Those still need addons/plugins like org, mu4e or some other mail client, etc. This my point — not just a vanilla text editor.

Org is part of a standard Emacs install since version 24.

Re: Toward a “modern” Emacs

#412
post #64
post #28

I don’t know. I read the whole article and it seems the suggestions boil down to emacs needing to be more “modern” by defaulting to dark mode, making color theming easier, changing right click behavior, the menus, and changing the shortcuts. And the author of the article would like the development process to be more “modern.” Emacs is one of the most successful text editors of all time if not the most successful. It…

> It is widely used for a staggering array of tasks. Is it? What area are you in? In my hobbyist, college, and industry experience I've never seen anyone use emacs for anything. I have seen Vim (or at least vim bindings) a few times, but I only know of emacs from older unix discussions online. Edit: Looking through stack overflow developer surveys, emacs use is in 16th place for editor popularity at ~4.5% usage, but…

I've worked with many programmers who use Vim, although I've personally never grokked it.

I've used Emacs for years for editing/programming, running shells and reading news/email.

I've attended two universities in the UK and it was used by default for some of their programming/computational courses; this was in different departments (Physics and CS), a decade apart.

Emacs has been used to build user interfaces (e.g. ProofGeneral, which was the de facto interface for theorem provers like Coq and Isabelle for many years).

Some programming languages de-facto assume they're being written via their Emacs mode (notable Agda; similar to how some JVM languages assume they're being written in Eclipse or IntelliJ).

Years ago I inherited an academic research project which happened to be written entirely in Emacs Lisp.

Re: Toward a “modern” Emacs

#413

Earlier quoted context omitted.

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 cowo…

I am using Vim. Is it worth it to try emacs?

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

#414

Earlier quoted context omitted.

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 cowo…

I am using Vim. Is it worth it to try emacs?

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

#415
What Emacs needs is a better, clearner, more complete "standard library" and a better package and dependency management system both for applications and libraries. Sure MELPA is nice, and I use it a lot, but I do think there is room for improvement.

It also needs a better way to manage configuration both personal/local and collaboratively maintained ways of configuring the editor.

It needs "good idiomatic everything". Right now it is "half-assed everything". And while someone might take that as an insult, it isn't meant as one. It is meant as how I, someone who has used Emacs for 30+ years and still use it to write all my code, see Emacs. Every few years I try to update my Emacs setup (it is too painful to mess with regularly) and as I have less and less time to spend on this task, my Emacs setup isn't as functional as it used to be.

Which makes it more and more tempting to switch to an IDE. I want to write code. Not spend my afternoon Googling solutions to problems and trying to decide which solution will damage my current setup the least.

As for whether or not it needs a better Lisp implementation I can't really judge since I haven't written any Emacs extensions for nearly two decades. Nor would I say I am a sufficiently competent Lisp programmer to make that judgement.

Does Emacs need a new Lisp?

I think focus needs to be on how you can get Emacs to where it feels accessible and usable to a larger population of developers. Right now it has high barriers of entry and it doesn't feel like there is any obvious path to developing and distributing libraries, extensions and applications.

Compare this to VSCode which owes its success to Microsoft being able to leverage lots and lots of developers who feel at home. Yes, this is to a large degree because it is based on a more popular language, but also because the community around VSCode is bigger, produces more documentation, can provide more help, and is in general more approachable. Now you may like or dislike VSCode, but there is no denying that it is more successful in attracting developers than Emacs is.

(Note that I'm not interested in Dark Mode or cosmetics. That comes later)

Re: Toward a “modern” Emacs

#416
post #28

I don’t know. I read the whole article and it seems the suggestions boil down to emacs needing to be more “modern” by defaulting to dark mode, making color theming easier, changing right click behavior, the menus, and changing the shortcuts. And the author of the article would like the development process to be more “modern.” Emacs is one of the most successful text editors of all time if not the most successful. It…

> When I see a highly successful 40+ year old piece of software, my first instinct isn’t to ask what the people behind it can learn from me but what I can learn from them.

This is how incumbents die: when the fact that something has existed for a long time is taken as proof of it being at no risk of disappearing.

I used to work for a company that has been around for roughly 150 years. And it is precisely the attitude that "we've been around for 150 years" that made it blind to the fact that in the last 15 years, it has become a little bit less relevant every year because disruptors slowly eats away its market. In one sector the company would boast 3% growth year over year - while glossing over the fact that the sector had a growth of several hundred percent per year. You can have growth and at the same time lose market share at an astonishing rate.

This is kind of what happened to Emacs. There has been an astonishing growth in the number of developers over the past decades. Which means the "market" for editors and IDEs has exploded. And while more people may be using Emacs today than ever before, I would hazard a guess that the market share has gone down.

Re: Toward a “modern” Emacs

#417

Earlier quoted context omitted.

That's great and all, but people who are learning emacs for the first time don't know or care that it's one of the most successful text editors or that it's been around for 40 years. They care about being able to write code effectively. And emacs doesn't let users write code effectively by modern standards. Sure, after boatloads of configuration and tinkering it does, but it's unclear if it's worth it. Forking it is…

Yeah I think this is on point. The core maintainers are always kind of resisting changing things to more sane defaults, which is a pity. I recently had the experience of a friend of mine, a data scientist, tell me he tried to use emacs but just couldn’t get it to work. When I asked how he installed it, he was like “well I just downloaded it, and started tinkering a bit with my config”. After which he just ditched it,…

Great. Now where is the starter pack. Better with some lisp in a box etc. as well. I use lisp download with Mac because at least the key I know of. No strange key combination.

Re: Toward a “modern” Emacs

#418
I think Emacs is nearly perfect. I use it everyday at work for different tasks. But I can't seriously recommend it to anyone.

I'm looking at my configuration file now. It's 1300 lines of elisp. It took me 4 years to make it bullet-proof. I can't ask anyone to make that kind of investment just because I think Emacs is great.

Re: Toward a “modern” Emacs

#419
post #400

Earlier quoted context omitted.

Green on black was not exactly a “software default”. It was a physical property of the display hardware. Dark on light is at least thousands of years old, think of ink on papyrus in ancient Egypt.

I think we're talking about different things here. You're talking about the physical restrictions of the media, I'm talking about the defaults selected by software developers. My first computer could display dozens of colors, but defaulted to a dark background and light text. Windows 3.11 defaulted to black-on-white, on hardware from the same era. And now we're cycling back to defaulting to dark modes again.

You’re right; I was thinking of the text-only terminals that were widely used in the 70s and 80s. I believe those are where the green/amber/white on black aesthetic originated, because they couldn’t display anything else. But I could be wrong.

Re: Toward a “modern” Emacs

#420

Do the defaults in Emacs matter, at all? Doom Emacs, Spacemacs, and dozens of other default configs already exist. I've been using Emacs for years, I never learned the default keybindings. I used Evil mode right from the start. I just don't see this as a real problem. A small (incomplete) list of real problems: - No timeline on Wayland support, Wayland will likely require substantial work and refactoring. - Performan…

Wayland support is actually being actively worked on. It is done via "native" (no X widgets) GTK support. You can find it on: https://github.com/masm11/emacs The plan is to get that merged upstream at some point, you can find out more about it on the official mailing lists.

The GTK fork is great, but it’s so slow - especially on HiDPI displays.

I tried it out on my 4K monitor and I felt a noticeable increase in typing latency. It started to feel a lot more like VS Code.

Ultimately I was about to get HiDPI support working in Xwayland in Sway with a series of patches and I ran Lucid Emacs, which was much faster and made the latency increase go away entirely.

Post reply on HN