Add projectile-run-ghostel project terminal commands#2022
Merged
Conversation
Wire the ghostel terminal emulator (https://github.com/dakra/ghostel) into the C-c p x prefix, mirroring the existing vterm/eat integration: * projectile-run-ghostel (x G) and projectile-run-ghostel-other-window (x 4 G), backed by a shared projectile--ghostel helper. * Load ghostel lazily via `require ... noerror`, so it stays an optional dependency like vterm and eat. * Add entries to the transient menu and the Run... easy-menu. * Document the commands in usage.adoc, projectile_vs_project.adoc and the changelog. The helper let-binds `ghostel-buffer-name` to a project-scoped name; declare that external variable special so the binding is dynamic under lexical-binding. ghostel reuses buffers by stored identity, so reuse keeps working even after it retitles the visible buffer.
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wire the ghostel terminal emulator (libghostty-powered, a faster mouse-capable alternative to vterm/eat) into the
C-c p xprefix, mirroring the existing vterm/eat integration:projectile-run-ghostel(x G) andprojectile-run-ghostel-other-window(x 4 G), backed by a sharedprojectile--ghostelhelper.require ... noerror, so it stays an optional dependency just like vterm and eat (no change toPackage-Requires).transientdispatch menu and theRun...easy-menu.usage.adoc,projectile_vs_project.adoc, and the changelog.Implementation notes
ghostel's entry point(ghostel &optional arg)creates its buffer from the dynamic value ofghostel-buffer-nameand reuses buffers by a stored identity rather than the live buffer name — so reuse keeps working even after ghostel asynchronously retitles the visible buffer (OSC 2 / OSC 7). The helper therefore justlet-bindsghostel-buffer-nameto a project-scoped name (viaprojectile-generate-process-name) insideprojectile-with-default-dir, the same shape asprojectile--eat.ghostel-buffer-nameis declared special with a valuelessdefvar(next to the existingeat-buffer-name/eshell-buffer-namedeclarations) so thelet-binding is dynamic under lexical-binding.Testing
emacs -Q --batch -L . -f batch-byte-compile projectile.el— clean, no warnings.x G→projectile-run-ghostel,x 4 G→projectile-run-ghostel-other-window) and that invoking the command without ghostel installed errors withPackage 'ghostel' is not available.C-ufor an extra process) requires ghostel's native module and was not exercised in CI/batch.