Live data from Hacker News

Ghostel.el: Terminal emulator powered by libghostty

dakra.github.io

11–20 of 74 posts

Re: Ghostel.el: Terminal emulator powered by libghostty

#11
post #5

Earlier quoted context omitted.

Ghostel co-maintainer here: Understand if you don't have a repro, but if you ever have something actionable we'd love it if you filed an issue, or have the information get to us some other way. The junk at the top of the screen sounds like it could be https://github.com/dakra/ghostel/issues/495 and it should be fixed on later versions. But maybe you're seeing another bug. The tricky part is replicating the libghostty…

I also switched from vterm and ghostel is much more responsive for me. Thanks for maintaining it! I use it everyday. I do see a similar issue, where when I switch to the ghostel buffer and it wasn’t visible before, the text is scrambled. I’ll check if I can find a way to reliably reproduce it.

This is a known issue that I've been chasing myself. It most likely has to do with the fact that we cannot render hidden buffers (for reasons) so when the buffer reappears again, we have hooks to refresh it. But sometimes it fails to refresh fully.

When are you mostly seeing this? With agent TUIs?

Re: Ghostel.el: Terminal emulator powered by libghostty

#12
post #7

Hi! Maintainer of Ghostel here. baokaola and I actually wanted to do a "Show HN" next week, but looks like someone was faster submitting the link. Have a look at the GitHub repo which is a bit nicer for a quick overview: https://github.com/dakra/ghostel To add some context, Ghostel is a terminal emulator for Emacs powered by libghostty-vt. There's a feature comparison vs vterm and eat: https://dakra.github.io/ghostel…

Hi dakra!

> is there something Ghostel is missing

eshell allows me to manipulate text as I would in any other Emacs buffer. If I have a function which wraps a word in quotes, and bind it to a key, I can be confident it will work in eshell like it does anywhere else. It's a real killer feature. If I use evil-mode, or xah-fly-keys, or simply want to use ispell to correct the spelling of a word, it all works.

Unfortunately with Ghostel none of this works. It's not integrated in the same way. There are extensions like evil-ghostel-mode, but they are limited.

Are there any plans to improve this, or is it a limitation Ghostel has to live with?

A Ghostel equivalent of eat-eshell-mode would be amazing.

Re: Ghostel.el: Terminal emulator powered by libghostty

#15
post #14

Question: if I don't use TUIs or millions of lines of scrolling text, what am I missing by not using these newer terminal implementations? I use mintty on Windows and am pretty happy with it.

Honestly not sure. I used ghosty and others for awhile but had continuous issues of it not passing a compatible term variable so a lot of tuis would break.

Re: Ghostel.el: Terminal emulator powered by libghostty

#16

I think the title should mention Emacs somewhere. A terminal emulator is different than a terminal emulator for Emacs.

I agree.

And I would also prefer if the link went to https://github.com/dakra/ghostel instead of the documentation which is not that helpful if you don't know what the project is.

Re: Ghostel.el: Terminal emulator powered by libghostty

#17
post #7

Hi! Maintainer of Ghostel here. baokaola and I actually wanted to do a "Show HN" next week, but looks like someone was faster submitting the link. Have a look at the GitHub repo which is a bit nicer for a quick overview: https://github.com/dakra/ghostel To add some context, Ghostel is a terminal emulator for Emacs powered by libghostty-vt. There's a feature comparison vs vterm and eat: https://dakra.github.io/ghostel…

How was integration for you guys? Was the integration easier for you guys since you have an established emacs system consuming terminal output with reasoned semantics over what goes where for existing subsystems (rendering, osc codes, etc)?

For libghostty-vt, since you're targeting a terminal TUI instead of an external subsystem (for example; for ghostty, you hit libghostty-vt -> GPU rendering, which is external), you still have to buy into terminal semantics. in my experience, since I was trying to replicate mosh with libghostty-vt as the parser, what happened was that my optimized re-rendering kept getting increasingly coupled to terminal semantics (and the UDP state update model too), otherwise I'd have to send the entire terminal grid over the network like, every time.

What are the tricks for making this both performant and not like, utter cancer? You have a harder issue here too (similar to tmux) in that certain optimizations are just not available to you, or you have to translate (literally geometrically) certain instructions

Re: Ghostel.el: Terminal emulator powered by libghostty

#18
post #14

Question: if I don't use TUIs or millions of lines of scrolling text, what am I missing by not using these newer terminal implementations? I use mintty on Windows and am pretty happy with it.

Exactly as you say, the greatest difference with the recent generation of video terminal emulators that use the GPU through OpenGL or the like, is the much greater rendering speed, which becomes very noticeable with millions of lines of scrolling text, especially if you use high-resolution monitors.

Unfortunately, millions of lines of scrolling text are no longer unusual, especially when you frequently compile big software projects. The use of high-resolution monitors has also been normal for many years.

Instant window rendering is addictive, so now I would never return from a fast terminal emulator like ghostty to an older video terminal emulator. The last terminal emulator that I had been using before ghostty was kitty, which was also pretty fast in comparison with traditional terminal emulators, but I like ghostty more.

Re: Ghostel.el: Terminal emulator powered by libghostty

#19
post #12
post #7

Hi! Maintainer of Ghostel here. baokaola and I actually wanted to do a "Show HN" next week, but looks like someone was faster submitting the link. Have a look at the GitHub repo which is a bit nicer for a quick overview: https://github.com/dakra/ghostel To add some context, Ghostel is a terminal emulator for Emacs powered by libghostty-vt. There's a feature comparison vs vterm and eat: https://dakra.github.io/ghostel…

Hi dakra! > is there something Ghostel is missing eshell allows me to manipulate text as I would in any other Emacs buffer. If I have a function which wraps a word in quotes, and bind it to a key, I can be confident it will work in eshell like it does anywhere else. It's a real killer feature. If I use evil-mode, or xah-fly-keys, or simply want to use ispell to correct the spelling of a word, it all works. Unfortunat…

Did you see ghostel line-mode? This basically gives you a `M-x shell` experience where everything is a buffer and nothing is send to the terminal until you press enter.

There you could type on the prompt line and then call jinx or your quote wrapping function etc as it's just a normal Emacs buffer. You can't edit the scrollback buffer though, but I don't think that's possible in eshell either.

But line-mode has it's own set of problems. Since we don't send anything to the shell, you could have some problems with autocomplete or similar things that change the text depending on each typed char. Similarly we automatically disable line-mode when you enter a TUI (alt-screen) app, as line-mode doesn't make too much sense in e.g. vim. But that's configurable and you can still force line-mode, it really depends on the TUI apps.

We try to support as much as possible and work around things like fish autocomplete etc. But please try and report any issues you find.

Post reply on HN