Live data from Hacker News

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

news.ycombinator.com

241–250 of 340 posts

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

#241
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…

Curious, why would it matter that the cursor stays where you were when paging down?

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

#242

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.

That just means you have not reached the point of understanding the philosophy of Emacs. Comparing Emacs and Vim with a one-sided perspective like yours is like saying that motorcycles are better than trains. Sure, they both serve the purpose of reaching from point A to point B, but there's a lot more to it than just that. Similarly, Emacs is far more than just a text editor. Vim's model of navigation is an amazing,…

> If you think that "VI is a superior editor than Emacs", I'm afraid you still have a shallow understanding of both.

Thank you for your long and thoughtful prose, so fitting for an emacs user. One day, when you value productivity, might I suggest VI.

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

#243

I don't care that much about the implementation, but I would like to see an emacs environment with: - instant startup - blazingly fast scrolling - minimal keypress-to-display latency I have written a lot of elisp (and had to deal with with buffer variables, dynamic scope, etc.), but aligning with modern scheme or lisp (if it can be kept compact and efficient) probably makes sense at this point. (Current emacs should…

> instant startup

My config is Doom-based. I use about 300 different third-party packages, and I don't even know how many built-in ones. It takes about 1.3s to start. Wishing for it to start even faster is like wanting my microwave to warm my tortilla in 5 seconds instead of 30. I don't restart Emacs every day, nor do I eat tortillas daily. Use a modern package-manager, and defer the loading of packages, it will start very fast - just like 'emacs -q' does.

> minimal keypress-to-display latency

A lot of times, setting keyboard rate is all it takes to make it nice,

On Linux: xset r rate 170 80

On Mac:

defaults write NSGlobalDomain KeyRepeat -int 1

defaults write NSGlobalDomain InitialKeyRepeat -int 10

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

#244
post #25

Earlier quoted context omitted.

All sensible email clients have a 'thread view' for just this purpose, which effectively makes it a 'single conversation thread'.

Yes, the Gmail web client does this. However my (personal) problem comes more from reading the emacs-devel archives, where the thread view takes the shape of something more like a tree (maybe I'm not configuring something correctly). I was subscribed to emacs-devel at some point (which made reading easier) but it started filling up my account storage so I un-subscribed.

Use https://yhetil.org/emacs-devel to browse the threads. If you use mu4e or notmuch and often delete some older emails locally, but still want to read the whole thread, you can write some elisp helpers that would find the thread on point (based on email-id) or even download the whole thread.

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

#245

Earlier quoted context omitted.

That just means you have not reached the point of understanding the philosophy of Emacs. Comparing Emacs and Vim with a one-sided perspective like yours is like saying that motorcycles are better than trains. Sure, they both serve the purpose of reaching from point A to point B, but there's a lot more to it than just that. Similarly, Emacs is far more than just a text editor. Vim's model of navigation is an amazing,…

> If you think that "VI is a superior editor than Emacs", I'm afraid you still have a shallow understanding of both. Thank you for your long and thoughtful prose, so fitting for an emacs user. One day, when you value productivity, might I suggest VI.

> Thank you for your long and thoughtful prose, so fitting for an emacs user.

Are you hinting at the fact that I used Emacs to help me write that? Sure I did. Why wouldn't I use Emacs for writing, if all the tools I need are at my fingertips? I have a thesaurus, spellchecking, Google Translate and search, dictionaries, etymology lookup, word counter, Flesch-Kincaid reading ease tester, ChatGPT, Anthropic and other models, dictation, formatter, and many more. Why would anyone ever exposed to that power willingly part with it?

> One day, when you value productivity, might I suggest

What point of "I'm saying this with confidence of a die-hard vimmer" was unclear? I already use both Emacs and Vim - they serve different purpose for me. And trust, me if YOU value productivity, one day you may wake up with realization - Emacs actually vims better than Vim.

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

#246

Earlier quoted context omitted.

> But for mouse wheel scrolling, which I do a lot - precisely because on Windows this typically does not move the caret! - having point follow along has never felt right. Iam pretty sure you can customzize that if you want. > scroll-preserve-screen-position is a variable defined in ‘C source code’. > Its value is ‘keep’ > Original value was nil > Controls if scroll commands move point to keep its screen position unch…

You’re misunderstanding. In those other apps the behavior is this: you open a document. You put the cursor on line 3 column 3. You use the mouse wheel or trackpad to scroll down to line 600. You hit cursor right. The cursor is now on line 3 column 4. In emacs the cursor would be somewhere around line 600 instead.

It should be possible to save the cursor position, hide it if it moves away from view during scrolling, and restore it back on any command but scrolling, or at least at the firs cursor-movement command.

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

#247
post #44

Use python instead of lisp.

Dear Cooking Show, I really liked your recipe for the shrimp-avocado salad, and I tried to make it, but since I was out of avocados I just substituted them with potatoes. Also, it turns out I didn't have any shrimp, so I just used some hot dogs I found in my freezer. OMG, this recipe is amazing. You just made my day.

---

That's what using X instead of Lisp to make "a better Emacs" sounds like, okay? Emacs is a Lisp-machine, it's built on top of Lisp, it needs Lisp to be Emacs. Otherwise it wouldn't be Emacs. Like at all. Don't be stupid, stop saying stupid shit like "python instead of lisp"...

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

#248
post #180

Earlier quoted context omitted.

Emacs runs on terminals too. If you want GUI's, you can choose Common Lisp with Lem and MCCLIM, or that newish web oriented GUI with a similar environment.

And so? Emacs GUI already does tons of things that don't work in terminal: - It can render different fontsets - PDFs - SVG and images - Emojis and file icons - Tooltips - Drag&Drop and better mouse support (scrolling, selection, etc.) I think it would be great to have a better GUI layer and native web-browser integration. Emacs' evolution doesn't have to be constrained by terminal limitations, and so far it doesn't s…

With xterm (Kitty, WezTerm, Alacritty) you can have good mouse support, hence you can have tooltip-like popups (AFAICT eldoc or lsp-ui-doc do it), and likely even drag and drop (never used it).

I suspect that with sixel support, and kitty image protocol support, images could be shown, too. At least, Eat, the elisp-based terminal.emulator, manages to show sixel graphics inside Emacs.

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

#249
post #32

Allow for user controllable window layout within the frame, objectively the editor's only significant drawback.

What are you talking about? Emacs has incredibly good window control. It is in fact so good, people decided to build window managers on top of Emacs - see EXWM. Yes, the customization is complex and very confusing for beginners, but the levels of control are all there.

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

#250

I'd rewrite in a Clojure-like language

I'd trade my dog to have Clojure-like maps and destructuring in Elisp. Comparing workflow with maps in Clojure and alist/plist in Elisp won't get any points to Elisp side.
Post reply on HN