Live data from Hacker News

Ghostel.el: Terminal emulator powered by libghostty

dakra.github.io

51–60 of 74 posts

Re: Ghostel.el: Terminal emulator powered by libghostty

#51

Earlier quoted context omitted.

.el = emacslisp file extension

If you say so. I didn't know that, which supports the suggestion that the title fails to be meaningful. It's not the same as expecting the reader to know what a terminal is, just in case anyone was thinking of going there next.

> the title fails to be meaningful

It's a weird flex to insist that the titles should always be extremely descriptive. It is already meaningful for the respected audience. Otherwise you can endlessly argue that a florist may not understand what "terminal" and "emulator" are, therefore it should be more descriptive for an occasional florist vising HN. For anyone who doesn't know what .el stands for, they'd click, see it's about Emacs and if not interested - close the tab and forget about it. Takes maybe a second. Not even a smallest imaginable deal - not big at all.

Re: Ghostel.el: Terminal emulator powered by libghostty

#52
It would be nice to have some practical examples of how efficiently use its different input modes. On the surface the reasoning is straightforward - a terminal wants every keystroke. The editor also wants keystrokes for its own commands. These two desires are irreconcilable, so any editor-embedded terminal must have a way to switch "who owns the keyboard." That switch is a mode. There is no escaping it.

But like people coming to Emacs from Neovim may get confused why is nvim +term has only two modes, but this one has 5, what's the point? Without clearly understanding the problem, the knee-jerk reaction might be "this thing is an over-engineered BS", while in truth Ghostel isn't more complex because it's over-engineered - it's more complex because it solves more of the problem - the extra modes are opt-in tools for tasks nvim simply doesn't address. But it's not super clear how in practice use that leverage efficently.

Re: Ghostel.el: Terminal emulator powered by libghostty

#53
post #48

Thank you so much for building this. I've been wanting something just like this and I'm trying it now and it's amazing. I was struggling with vterm and now this might become my daily driver.

It's legit nice. I have gone through vterm -> eat -> ghostel transition and this is a winner. At least for now.

Re: Ghostel.el: Terminal emulator powered by libghostty

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

Yeah, Ghostel works great for me so far!

Two things: - defined f1 to toggle between semi-char vs copy modes - I ask myself "Is it ok if Emacs dies or I nuke it?" If not, then I execute a command in the normal terminal

Re: Ghostel.el: Terminal emulator powered by libghostty

#56
Does ghostty have any features that makes it better than kitty in anyway? I keep seeing this all over the place, but I still don't understand why it's better than existing options.

Can someone help who's used both help me, what's the elevator pitch for this, why is it worth checking out?

Re: Ghostel.el: Terminal emulator powered by libghostty

#57
post #39

Earlier quoted context omitted.

Huh is that true? Does running a command in a terminal buffer block all of EMacs? That's extremely surprising, the main use of these kinds of integrated terminals for me is to compile and run which means long running commands. Is this use case fundamentally not supported due to EMacs's architecture?

No, running a command in a terminal buffer doesn’t block the emacs UI, but a long running bit of elisp running in emacs can block the UI.

Surprised we haven't seen an LLM-rewrite to rewrite of emacs yet!

Re: Ghostel.el: Terminal emulator powered by libghostty

#58

Downloading a compiled module is a huge negative in the age of supply chain attacks; you're begging to get compromised.

This is just optional.

I explained why it's not in the package in https://news.ycombinator.com/item?id=48881722

For all Emacs package updates, it's best of course to check the source what's changed and then you can compile yourself.

PS, I also think Emacs is one of the few ecosystems where people actually check what changed. It's not like npm where you have a million of deps unreviewed pulled in.

Personally I use borg and always at least quick check what changed, and most Emacs package managers have a similar feature.

Re: Ghostel.el: Terminal emulator powered by libghostty

#59

It would be nice to have some practical examples of how efficiently use its different input modes. On the surface the reasoning is straightforward - a terminal wants every keystroke. The editor also wants keystrokes for its own commands. These two desires are irreconcilable, so any editor-embedded terminal must have a way to switch "who owns the keyboard." That switch is a mode. There is no escaping it. But like peop…

True. I'll have to update the documentation with some examples (and/or make a video?).

I know you know them but I list the 5 modes quick here for readers:

- semi-char: The default, where most keys go to the terminal but some common Emacs prefixes (M-x, C-c) go to Emacs

- char-mode: ALL keys go to the terminal. This way you can run e.g. Emacs inside Emacs.

- copy-/emacs-mode: This makes the whole buffer a pure read-only Emacs buffer and all keys go to Emacs. The difference between copy and emacs-mode is that copy freezes the terminal output (comes originally from vterm), while in emacs-mode new output keeps coming in (adopted from eat).

- line-mode: It's like `M-x shell`, everything goes to Emacs but it's not read only but you can type text on the prompt. But nothing is send to the terminal until you press return.

> why is nvim +term has only two modes, but this one has 5

I haven't used the neovim terminal, but I guess you can compare vim insert-mode with semi-char and normal-mode with copy-mode. And surely they have a char-mode as well, or can you not run nvim inside nvim (without having to press some quote key all the time)?

That would leave only line-mode as the odd one out.

> But it's not super clear how in practice use that leverage efficently

As with all Emacs things, that's highly personal.

Currently, I use semi-char mostly and switch to copy-mode to select/copy stuff.

Very rarely do I use char or line-mode.

Re: Ghostel.el: Terminal emulator powered by libghostty

#60
post #56

Does ghostty have any features that makes it better than kitty in anyway? I keep seeing this all over the place, but I still don't understand why it's better than existing options. Can someone help who's used both help me, what's the elevator pitch for this, why is it worth checking out?

Having used it for three weeks before coming back to Kitty, my conclusions were that it’s a better terminal for people who need a terminal but don’t ‘live in’ their terminal. Ghostty just feels really polished and ‘native’ and it’s obviously faster than, say, iterm or the stock term on macOS. So Ghostty is what I would now recommend to anyone who just wants a nice terminal without the goal of turning it into a highly personalized IDE, like Kitty allows you to do.

The only feature of Ghostty that I now miss in Kitty: setting the text size of each window pane independently. Oh and the slightly smoother quake terminal, even though I don’t use that much.

Ghostty makes some choices that I personally find bizarre. For one, on macOS, cmd+, opens config in textedit instead of in $EDITOR. Another is there isn’t a key action for moving panes; you need to use the mouse. At least half of the config options are platform-specific. And weirdest of all scripting is limited and can only really be done with (get this) AppleScript.

So, like I surmised (and I could be wrong, of course), Ghostty is just a nice terminal that lives alongside your other apps; Kitty is powerful enough to practically act like a second desktop environment (that is also cross-platform).

Of course, this post is about libghostty, the underlying term emulator library. And that is an amazing contribution to the ecosystem! Zmx, herdr, soon neovim, now emacs, hopefully someday Zed – so many things can now embed an amazingly performant terminal

Post reply on HN