Prototype an optional Embark/Marginalia integration#2096
Open
bbatsov wants to merge 1 commit into
Open
Conversation
bbatsov
force-pushed
the
feature/embark-integration-prototype
branch
from
July 14, 2026 08:47
b31f5da to
153a995
Compare
Built on the completion categories already advertised, wired via with-eval-after-load so Embark and Marginalia stay soft dependencies. - projectile--embark-project-file-target + ...-transform: an Embark `project-file' transformer that AUGMENTS Embark's own rather than replacing it. It resolves a candidate against the Projectile root only when the file actually lives there (existence guard), and otherwise defers to whatever transformer Embark already had. So Embark's file actions hit the right file even when default-directory is a subdirectory, and non-Projectile `project-file' completions are provably unaffected. - projectile-embark-project-map: an action keymap for the new `projectile-project' category (switch/vc/dired/remove). This category is Projectile-only, so it can't collide with anything. Project-switch completions move from `file' to `projectile-project', with a Marginalia annotator reusing the built-in file annotator so annotations are unchanged. Marked experimental in the changelog.
bbatsov
force-pushed
the
feature/embark-integration-prototype
branch
from
July 15, 2026 10:43
153a995 to
d560301
Compare
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.
A prototype of the two Embark improvements we discussed, built on the completion categories from #2093 and wired via
with-eval-after-loadso neither Embark nor Marginalia becomes a dependency.1. Robust
project-fileresolution.projectile-find-filecandidates are project-relative; Embark needs to expand them against the project root to act on them (default-directoryis often a subdirectory).projectile--embark-project-file-targetis a transformer that resolves againstprojectile-project-rootdirectly, so it's correct regardless of Embark's built-in project.el handling orprojectile-modestate.2. A project action keymap.
projectile-embark-project-map(sswitch,vvc,ddired,Dremove) is attached to a newprojectile-projectcategory, so acting on a project candidate offers project operations instead of only generic file actions.projectile-switch-project-by-nameisn't a command, so switch/vc go through thinprojectile-embark-*action wrappers;dired/projectile-remove-known-projectinject cleanly.The project-switch completions move from
fileto theprojectile-projectcategory; a Marginalia annotator reusingmarginalia-annotate-filekeeps their annotations identical (they're directory paths), so no marginalia regression.Everything's gated - with neither package installed it's inert (just some defuns and a keymap). 918 specs green (4 new: transformer resolution in/out of a project, the keymap bindings, the switch action), clean
--warnings-as-errors, relint clean.Flagged experimental in the changelog. Open questions if we keep it: whether to keep this in core (gated) or split into a
projectile-embark.ellikeprojectile-consult.el, and whether overriding Embark's built-inproject-filetransformer (vs only adding when absent) is the behavior we want.