Commit graph

344 commits

Author SHA1 Message Date
Adam Porter
7491e0521a Add: (ement-session-events) Track seen events in hash table
We already have all of these event structs in the rooms' event lists,
so this is just extra pointers to the same data, and extra copies of
the event IDs, which seems reasonable.  We need to track this, for now
at least, because it lets us ensure that we aren't reusing transaction
IDs on a session (next commit).
2021-08-01 05:10:45 -05:00
Adam Porter
6d10c2de85 Change: (--read-session, --save-session) Use plists and fail right 2021-08-01 04:43:39 -05:00
Adam Porter
9ca6dc4922 Change/Fix: (ement-room-send-message) Scrolling after sending 2021-08-01 02:52:31 -05:00
Adam Porter
e9df5d60b8 Add: (ement-room-image-initial-height) 2021-08-01 01:15:33 -05:00
Adam Porter
bb6c75d248 Fix: (ement-room--buffer) Use generate-new-buffer
When two rooms have the same name, get-buffer-create conflates them.
2021-08-01 01:06:51 -05:00
Adam Porter
91618dacae Fix: (ement-view-room) Use existing room buffer 2021-08-01 01:06:04 -05:00
Adam Porter
9bc7712540 Tidy: (ement-room--buffer) Use room variable
Not strictly necessary, but makes sense, and might avoid mistakes in
the future if this code is changed.
2021-08-01 01:05:34 -05:00
Adam Porter
0072a855c4 Fix: (ement-room-list-action) Use ement-view-room 2021-08-01 01:05:14 -05:00
Adam Porter
dbcf7576e1 Fix: (ement-room-list-action) Use opened buffers
Thanks to @treed for reporting.
2021-08-01 00:47:40 -05:00
Adam Porter
811d911f96 Fix: (ement--update-room-buffers) Only use live buffers 2021-08-01 00:47:31 -05:00
Adam Porter
ec0c324823 Change: (ement-room-image-scale-mouse) Toggle scale 2021-08-01 00:16:44 -05:00
Adam Porter
baed04d5d5 Change/Fix: Support images on Emacs 27+ 2021-07-31 23:47:57 -05:00
Adam Porter
e028736236 Fix: (ement-complete-room) Show alias or ID in parens 2021-07-31 23:02:23 -05:00
Adam Porter
b2066f7d83 Docs: Bindings 2021-07-30 18:09:09 -05:00
Adam Porter
9eaf997b36 Add: (ement-room--buffer) Set list-buffers-directory
Especially useful when used with bufler-list.
2021-07-30 03:07:42 -05:00
Adam Porter
f3f343bb6b Docs: Add reactions screenshot 2021-07-30 02:07:02 -05:00
Adam Porter
ba9eb3f0e5 Fix: (ement-room-list-auto-update) Autoload
Since it's in ement-sync-callback-hook.
2021-07-30 01:30:30 -05:00
Adam Porter
178226c7a3 Comment: Add TODO 2021-07-30 01:26:05 -05:00
Adam Porter
755ebc3c56 Docs: Improve bindings section and tips 2021-07-30 01:17:40 -05:00
Adam Porter
3ad6caeca8 Add: Sending reactions 2021-07-30 00:48:22 -05:00
Adam Porter
2c193f1e50 Docs: Mention using setq vs. customize 2021-07-30 00:48:22 -05:00
Adam Porter
06f962b587 Add: (ement-room-list--entry) help-echo for U and B columns 2021-07-29 21:04:15 -05:00
Adam Porter
2703f5c0ef Fix: (ement-room-list--entry) Workaround bug in ts
ts-human-format-duration returned empty string for durations <1
second.  ts-0.2.1 contains the fix, and 0.3-pre does too, but users
will need to upgrade the library, so we tell them.
2021-07-29 21:02:48 -05:00
Adam Porter
215a334468 Add: (ement-room-with-typing)
Lisp is great.
2021-07-29 19:04:54 -05:00
Adam Porter
c009da4c80 Add: Sending image messages 2021-07-29 18:52:14 -05:00
Adam Porter
f70b6661b1 Add: (ement-api) Endpoint "category"
There doesn't seem to be an official term for what comes after
"/_matrix/" in the endpoint path.
2021-07-29 18:45:57 -05:00
Adam Porter
62a740aa9d Fix: (ement-room-image-show) Handle invalid images 2021-07-29 18:07:56 -05:00
Adam Porter
28528ebdbd Tidy: (ement-room) Move functions 2021-07-29 16:57:24 -05:00
Adam Porter
1574ddf915 Add: (defevent "m.room.topic")
Updates room topic for event.
2021-07-29 05:47:07 -05:00
Adam Porter
b50ce53106 Change: (ement-room-list--entry) Message instead of warning
It's happening more than I realized, but it seems like a transient
error, because the formatted timestamp seems to appear with the next
sync.  So let's not pop up a warning; a message is enough.
2021-07-29 05:27:41 -05:00
Adam Porter
a8e9dadb01 Add: Message editing 2021-07-29 05:23:59 -05:00
Adam Porter
a5f2d08e41 Add: (ement-room-list) Buffer column 2021-07-29 04:44:40 -05:00
Adam Porter
d56c1bb4ec Add: Auto-update room list buffer 2021-07-29 04:35:21 -05:00
Adam Porter
6fefd3c075 Add: Reply to marked text 2021-07-29 04:26:14 -05:00
Adam Porter
74a21cb9fc Docs: Update 2021-07-29 04:19:33 -05:00
Adam Porter
461ceb789a Comment: Add TODO 2021-07-29 04:13:57 -05:00
Adam Porter
fd1cd6f26b Add: Cycle and scroll through unread buffers with SPC 2021-07-29 04:13:57 -05:00
Adam Porter
c45d0a17c6 Change: ("m.typing") Set footer silently 2021-07-29 04:05:48 -05:00
Adam Porter
2abc3a03db Change/Fix: (ement-room--format-message-body) Ignore nil bodies
This shouldn't happen, but it did once, so let's protect against it
for now.
2021-07-29 04:05:48 -05:00
Adam Porter
591e486598 Add/Change: Error handling, force resync with prefix
In case a sync process gets stuck, "C-u g" in a room buffer will
delete the old sync process and start a new one.

Also, define ement-api-error type.  Still not sure this is all
idiomatic, but it seems to work now.
2021-07-29 03:07:54 -05:00
Adam Porter
ea16cb204e Comment: Remove old FIXME 2021-07-29 02:25:20 -05:00
Adam Porter
13c791ec0a Tidy: (ement--room-name) Remove unused function 2021-07-29 02:24:50 -05:00
Adam Porter
200e38df36 Change: Use new-events list in room local slot
And push new events directly to timeline slot.  This makes more sense.
2021-07-29 02:07:58 -05:00
Adam Porter
eb6033049a Tidy: (ement-room--buffer) 2021-07-29 02:03:50 -05:00
Adam Porter
234d841b11 Tidy: (ement-room-mode-hook) Add visual-line-mode 2021-07-29 02:03:06 -05:00
Adam Porter
941033b380 Add: (ement-event-handlers, ement-defevent, ement--process-event)
This will allow events to be processed more flexibly on the
room-struct side (i.e. regardless of whether a room has a buffer).
2021-07-29 02:02:00 -05:00
Adam Porter
62302949df Change: (ement-notify) Only run when session hasn't synced yet 2021-07-29 02:01:25 -05:00
Adam Porter
df5c3fe170 Comment: Whitespace and TODOs 2021-07-29 02:01:00 -05:00
Adam Porter
d3d2de54d3 Change: (ement-event-hook) to defvar
This is more for internal use now.  Users shouldn't change this unless
they know what they're doing.
2021-07-29 01:56:32 -05:00
Adam Porter
6b32645726 Change/Fix: (ement-room-leave) Improve room completion 2021-07-29 01:02:06 -05:00