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

Add: Custom message format spec for notification buffers #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phil-s
Copy link

@phil-s phil-s commented Oct 12, 2024

  • ement-notifications-message-format-spec: New user option.
  • ement-notifications-room-button-separator: New user option.
  • ement-notifications-log-to-buffer: Use them.

- (ement-notifications-message-format-spec) New user option.
- (ement-notifications-room-button-separator) New user option.
- (ement-notifications-log-to-buffer) Use them.
@phil-s
Copy link
Author

phil-s commented Oct 12, 2024

There were a couple of different message specs in the code:

- (ement-room-message-format-spec "%o%O »%W %S> %B%R%t")
- (setq-local ement-room-message-format-spec "[%o%O] %S> %B%R%t"

I only observe the first of those formats in the rendered notifications, so maybe the code setting the other can actually be removed?

I've also added a couple of helper code comments like this for locating the event formatters:

;; Formatter definitions: (occur "(\\ement-room-define-event-formatter")

I found that a convenience to be able to call with C-x C-e, as it's not the easiest thing to locate the code rendering each of those format spec items, and I think newcomers would find it especially useful. The 'unnecessary' escaping \\e is there to prevent those comments themselves being displayed in the results.

@alphapapa alphapapa added this to the v0.17 milestone Oct 12, 2024
@alphapapa alphapapa self-assigned this Oct 12, 2024
@alphapapa alphapapa added enhancement New feature or request priority:B labels Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:B
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants