Commit graph

344 commits

Author SHA1 Message Date
Adam Porter
3b0ea8ea07 Add: (-afirst, -aprog1) Anaphoric macros
Too useful not to have, but anaphora.el is only in MELPA, and I'm
trying to avoid MELPA-only dependencies.  dash.el has --first, but not
an aprog1 equivalent, so we might as well just do this.
2021-08-06 07:49:37 -05:00
Adam Porter
933d5e5122 Change: (-room-send-message,reply) Arguments, interactive
In preparation for a compose buffer.
2021-08-06 05:51:37 -05:00
Adam Porter
3e6e79fe0b Comment: Add MAYBE 2021-08-06 05:51:15 -05:00
Adam Porter
6ae5065bf1 Change/Fix: Sync timeouts
This requires the latest commit of plz.el, which adds the :timeout
argument.
2021-08-06 03:22:33 -05:00
Adam Porter
6f84cc595d Add: (ement-room-delete-message)
Deletion (redaction) and editing are two different operations.
Redaction is in r0.6.1 of the client-server spec, while editing is
still in the MSC phase, but implemented in Element already.
2021-08-06 01:22:58 -05:00
Adam Porter
e32282ebbf Add: (ement-room-with-highlighted-event-at) macro 2021-08-06 01:21:59 -05:00
Adam Porter
b6caf39e98 Fix: Require map >= 2.1
Fixes #13.  Thanks to @dyereh for reporting.
2021-08-05 23:14:54 -05:00
Adam Porter
2c89e71252 Fix: (defevent "m.room.avatar") Only make image if enabled
Fixes #14.  Thanks to @akater for reporting.
2021-08-05 21:22:16 -05:00
Adam Porter
4d184ecbac Change: (ement-room-list-next-unread) Message if no unread rooms 2021-08-05 07:21:48 -05:00
Adam Porter
d699de7666 Add: Room avatars 2021-08-05 06:18:05 -05:00
Adam Porter
afe986f1aa Tidy: (ement-room--event-mentions-user-p) Rename
It's a predicate.
2021-08-04 22:25:50 -05:00
Adam Porter
0e06540f98 Fix: (ement-room-with-typing) Cancel timer before setting new one
Just in case.

cc: @treed
2021-08-04 19:53:08 -05:00
Adam Porter
407f164cca Add: Show reason for membership events 2021-08-04 04:10:59 -05:00
Adam Porter
97c55557d1 Add: Emote message face 2021-08-04 03:27:25 -05:00
Adam Porter
d4a8a5479a Tidy: (ement-api-error) Remove redundant string 2021-08-04 02:18:49 -05:00
Adam Porter
01a800e323 Add: Add to reactions by clicking them
Toggling them back off is yet to be done.
2021-08-04 02:18:49 -05:00
Adam Porter
08e5655f00 Fix: (ement-room-join) Complete session from other buffers
Thanks to @matheusfillipe for reporting.
2021-08-04 01:51:23 -05:00
Adam Porter
1f530d4ab3 Change: (ement-api) Signature
Take SESSION instead of SERVER and TOKEN, and make THEN a keyword
arg.  This is much better.
2021-08-03 23:08:12 -05:00
Adam Porter
741f8772b0 Change: (ement--sync) Signal ement-api-error 2021-08-03 22:03:05 -05:00
Adam Porter
40d3dc1299 Tidy: (ement-notify.el) Declare function 2021-08-03 20:02:30 -05:00
Adam Porter
1d8fff0b77 Add: (ement-notify-prism-background) 2021-08-03 19:15:12 -05:00
Adam Porter
8b60da0cfc Fix: (ement-notify-limit-room-name-width)
Also add ellipsis option, and increase default width by 2 (so
"#matrix-dev" fits).
2021-08-03 06:56:10 -05:00
Adam Porter
9061d052a0 Fix: (defface ement-room-mention) Extend on Emacs 27+ 2021-08-03 05:02:19 -05:00
Adam Porter
3bf9d83b6a Fix: (ement-notify, ement-notify-ignore-predicates) 2021-08-03 04:53:16 -05:00
Adam Porter
cdbccc8a4b Fix: (ement-notify-functions) Default value
Forgot to change that earlier.
2021-08-03 04:49:57 -05:00
Adam Porter
7df47f39af Fix: (ement-api-error) Error message string
Need to mention Ement in it, otherwise users won't know where it came
from.
2021-08-03 04:47:10 -05:00
Adam Porter
40fdd9ce09 Comment: Add TODO 2021-08-03 04:47:10 -05:00
Adam Porter
56027d8804 Add: (ement-room-set-topic) 2021-08-03 04:47:10 -05:00
Adam Porter
8fdbc4f1b3 Tidy: Whitespace 2021-08-03 04:08:10 -05:00
Adam Porter
c8060982bc Change/Fix: (ement-room--format-event) help-echo for other types
Set the help-echo to just the event's content, not the whole event.
The whole event might be very large when including its member structs
and theirs on down the chain, and this might be causing an occasional
runaway allocation problem.

