Skip to content

Conversation

@dnouri
Copy link
Owner

@dnouri dnouri commented Feb 10, 2026

Copying from the chat buffer preserves raw markdown by default — useful
for pasting into docs, Slack, or any markdown-aware context.

For cases where you want plain text without **, backticks, or code
fences, two opt-in mechanisms are available:

Defcustom: pi-coding-agent-copy-visible-text — set to t to make
all copy commands (M-w, C-w) strip hidden markup automatically.

Command: pi-coding-agent-copy-visible — explicit one-off command,
suitable for keybinding:

(define-key pi-coding-agent-chat-mode-map (kbd "C-c w") #'pi-coding-agent-copy-visible)

Uses filter-buffer-substring-function to strip invisible and
display ""-hidden text. Delegates to buffer-substring--filter when
disabled.

Copying from the chat buffer preserves raw markdown by default —
useful for pasting into docs, Slack, or any markdown-aware context.

For plain text without **, backticks, or code fences:
- Defcustom pi-coding-agent-copy-visible-text: set to t to make all
  copy commands (M-w, C-w) strip hidden markup automatically
- Command pi-coding-agent-copy-visible: explicit one-off, bindable

Uses filter-buffer-substring-function to strip invisible and
display-empty text. Delegates to buffer-substring--filter when disabled.
@dnouri dnouri force-pushed the feature/copy-visible-text branch from 340fa4b to aa8a895 Compare February 10, 2026 13:05
@dnouri dnouri changed the title Copy from chat buffer strips hidden markdown syntax Copy from chat buffer strips hidden markdown syntax (opt-in) Feb 10, 2026
@dnouri dnouri merged commit 2a52f65 into master Feb 10, 2026
7 checks passed
@dnouri dnouri deleted the feature/copy-visible-text branch February 10, 2026 13:14
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