Repository navigation
Add Org links to ghostel terminals - #692
Merged
Merged
Conversation
On the native PTY a child that cannot chdir exits at once, and with `ghostel-kill-buffer-on-exit' the buffer vanishes before the error can be read. `ghostel--init-buffer' now signals a `user-error' for a missing local directory, covering `ghostel', bookmarks, and desktop restore alike; remote directories are left to TRAMP, which reports them itself. desktop.el's own skip goes away, as it logs the error the same way. `ghostel-create' kills its buffer and re-signals when the spawn fails, instead of leaving an empty ghostel-mode buffer behind.
The `cd' typed into a reused bookmark buffer assumed the shell sat at an empty prompt; mid-command or inside a full-screen program it corrupted the input. It is now gated on `ghostel-bookmark--shell-idle-p': not on the alternate screen, no OSC 133 command running, and the cursor at the start of an empty input line. A busy shell is still switched to, with a message. The shell create branch goes through `ghostel-create', so a record without a recorded identity gets the plain-terminal slot for its name and `ghostel' can claim the buffer instead of opening a second one.
A new opt-in ghostel-org.el registers the `ghostel:' Org link type. `ghostel:DIR' pops to a live terminal in that directory or starts a shell there; `ghostel:DIR::NAME' behaves like a bookmark, reusing the named buffer or starting it in DIR. `org-store-link' in a ghostel buffer stores the latter, and `org-insert-link' completes with a directory prompt. Fixes #653
dakra
force-pushed
the
feat/org-links
branch
from
September 16, 2026 10:53
414b713 to
9ba6fb3
Compare
This branch was successfully deployed
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.
Adds an opt-in
ghostel-org.elregistering theghostel:Org link type, plus two changes it leans on. Fixes #653.Org links (
ghostel-org.el, enable with(use-package ghostel-org :after org))ghostel:DIRpops to a live shell terminal whose working directory is DIR, or starts one there.ghostel:DIR::NAMEbehaves like a bookmark: it reuses buffer NAME, typing acdwhen it sits elsewhere, or starts NAME in DIR.org-store-linkin a ghostel buffer stores this form;org-insert-linkcompletes with a directory prompt.Bookmarks
cdis gated on an idle shell: not on the alternate screen, no OSC 133 command running, cursor at the start of an empty input line. A busy shell is still switched to, with a message.ghostelcan claim it instead of opening a second buffer.cd.Fixes
user-errorfromghostel--init-buffer. Before, the native child exited at once and the buffer vanished silently. Desktop restore relies on this instead of its own check.ghostel-createkills its buffer and re-signals when the spawn fails.