The Complete Computing Environment

Encrypted Matrix Chat in Emacs with Ement.el


Hello, I'm the original author of matrix-client.el and I recommend you don't even try to use it. It was fun to build and interesting to learn the Matrix APIs with but when end-to-end encryption started to land, I was not in a position to keep using it, keep developing it, or keep supporting it. alphapapa revived and eventually rewrote it as Ement.el

I recommend using Pantalaimon to support E2E messages, and it can be put together as such:

elisp:(ement-connect :uri-prefix "http://localhost:8008" :user-id "")

Ement.el use-package declaration

(defcustom ement-user-id ""
  "The user-id passed to ement-connect in cce/ement-panta-connect")
(defun cce/ement-panta-connect ()
  (ement-connect :uri-prefix "http://localhost:8008" :user-id ement-user-id))

(use-package ement
  (ement-save-session t)
  (setq print-circle t)
  (require 'dash)
  (require 'ement-taxy)
  (require 'ement-room-list)

  ;; open ement rooms in a popup window 
  (add-to-list 'display-buffer-alist
               '("\\*Ement Room" display-buffer-at-bottom))

  ;; set up evil-ish binds for ement-taxy-room-list
      '(("M-j" . ement-taxy-next-unread))
    (evil-define-key* 'normal ement-taxy-mode-map (kbd (car it)) (cdr it)))

  ;; set up evil-ish binds for ement-room
      '(("RET" . ement-room-send-message)
        ("s-RET" . ement-room-send-reply)
        ("r" . ement-room-send-reply)
        ("M-RET" . ement-room-compose-message)
        ("M-j" . ement-room-scroll-up-mark-read)
        ("q" . ement-taxy-room-list))
    (evil-define-key* 'normal ement-room-mode-map (kbd (car it)) (cdr it)))
  (ement-room-compose . ement-room-compose-org))