cc: @treed
2021-08-03 04:05:00 -05:00
Adam Porter
2607ec3145 Change: (ement-connect) Refactor, use plist args, add uri-prefix arg
This should, e.g. make it possible for Pantalaimon users to do
something like:

  (ement-connect :user-id "@USERNAME:SERVER" :password "PASSWORD"
                 :uri-prefix "http://localhost:8080")

Fixes #10.  Fixes #12.
2021-08-03 02:25:52 -05:00
Adam Porter
effd837776 Comment: Add FIXME 2021-08-03 02:25:45 -05:00
Adam Porter
35a4147660 Change: Save plists instead of structs in saved sessions
The user and server structs could change as well, so use plists for
them, too.
2021-08-03 02:24:51 -05:00
Adam Porter
b541e2202d Fix: Use inherit-input-method when calling read-string
Fixes #11.  Thanks to @vizs for reporting.
2021-08-03 01:28:19 -05:00
Adam Porter
a65ba56aec Change: Refactor and simplify notification system 2021-08-03 01:14:48 -05:00
Adam Porter
208be8b23e Add: (ement-notify-limit-room-name-width) 2021-08-03 01:14:16 -05:00
Adam Porter
44550cfbdc Add: Notifications and Mentions buffers 2021-08-03 00:37:49 -05:00
Adam Porter
db4f09323c Fix: (ement-notify--notify) Ensure body is a string 2021-08-03 00:14:59 -05:00
Adam Porter
fe899d1cca Fix: (ement-notify) Filters variable
Used the wrong variable name.  Oops.
2021-08-03 00:14:59 -05:00
Adam Porter
7c5a5f766a Add: (ement-notify--log-mentions) 2021-08-03 00:14:59 -05:00
Adam Porter
f729714d5d Comment: Add section heading 2021-08-03 00:14:59 -05:00
Adam Porter
de50a8b6df Add: (ement-room-message-format-spec) %O for room display name 2021-08-03 00:14:59 -05:00
Adam Porter
e10f70f46d Add: (ement-with-progress-reporter) macro, and use it 2021-08-02 21:24:52 -05:00
Adam Porter
41997bb32e Tidy: Untabify
I guess this is what I get for occasionally using other Emacs configs
to edit.
2021-08-02 21:22:45 -05:00
Adam Porter
825aaadb20 Change: (ement--sync-messages-p) Use defsubst
Might as well.
2021-08-02 20:49:50 -05:00
Adam Porter
3c1982f6e0 Change: (ement-room--process-events) Use equal as testfn
Equal seems generally faster than string=, because it uses a hash
instead of char-by-char comparison.
2021-08-02 20:48:50 -05:00
Adam Porter
0cb35b4617 Change: (ement-room-send-event-callback) Message only when :debug 2021-08-01 08:36:16 -05:00
Adam Porter
5883b243c1 Change: (ement-api-error) Improve error messages 2021-08-01 06:20:05 -05:00
Adam Porter
82da455775 Add: (ement-room-send-reaction) Use reaction at point 2021-08-01 05:52:48 -05:00
Adam Porter
e800c04f3b Add/Change: (ement-room-send-event-callback)
Use this callback function, which warns if the server reuses an event
ID when sending an event, which would indicate that we're reusing
transaction IDs, which could indicate a bug.
2021-08-01 05:15:52 -05:00