News for hackers. Stuff that matters.
Re:Making Emacs Popular Again (2020) by kqr on Thursday November 04, 2021 @09:39AM (#29107014)
This sounds like it's not written by an actual Emacs user... and the fact that I can tell points to the real fundamental problem of Emacs: it's not a text editor but the real thing it is is so complicated it finds it easier to market itself as a mere text editor.

What is Emacs really? It's a virtual Lisp machine with a standard library for writing graphical text applications. It's more like the JVM than like Notepad.

It just happens to come bundled with a text editor (and a file manager, and a calculator, etc) as example applications. You're free to install a better text editor than the bundled example, and many people to (see the popularity of Evil, for example).

But of course, this is a much more complicated point in space to sit in, so Emacs markets itself primarily as a text editor and we get confusion like yours as a result.

Re:Making Emacs Popular Again (2020) by krylon on Thursday November 04, 2021 @11:16AM (#29108235)
This is something I wish someone had told me 20 years ago when I first started using emacs. The whole "it's a text editor, but also it's not really a text editor"-thing was very confusing initially.

... Although, now that I think about it, being told this mind-blowing revelation about the emacs nature might have confused me even more.

What I love about emacs is that I have a variety - an extensible variety! - of programs under one roof, so to speak, sharing the same - customizable! - keyboard shortcuts that comfortably integrate with each other.

I think the main problem in "proselytizing" emacs to potential new users is that it is kind of the C++ of text editors, in the sense that it takes a very big up front investment that does pay off in a big way if you persist, but getting to that point took - at least for me - a multi-year commitment. It is hard to sell someone on that unless they want to do it anyway. I did it out of fun and curiosity, but if you view it as an investment in purely transactional terms, it's hard to sell.

Re:Making Emacs Popular Again (2020) by chipotle_coyote on Thursday November 04, 2021 @11:45AM (#29108614)
You just succinctly described why my annual attempts to learn Emacs never actually go anywhere. As much as I like the idea of an all-purpose text processor construction kit, even with "starter kits" I spend a week trying to configure various languages to a point that I'm happy, find myself copying, pasting and tweaking Lisp code, invariably find weird conflicts that lead me to do web searches (which may find more Lisp code, which may be a decade out of date), and so on. I don't doubt that if I kept at it I'd eventually reach nirvana, but I frequently find myself thinking "this was just so much easier in Vim" -- and any time anything can be described as "easier in Vim", it feels like a sign of a UX problem. :)
Re:Making Emacs Popular Again (2020) by krylon on Thursday November 04, 2021 @03:28PM (#29111504)
sigh

I cannot blame you. And if vi makes you happy, I want you to enjoy the heck out of it. Between discovering emacs and making it my editor of choice I spent a few years using vi heavily, and to this day, I reflexively use it for quickly editing config files.

Regarding emacs, all I can say is that, in my experience, it gets better if you really stick with it for a while. The payoff is huge if you put in the time. But time is limited resource, vi gives you a payoff much faster, so ... like I said, if it works you, don't fix what ain't broken.

I love Emacs, but I also love the variety of editors programmers can choose from. With programmers' editors, as with society as a whole, I consider diversity an advantage.

Re:Making Emacs Popular Again (2020) by hosh on Thursday November 04, 2021 @06:06PM (#29113074)
Does that include Spacemacs? It didn't take me a week to get up and running from switching from vim.
Re:Making Emacs Popular Again (2020) by chipotle_coyote on Friday November 05, 2021 @05:01PM (#29124704)
It does, although I've gathered that I managed to try my last attempt during a period when the released version was unusually buggy around the margins. What I'd frequently find was variants of what usually happened to me with Emacs: (1) find something that wasn't enabled that I wanted to do that could (apparently) be solved by enabling a layer (or installing a package or two), (2) enable that layer (or install that package or two), (3) immediately be confronted with unexpected error messages, (4) go on a bug hunt in which at least half the web search results were variants of "I ran into these unexpected error messages, how can I fix this".

My impression -- obviously as an outsider! -- is that Emacs' immense flexibility comes at the cost of providing a lot more surface area for packages to get in one another's way. When that happens, you need to be willing and able to untangle things -- and while each individual tangle is rarely a big ask, they can add up, especially when you're coming from VSCode or Sublime Text or what have you.

Re:Making Emacs Popular Again (2020) by jimbokun on Thursday November 04, 2021 @09:45AM (#29107093)
> What is Emacs really? It's a virtual Lisp machine with a standard library for writing graphical text applications.

If you substitute Javascript for Lisp, doesn't that describe Visual Studio Code pretty well?

So now there's a product that leverages the architectural advantages of Emacs, with modern defaults across the board.

Re:Making Emacs Popular Again (2020) by kqr on Thursday November 04, 2021 @09:59AM (#29107259)
I haven't personally used VS Code much, but from what I understand, it still runs in two castes that don't, generally, mix: there's its core code, and then there's plugins, and the latter exists on a separate plane from the former. You can't write a plugin that redefines some core behaviour. The functions internal to the core are not all automatically accessible for any plugin. Plugins don't become fully integrated with the core code to the point where the source file location is your only hint as to whether behaviour comes from a plugin or core functionality.

(A non-Emacs user might very well go "Emacs plugins can do what now?" at the description of a plugin re-defining a core function. That's a fully understandable reaction. That level of hackability is not for everyone. But as far as I can tell, it's unique to Emacs and very small set of other software.)

But I could be misunderstanding this. Maybe VS Code actually does have Emacs-level hackability, in which case I'd probably want to try it out more than I have!

Re:Making Emacs Popular Again (2020) by m45t3r on Thursday November 04, 2021 @10:45AM (#29107844)
Yeah, exactly. For example, evil-mode is still miles better than VSCode Vim plugins just because it works everywhere. Any buffer that my Emacs opens I can still use my Vim shortcuts (so it doesn't change that I open a text, a binary, file manager, a fuzzy search or PDF). Compared to this, on VSCode I basically need to explicitly say "make vim commands do this in this context" for everything I need.
Re:Making Emacs Popular Again (2020) by deviaan on Thursday November 04, 2021 @11:37AM (#29108508)
My current client wants all of us to standardize on VS Code at some point, and this is by far the most annoying thing for me. I hate that if I leave the editor, it goes back to a mouse-driven design. I'm glad to hear you can change the behavior, so I guess I'll just have to do that at some point to make it work for my needs.
Re:Making Emacs Popular Again (2020) by 1ark on Thursday November 04, 2021 @10:41PM (#29114909)
This is the main reason I changed and do most of my work in Emacs, keyboard only. Using it in terminal is a bit of a bonus. Onivim2 seems promising in bridging the gap, but we'll see.
Re:Making Emacs Popular Again (2020) by vintermann on Thursday November 04, 2021 @10:21AM (#29107531)
No, I do not go "Emacs plugins can do what now". I rather go, "and that is supposed to be a good idea?". If you want to use Emacs as an OS, doesn't protected mode seem like a desirable feature?
Re:Making Emacs Popular Again (2020) by kqr on Thursday November 04, 2021 @10:54AM (#29107955)
From personal experience, I've benefited way more from that than I've been hurt by it. Whether that's true for all people I don't know.

Of course, you're not supposed to do it other than very carefully and it has caused me problems when some plugin has made a mistake in a way that worked for the original author but not for me, but because of the openness of the system, it's fairly easy to "overwrite it back" automatically when the plugin is loaded – and submit a patch back upstream.

So maybe this sort of system works only when a large portion of the users are hackers, and making Emacs more popular is not a good idea!

Re:Making Emacs Popular Again (2020) by hollerith on Thursday November 04, 2021 @09:49AM (#29107148)
Unless I was very unlucky in my decisions about what and how to learn about vscode or my ability to learn has dropped more than 10-fold between the time I learned to modify Emacs and the time I tried to learned to modify vscode (which is unlikely but not impossible: it was an interval of 28 years) emacs is much easier to learn to modify than vscode is unless one is already a web dev.

Of course, if one does learn how to modify vscode, one has a skill (namely, web dev) in much higher demand on the labor market than knowledge of Emacs Lisp.

Re:Making Emacs Popular Again (2020) by NoGravitas on Thursday November 04, 2021 @10:19AM (#29107507)
> If you substitute Javascript for Lisp, doesn't that describe Visual Studio Code pretty well?

Almost, but not quite. VSC doesn't give you javascript access to the internals of the application, it just provides a fairly broad set of extension APIs. You can see this in how the VSC equivalent of rainbow-delimiters-mode (parentheses and brackets recolored based on their nesting depth) had to be rewritten as part of the core application for performance reasons. This wasn't necessary for emacs.

Re:Making Emacs Popular Again (2020) by convolvatron on Thursday November 04, 2021 @10:34AM (#29107697)
I'm doing a highly integrated language environment for a research language and faced this decision recently.

elisp and javascript are both pretty iffy lisps, but at this point I think I'd prefer javascript.

however VSCode presents an API around a specific notion of what a language is and how it interacts with the editor. emacs comes in at lower level and presents a model with just buffers and text.

I remember elisp debugging as being a joy - not really finding that to be true. but I really don't want to be limited by what the VSC designers thought I should want to do with source files - actually I don't want to use source files at all.

Re:Making Emacs Popular Again (2020) by b3morales on Thursday November 04, 2021 @12:07PM (#29108892)
> VSCode presents an API around a specific notion of what a language is and how it interacts with the editor

I would say Emacs has this as well, in its syntax tables. They are its schema for "what a language can be" and especially "how the editor can interact with it".

Re:Making Emacs Popular Again (2020) by convolvatron on Thursday November 04, 2021 @12:53PM (#29109555)
yes - but those are completely optional
Re:Making Emacs Popular Again (2020) by kqr on Thursday November 04, 2021 @03:34PM (#29111570)
That is true of any editor: they will only seeem intelligent if you ask them about the languages they have support for.
Re:Making Emacs Popular Again (2020) by vintermann on Friday November 05, 2021 @04:29AM (#29116720)
By its nature software designers have to make some decisions on what should be easy, what should be possible and what you'd be better off using some other app for.

If you're on something as radical as not using source code to describe a program (what are you using then? A DB of some sort?), I don't think either emacs or vscode can be your tool of choice.

We know there's no free lunch, if an extensible development environment was flexible enough to make this sort of thing easier, something else had to be made harder.

Re:Making Emacs Popular Again (2020) by slightwinder on Thursday November 04, 2021 @05:46PM (#29112898)
Emacs is not that much different there with it's C-core and lisp-land. It had even a similar case with the reimplementation of linenumber-mode in C for performance-reasons. The question is more what emacs can offer generally that vscode is lacking in ability, even just theoretically. Because in reality there are of course many features not implemented yet in vscode.
Re:Making Emacs Popular Again (2020) by Mikeb85 on Thursday November 04, 2021 @10:27AM (#29107613)
> If you substitute Javascript for Lisp, doesn't that describe Visual Studio Code pretty well?

For the most part, except for the fact VSCode is owned by MS and has just enough proprietary code to break a lot of functionality if you try to use it without the proprietary bits.

Re:Making Emacs Popular Again (2020) by warkdarrior on Thursday November 04, 2021 @02:03PM (#29110518)
> For the most part, except for the fact VSCode is owned by MS and has just enough proprietary code to break a lot of functionality if you try to use it without the proprietary bits.

That's a personal policy choice, not a technical concern.

Re:Making Emacs Popular Again (2020) by Mikeb85 on Thursday November 04, 2021 @02:25PM (#29110769)
Let's face it, the fact it's free software is the reason it's used at all, the reason it's been hacked on by so many people, etc... It's always relevant to discuss it's free nature, especially when discussing it's popularity.
Re:Making Emacs Popular Again (2020) by eadmund on Thursday November 04, 2021 @10:46AM (#29107859)
Ah, but Javascript is a profoundly terrible language to do anything in, while Lisp is a joy to write in.

Being a Lisp machine is core to the value of Emacs. Emacs-without-Lisp is just another editor.

Re:Making Emacs Popular Again (2020) by Steltek on Thursday November 04, 2021 @11:56AM (#29108749)
eLisp? Where lexical scoping is this brand new feature that generates compiler warnings? Where the UI thread is the same as your eLisp thread? Where multiprocessing is a super clunky fork-exec with a weird side buffer? Where a simple regular expression works differently between what the user invokes and how you'd write it in a function?

Yeah, it's a super joy to write.

Re:Making Emacs Popular Again (2020) by r-zip on Thursday November 04, 2021 @01:44PM (#29110293)
As someone who uses Emacs and likes writing lisp, 100% agree. elisp is without a doubt the worst lisp still in common use.
Re:Making Emacs Popular Again (2020) by oblio on Thursday November 04, 2021 @12:14PM (#29108987)
It is a joy. When writing code in the ivory tower :-)
Re:Making Emacs Popular Again (2020) by foldr on Thursday November 04, 2021 @03:05PM (#29111230)
Elisp arguably has worse warts than Javascript. For example, non of Javascript's legacy 'var' scoping nonsense compares to elisp's archaic model of using dynamic scope for everything by default. On top of that, modern Javascript implementations are of extremely high quality, whereas Elisp is stuck with an interpreter of mediocre performance.
Re:Making Emacs Popular Again (2020) by spiderice on Thursday November 04, 2021 @11:12AM (#29108188)
> Javascript is a profoundly terrible language to do anything in

Makes it really hard to take anything you say seriously when you reveal just how ok with extreme hyperbole you are

Re:Making Emacs Popular Again (2020) by Zababa on Thursday November 04, 2021 @11:39AM (#29108534)
What do you find profoundly terrible about JavaScript?
Re:Making Emacs Popular Again (2020) by edgyquant on Thursday November 04, 2021 @01:13PM (#29109851)
I disagree, I like JavaScript
Re:Making Emacs Popular Again (2020) by Zababa on Thursday November 04, 2021 @11:38AM (#29108523)
Not exactly, VSCode is more of an editor that can accept very advanced plugins. The "virtual JavaScript machine with a standard library for writing graphical (text) applications." is a web browser.
Re:Making Emacs Popular Again (2020) by krylon on Thursday November 04, 2021 @11:21AM (#29108314)
I have not played with VS Code a lot, but I get the impression that, yes, they aim for something similar. I'm not qualified to judge, though, how successful they are so far.

FWIW, when I hear people talk about VS Code, they appear to like it very much. But AFAICT, it has some way to go to catch up with all the functionality emacs has accreted over 30+ years.

Also, there is an effort replace the old lisp engine inside emacs with GNU Guile, which is a JIT compiler that supports Scheme, ELisp, and Javascript. I have not tried it so far, but it might become possible to customize and extend emacs with Javascript in the not-so-distant future.

Re:Making Emacs Popular Again (2020) by oblio on Thursday November 04, 2021 @12:17PM (#29109031)
Isn't the Guile effort practically dead? I remember hearing about it 10 years ago.

It was actually started in 2000 and doesn't seem to have progressed since 2014: https://emacsninja.com/posts/state-of-emacs-lisp-on-guile.ht...

Plus, even if it's finished, will it get any traction in the ecosystem? Will the ecosystem start moving to it to take advantage of its unique benefits? Who knows?

Bonus: Have you heard of GNU Hurd? :-)

Re:Making Emacs Popular Again (2020) by krylon on Thursday November 04, 2021 @12:41PM (#29109366)
I honestly don't know about the state or progress of Guile Emacs. I know it exists, but I haven't followed it beyond that.

Assuming it gets "finished" (is any software ever finished?), it should be no-brainer as long as it provides backward compatibility with old elisp code. And open up the emacs ecosystem to Scheme and Javascript, which could make it much more attractive to newcomers. But, as they say, I'll believe it when I see it.

The trouble with Hurd, IMHO, is that I've run out of jokes. We used to joke that it would run Duke Nukem Forever out of the box, but that one actually got finished. Then it was Perl 6, but that has arrived, too. Star Citizen maybe?

Re:Making Emacs Popular Again (2020) by r-zip on Thursday November 04, 2021 @01:45PM (#29110301)
Yes, Guile Emacs got abandoned, at least the last time I checked.
Re:Making Emacs Popular Again (2020) by stjohnswarts on Thursday November 04, 2021 @09:03PM (#29114334)
Is that like what the GCC-emacs project is doing with libgccjit? They are working (and have a great start on it) version of compiling most (all?) elisp with libgccjit to speed things up a bit if I understand it correctly. I have compiled it myself and it is most certainly faster to load and do "intensive" tasks faster than stock emacs. I've loaded both DoomEmacs and SpaceEmacs successfully with it.
Re:Making Emacs Popular Again (2020) by bigbillheck on Thursday November 04, 2021 @02:22PM (#29110738)
In a couple months I'll have been using emacs for 30 years, and it seemed like a pretty good summary to me. In that time the closest I've gotten to using any of the lisp stuff is setting some variables in my .emacs file. (and it's been fewer of those as the year go by)
Re:Making Emacs Popular Again (2020) by vintermann on Thursday November 04, 2021 @10:14AM (#29107441)
I never claimed to be an emacs user. I've used Linux exclusively at home since 2001, and I've never "switched" to it or vim, though of course I have a passing familiarity with both from such things as certifications or working on other people's machines.

Of course I'm familiar with the "never leave emacs" meme, moon phase indicators and "what it needs is a good editor" etc. I even gave an example of it being used as a platform in my other comment here (proof general).

But this was about its popularity relative to other editors, not relative to other scriptable framework things.

Re:Making Emacs Popular Again (2020) by varjag on Thursday November 04, 2021 @10:24AM (#29107582)
Thing is the difference between Emacs undo tree and …other editors undo is way more than the key binding. Your comment barely scratches the surface of the issue.
Re:Making Emacs Popular Again (2020) by srcreigh on Thursday November 04, 2021 @12:05PM (#29108864)
It's an early web browser. Elisp is an early JS. Viewing documents is just a little more complicated (download packages, sync stuff down using Git, etc)
Re:Making Emacs Popular Again (2020) by kamaal on Thursday November 04, 2021 @10:17PM (#29114749)
>>What is Emacs really? It's a virtual Lisp machine with a standard library for writing graphical text applications. It's more like the JVM than like Notepad.

Well then in that case, ship a better Lisp than emacs lisp?