diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-28 09:36:06 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-28 09:36:06 -0500 |
| commit | 0975e7de0c7bfdc6f65bb64537d4eff1aeb09a7e (patch) | |
| tree | 4b872db4e0417e173595409c63c7d1291015adbd /tests/test-pearl-comments.el | |
| parent | fd94237903c15883173e438a5af4ba4e6bfdbd46 (diff) | |
| download | pearl-0975e7de0c7bfdc6f65bb64537d4eff1aeb09a7e.tar.gz pearl-0975e7de0c7bfdc6f65bb64537d4eff1aeb09a7e.zip | |
feat(view-sync): pearl-publish-current-source convenience wrapper
This is Phase 5 of docs/saved-query-sync-spec.org (§ New: pearl-publish-current-source). When I'm reading a local saved query rendered in pearl and decide it should be a Linear view, I now have a one-chord publish instead of the M-x round-trip through pearl-sync-saved-query-to-linear with the name lookup.
The new command reads the active buffer's #+LINEAR-SOURCE header and dispatches to pearl-sync-saved-query-to-linear with the name pre-filled when the source is a :type filter that matches an entry in pearl-saved-queries. Other shapes refuse with a clear message: no source header at all, the source is already a :type view (no publish needed), the type isn't filter, the source has no usable name (transient ad-hoc filter, or whitespace-only name), or the recorded name doesn't match any local saved query.
I bound the command under C-; L f P in pearl-fetch-map. The transient gets ("U" "upload current source") in the Fetch group because P is taken in the transient's flat namespace, and the verb-prefix shape revisit task tracks reshaping that.
7 new tests cover each refusal branch and the dispatch path, including a regression for the whitespace-only :name case the pre-commit review surfaced. The prior check used string-empty-p, which let " " fall through to the no-matching-saved-query branch with a visibly-blank name in the error message. string-blank-p routes it to the cleaner no-name branch. The keymap and transient menu tests gained coverage for the new binding. 660 ert tests total green. make compile and make lint clean.
Diffstat (limited to 'tests/test-pearl-comments.el')
0 files changed, 0 insertions, 0 deletions
