Skip to content

Filter Ghostel copy text through buffer substring#509

Merged
emil-e merged 1 commit into
dakra:mainfrom
emil-e:fix/copy-soft-wrap-filter
Jul 6, 2026
Merged

Filter Ghostel copy text through buffer substring#509
emil-e merged 1 commit into
dakra:mainfrom
emil-e:fix/copy-soft-wrap-filter

Conversation

@emil-e

@emil-e emil-e commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • install a Ghostel buffer-local filter-buffer-substring-function so generic copy paths remove renderer soft-wrap newlines
  • make ghostel-readonly-copy delegate to kill-ring-save
  • add a regression test for kill-ring-save copying soft-wrapped text

Verification

  • emacs --batch -Q -L lisp -L test -l test/ghostel-test-helpers.el --eval "(byte-compile-file \"lisp/ghostel.el\")"
  • emacs --batch -Q -L lisp -L test -l ert -l test/ghostel-test-helpers.el -l test/ghostel-render-test.el --eval "(ert-run-tests-batch-and-exit '(or ghostel-test-filter-soft-wraps ghostel-test-kill-ring-save-filters-soft-wraps))"
  • emacs --batch -Q -L lisp -L test -l ert -l test/ghostel-test-helpers.el -l test/ghostel-mouse-paste-test.el --eval "(ert-run-tests-batch-and-exit '(or ghostel-test-readonly-copy-exits-when-fast-exit-enabled ghostel-test-readonly-copy-no-exit-when-fast-exit-disabled ghostel-test-readonly-copy-deactivates-mark))"

@emil-e
emil-e merged commit eb806d1 into dakra:main Jul 6, 2026
22 checks passed
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