dotfiles/emacs-lisp/ement_el.org
main fb4503d9fc
ement.el improvements
Enable message composition in `org-mode` and a small utility command `panctl`
which launches `panctl` in vterm with a singular reused buffer.

Signed-off-by: main <magic_rb@redalder.org>
2022-10-27 14:07:02 +02:00

1 KiB

ement.el

  (use-package password-store
    :straight t)
  (use-package ement
    :straight '(ement :type git :host github :repo "alphapapa/ement.el")
    :after (password-store)
    :config
    (ement-connect
     :uri-prefix "http://localhost:8008"
     :password (password-store-get "Matrix/@magic_rb:matrix.redalder.org")
     :user-id "@magic_rb:matrix.redalder.org"))

Enable message composition in Org Mode by default.

  (setq ement-room-send-message-filter #'ement-room-send-org-filter)

Define an interactive command to open pantalaimon in Emacs.

  (defun panctl ()
    (interactive)
    (let ((buffer (get-buffer "panctl"))
          (vterm-shell "panctl"))
      (if buffer
          (switch-to-buffer buffer)
        (vterm "panctl")
        (whitespace-mode -1))))