Live data from Hacker News

Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

news.ycombinator.com

191–200 of 340 posts

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#191
I wish it were built with a very small, minimal core, that was just the TUI with the lisp machine like functionality, scriptable using R7RS scheme instead of elisp. And then everything else is built on top in a more modular fashion, with "battery packs" that install many modular components into one higher level functionality, like an IDE.

I'd like to eventually write something like this, there are a lot of things it would enable that you just can't do with emacs. It would be an emacs killer if implemented well, but it would also open up a whole new set of possibilities.

I don't know how far I'd get just working on it on my free time, which is competing for time with other projects. I'm looking for funding for these sorts of projects. If anyone reading this is an investor and interested in funding this sort of thing, please reach out.

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#192
post #178

Earlier quoted context omitted.

> I would like to see a dedicated new user/learner mode “To run the tutorial, start Emacs and type C-h t, that is, Ctrl-h followed by t.”[1] [1] https://www.gnu.org/software/emacs/tour/

That can be just put in the startup screen.

There is already a link to the tutorial on the startup screen.

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#193
post #47

I'd make cursors be positioned within the document instead of on the screen. Currently, Emacs does not support off-screen cursors. If you attempt to scroll a cursor off screen, it will move within the document to stay on screen. This behavior is contrary to all modern text editors, and there is no good workaround. I once made a serious effort to start using Emacs, but ultimately stopped because of the annoying cursor…

This might be a dumb question, but how would an off-screen cursor work in a terminal? According to my understanding of the way terminal emulators/ncurses work, the cursor must be positioned somewhere in the screen, even if it isn't visible.

I'd be happy to break terminal mode (which I almost never use) in exchange for getting this feature.

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#194
I would use Python as the extension language since it is omnipresent. ELisp has lots of terrible misfeatures that makes building large software in it difficult. I would also add better support for the services model. E.g., rather than adding spell-checking and syntax-highlighting modes you could defer those tasks to LSP servers.

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#195
post #47

I'd make cursors be positioned within the document instead of on the screen. Currently, Emacs does not support off-screen cursors. If you attempt to scroll a cursor off screen, it will move within the document to stay on screen. This behavior is contrary to all modern text editors, and there is no good workaround. I once made a serious effort to start using Emacs, but ultimately stopped because of the annoying cursor…

This might be a dumb question, but how would an off-screen cursor work in a terminal? According to my understanding of the way terminal emulators/ncurses work, the cursor must be positioned somewhere in the screen, even if it isn't visible.

ncurses lets you move the cursor to arbitrary positions, and also lets you hide it. And you can disable echo, so you can type without the cursor having any influence on what you see. This means you can treat the terminal cursor as though it's a software-rendered cursor in a GUI app and apply all the same rules. But nobody considered doing this when Emacs was first written (maybe it wasn't possible then), so the assumption that the cursor is always on screen is difficult to change.

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#196

Realize that VI was the superior editor, give up on the endeavor, print out the code I had already written for emacs, shred it, then set the shredder unceremoniously on fire. For those that downvote me, worth it.

Strategically thinking, after setting the shredder on fire it will be harder to shred the code of the future emacs clones! :D

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#197

Earlier quoted context omitted.

This might be a dumb question, but how would an off-screen cursor work in a terminal? According to my understanding of the way terminal emulators/ncurses work, the cursor must be positioned somewhere in the screen, even if it isn't visible.

I'd be happy to break terminal mode (which I almost never use) in exchange for getting this feature.

whereas I use emacs exclusively in terminal mode, and would be rather upset to it no longer supported :)

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#198
post #176
post #161

Earlier quoted context omitted.

> - Implement better sandboxing and security measures for extensions. Why, pray tell, should this be of any concern at all? Sandboxing is used when the host is concerned about running programs that he doesn't trust. There is no reason that an Emacs package would require security measures around it, unless it were knowingly potentially malware. The only reality in which I could see this is if people were using proprie…

Well, Emacs does ship with a browser (because of course it does, that kind of thing is what makes Emacs so amazing) and we all remember the XZ Utils near-backdoor, so I think that security measures would be useful for people who decide to use a less trustworthy archive like MELPA or who install extensions with package-vc.

Just create another user account and test your new stuff there.

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#199
post #188

Instead of making it just an elisp interpreter, make it a generic platform where you can interpret any language and have them with together. Make it Programming Language Macros, PLMACS. Kind of life a POSIXs standard. Or the Truffle framework.

Just use Acme under Plan9port. What you said it's the idea the plan9 guys had under to create a Unix 2.0 based 'Emacs' editor instead of vi and the pseudo graphical Sam.

Re: Ask HN: If you were rewriting Emacs from scratch, what would you do differently?

#200
post #188

Instead of making it just an elisp interpreter, make it a generic platform where you can interpret any language and have them with together. Make it Programming Language Macros, PLMACS. Kind of life a POSIXs standard. Or the Truffle framework.

That's bash

Plan9's Acme, literally. Unix philosophy scripting an editor in and out
Post reply on HN