Skip to content

Regroup ghostel.el functions into topic sections - #671

Merged
dakra merged 2 commits into
mainfrom
refactor/section-layout
Sep 1, 2026
Merged

dakra merged 2 commits into
mainfrom
refactor/section-layout

Conversation

@dakra

@dakra dakra commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Pure moves in lisp/ghostel.el (plus one function relocated from ghostel-shell.el); no function bodies or docstrings change.

Commit 1 — misplaced functions

  • New ;;; Internal helpers section for ghostel--ensure-ghostel-buffer and ghostel--run-hook-safely. The latter moves from ghostel-shell.el into core (its callers are ghostel--sentinel and the OSC 133 handlers); ghostel-shell.el now forward-declares it.
  • New ;;; Copying text section: ghostel--filter-soft-wraps, ghostel--clean-copy-text, ghostel--filter-buffer-substring, ghostel-readonly-copy, ghostel-copy-all.
  • New ;;; Mode hooks section for the hook functions that had accumulated at the end of "Window resize".
  • ghostel--forward-scroll-event → Mouse input; ghostel-readonly-end-of-buffer / -end-of-line → next to the other read-only commands; ghostel--pos-on-cursor-p → cursor-state queries; ghostel--local-host-p → beside ghostel--update-directory, its only caller.
  • Form-feed lines added to the two section headers that lacked them.

Commit 2 — new sections for shared groups

  • ;;; Mode line: the ghostel--mode-line-* tag/progress helpers (driven by input modes, OSC 9;4 progress, the spinner and the password indicator).
  • ;;; Cursor style: cursor blink and ghostel--apply-cursor-style (were under "Callbacks from native module").
  • ;;; Buffer identity: the identity functions shared with bookmark, desktop, consult-ghostel and compile (were under "Entry point").

make -j8 all passes after each commit.

Add an "Internal helpers" section for ghostel--ensure-ghostel-buffer and
ghostel--run-hook-safely (moved from ghostel-shell.el, which forward
declares it), a "Copying text" section for the copy filters and
commands, and a "Mode hooks" section for the hook functions that had
accumulated at the end of "Window resize".  Move the scroll-wheel
forwarder to "Mouse input", the read-only motions next to the other
read-only commands, ghostel--pos-on-cursor-p to the cursor-state
queries, and ghostel--local-host-p beside its only caller.
The mode-line tag/progress helpers are driven by input modes, OSC 9;4
progress, the spinner, and the password indicator alike; cursor blink and
ghostel--apply-cursor-style are not native callbacks; and the identity
functions are shared with bookmark, desktop, consult, and compile.  Give
each group a section header instead of leaving them inside "Input modes
- state helpers", "Callbacks from native module", and "Entry point".
@dakra
dakra merged commit e0c185c into main Sep 1, 2026
33 checks passed
@dakra
dakra deleted the refactor/section-layout branch September 1, 2026 11:08

This branch was previously deployed

1 inactive deployment
github-pages — e0c185cd Deployed Sep 1, 2026 by dakra via deploy #182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant