Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: (ement-room-mode) Set `filter-buffer-substring-function' #278

Merged

Conversation

phil-s
Copy link

@phil-s phil-s commented Apr 20, 2024

Strip the line-prefix and wrap-prefix text properties which are used when formatting certain Matrix events, but which should not be copied into other buffers.

This is especially relevant when using %W in ement-room-message-format-spec to provide indentation when wrapping message body lines.

With this filter configured, we can copy text from an ement room and yank it into another buffer without this formatting being included. See also filter-buffer-substring:

For example, major or minor modes can use `filter-buffer-substring-function' to exclude text properties that are special to a buffer, and should not be copied into other buffers.

@phil-s phil-s force-pushed the phil-s/filter-buffer-substring-function branch from 694fb28 to a9bc9df Compare July 1, 2024 01:35
@alphapapa alphapapa added this to the 0.16 milestone Jul 1, 2024
@alphapapa alphapapa self-assigned this Jul 1, 2024
Strip the `line-prefix' and `wrap-prefix' text properties which are
used when formatting certain Matrix events, but which should not be
copied into other buffers.
@alphapapa alphapapa added the bug Something isn't working label Sep 9, 2024
@alphapapa alphapapa force-pushed the phil-s/filter-buffer-substring-function branch from a9bc9df to d29bccb Compare September 9, 2024 06:26
@alphapapa alphapapa merged commit a47de8a into alphapapa:master Sep 9, 2024
0 of 4 checks passed
@alphapapa
Copy link
Owner

Thanks, Phil.

@phil-s phil-s deleted the phil-s/filter-buffer-substring-function branch September 9, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants