Commit graph

464 commits

Author SHA1 Message Date
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
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