Live data from Hacker News

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

news.ycombinator.com

101–110 of 340 posts

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

#102

I would use a more mainstream dynamic language like python or lua rather than emacs lisp. It has to be dynamic and maintain the flavor of repl-driven development (the whole point of emacs is that it’s one big X repl where today X is emacs lisp). It doesn’t have to be a lisp though.

emacs-ng cites Deno, which speaks to your "more mainstream" as well as some of the sandboxing concerns offered by others https://github.com/emacs-ng/emacs-ng#denojavascript

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

#103

I would change the development platform. Doing everything by mail makes things more difficult for people that are not used to the older mail+patch workflow. Having something like GitLab or sourcehut would be nice, as it would also bring a more modern bug tracker. Personally I find following email conversations much harder than just a single conversation thread like in a GitHub issue, for example.

I recently learned FSF does have a GL instance but it seems to be locked down to just "approved" emails and also only used for its CI capabilities: https://emba.gnu.org/emacs/emacs/-/pipelines

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

#104
I think others have hinted at it, but for me any foundational application must be written in a statically typed language, but cannot be C nor C++ /me glares at Chromium

The bad news is that I don't currently have enough free energy to help the remacs nor emacs-ng projects, but I am glad they exist

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

#105
post #55

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…

I'm confused. On the modern devices I've recently used emacs on (including very low-powered raspberry pi devices), all of your three criteria are already true. What kind of HW are you running emacs on where this isn't the case?

Receiving output from a process, as is done for example by shell mode and (I guess, but have not verified) compilation mode, is slow in Emacs because all output is run through comint-carriage-motion and ansi-color-filter-region (which does nothing but throw color information away IIRC) which are written in Elisp.

If you don't run the output through those 2 functions, then non-printing characters remain in the output that severely undermine legibility.

C programmers tend to develop the ability to glean information from the voluminous output of build processes as it goes whizzing by on a terminal, so they find compilation mode frustratingly slow. Or at least that is my guess as to what happens.

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

#106
post #66
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 still annoys me slightly after nearly 20 years of using Emacs. In response to keypresses, it doesn't bother me too much, as I'm used to the Windows-style behaviour of PgUp/PgDn/etc. moving the caret, much as the Mac behaviour of not doing that is sometimes useful. 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…

> 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 unchanged.

> A value of nil means point does not keep its screen position except > at the scroll margin or window boundary respectively.

> A value of t means point keeps its screen position if the scroll > command moved it vertically out of the window, e.g. when scrolling > by full screens. If point is within ‘next-screen-context-lines’ lines > from the edges of the window, point will typically not keep its screen > position when doing commands like ‘scroll-up-command’/‘scroll-down-command’ > and the like.

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

#108
There's something about it where it doesn't feel quite right when using the mouse as a GUI app. Compare it to something like Sublime Text. I can't quite describe it exactly. It just feels off. It feels like you are supposed to use the keyboard shortcuts to navigate around, and the mouse is sort of bolted on secondarily or something. So I would try to make it feel more like a modern GUI app, where using the mouse feels right.

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

#109
post #19

Earlier quoted context omitted.

> If text in Emacs looked as pretty as text on the web does Do you have an example of this? I can't tell any difference for the fonts that I use (with emacs-pgtk). I believe Emacs uses Harfbuzz (same as Chrom{e|ium}).

Most of the text on the web for example is in a proportional-pitch typeface. Does your Emacs usually use a proportional-pitch typeface? If so and you're on Linux, I'll install the font you are using. I've tried using proportional typefaces in Emacs (on Mac), but there was something off, so I went back to monospaced. I could try again now that I have a Linux machine. The text in my Emacs looks almost exactly like the…

Pardon me if you're ahead of me on this, but it sounds like you might be using a proportional typeface as the default or fixed-pitch face. You should get nice-looking proportional type if you set the variable-pitch face to your desired typeface and enter variable-pitch-mode in the buffer. E.g.,

    (custom-set-faces '(variable-pitch ((t :family "Verdana" :height 180))))
And then in the buffer you wish to view with proportional type, M-x variable-pitch-mode.

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

#110
Many of the non-sarcastic responses here are subjective changes (scripting language, core plugins, alternative control schemes) that will change what Emacs is for other people.

But I think we can find a lot of agreement around launch speeds, latency, typography and similar.

Post reply on HN