No description
Find a file
Adam Porter ef63676430 Fix: (ement--login-callback) Do initial sync
A silly oversight.

Fixes #4.  Thanks to @mekeor for reporting.
2021-07-17 06:44:58 -05:00
.github/workflows Meta: Update makem.sh, etc. 2020-12-02 14:24:10 -06:00
images Add: Timestamp headers 2020-12-04 02:50:08 -06:00
.gitignore Meta: NOTES.org symlink 2020-12-05 02:23:42 -06:00
ement-api.el Tidy, rename debug-warn macro 2020-12-01 16:45:40 -06:00
ement-macros.el Tidy, rename debug-warn macro 2020-12-01 16:45:40 -06:00
ement-room-list.el Comment: Add TODO 2020-12-04 19:17:58 -06:00
ement-room.el Change: (defface ement-room-user) Remove :extend 2021-07-04 16:52:56 -05:00
ement-structs.el Add: ement-room-prism 2020-12-05 16:24:21 -06:00
ement.el Fix: (ement--login-callback) Do initial sync 2021-07-17 06:44:58 -05:00
LICENSE Add LICENSE 2020-11-28 17:14:54 -06:00
Makefile Meta: Update makem.sh, Makefile 2020-12-19 13:06:42 -06:00
makem.sh Meta: Update makem.sh, Makefile 2020-12-19 13:06:42 -06:00
NOTES.org Meta: NOTES.org symlink 2020-12-05 02:23:42 -06:00
README.org Change: Improve room-switching commands and binds 2020-12-04 03:08:09 -06:00

ement.el

Ement.el is a new Matrix client for Emacs. It's basic at the moment, but it can be used to send and read messages.

Screenshots

The message formatting is customizeable (e.g. the timestamp can be displayed in the left or right margin).

/hiro/ement.el/media/commit/ef6367643021b3bbf5655ee308d7403aaaacb67f/images/screenshot2.png

Timestamp headers are displayed where a certain amount of time passes between events.

/hiro/ement.el/media/commit/ef6367643021b3bbf5655ee308d7403aaaacb67f/images/screenshot3.png

Rationale

Why write a new Emacs Matrix client when there is already matrix-client.el, by the same author, no less? A few reasons:

  • matrix-client uses an older version of the Matrix spec, r0.3.0, with a few elements of r0.4.0 grafted in. Bringing it up to date with the current version of the spec, r0.6.1, would be more work than to begin with the current version. Ement.el targets r0.6.1 from the beginning.
  • matrix-client was developed without the intention of publishing it to, e.g. MELPA or ELPA. It has several dependencies, and its code does not always install or compile cleanly due to macro-expansion issues (apparently depending on the user's Emacs config). Ement.el is designed to have minimal dependencies outside of Emacs (currently only one, plz, which could be imported into the project), and every file is linted and compiles cleanly using makem.sh.
  • matrix-client uses EIEIO, probably unnecessarily, since few, if any, of the benefits of EIEIO are realized in it. Ement.el uses structs instead.
  • matrix-client uses bespoke code for inserting messages into buffers, which works pretty well, but has a few minor bugs which are difficult to track down. Ement.el uses Emacs's built-in (and perhaps little-known) ewoc library, which makes it much simpler and more reliable to insert and update messages in buffers, and enables the development of advanced UI features more easily.
  • matrix-client was, to a certain extent, designed to imitate other messaging apps. The result is, at least when used with the matrix-client-frame command, fairly pleasing to use, but isn't especially "Emacsy." Ement.el is intended to better fit into Emacs's paradigms.
  • matrix-client's long name makes for long symbol names, which makes for tedious, verbose code. ement is easy to type and makes for concise, readable code.
  • The author has learned much since writing matrix-client and hopes to write simpler, more readable, more maintainable code in Ement.el. It's hoped that this will enable others to contribute more easily.

However, note that matrix-client is a more mature client and is very reliable in the author's experience. While Ement.el is intended to reach feature parity with it and eventually surpass it, that will take some time, so matrix-client remains a good choice.

Installation

Quelpa

The recommended way to install is with quelpa-use-package, like this:

  ;; Install and load `quelpa-use-package'.
  (package-install 'quelpa-use-package)
  (require 'quelpa-use-package)

  ;; Install `plz' HTTP library (not on MELPA yet).
  (use-package plz
    :quelpa (plz :fetcher github :repo "alphapapa/plz.el"))

  ;; Install Ement.
  (use-package ement
    :quelpa (ement :fetcher github :repo "alphapapa/ement.el"))

Manual

If you want to install it manually, it's simple enough, but you should know what you're doing, and you're on your own.

Usage

  1. Call command ement-connect to connect.
  2. Wait for initial sync to complete (which can take a few momentsinitial sync JSON requests can be large).
  3. Use these commands:

    • ement-view-room to select a room buffer to view, with completion.
    • ement-list-rooms to view the list of joined rooms.

In a room buffer:

  • RET sends a message.
  • TAB / <backtab> moves between messages.
  • M-v at the top of the buffer loads older messages.
  • v views an event's source.
  • g syncs new messages (not necessary if auto sync is enabled; see below).
  • r selects another room.
  • R shows the room list.

Tips

  • You can customize settings in the ement group.

    • Set ement-auto-sync to sync new messages automatically.

Changelog

0.1-pre

Yet to be released.

COMMENT Credits

Development

Bug reports, feature requests, suggestions — oh my!

License

GPLv3