Code Monkey home page Code Monkey logo

ement.el's Introduction

Ement.el

https://elpa.gnu.org/packages/ement.svg

Ement.el is a Matrix client for GNU Emacs. It aims to be simple, fast, featureful, and reliable, while integrating naturally with Emacs.

Feel free to join us in the chat room: https://img.shields.io/matrix/ement.el:matrix.org.svg?label=%23ement.el:matrix.org

Contents

Screenshots

The default formatting style resembles IRC clients, with each message being prefixed by the username (which enables powerful Emacs features, like using Occur to show all messages from or mentioning a user). Alternative, built-in styles include an Element-like one with usernames above groups of messages, as well as a classic, no-margins IRC style. Messages may be optionally displayed with unique colors for each user (with customizable contrast), making it easier to follow conversations. Timestamp headers are optionally displayed where a certain amount of time passes between events, as well as where the date changes.

images/ement-for-twim.png

Two rooms shown in side-by-side buffers, showing inline images, reactions, date/time headings, room avatars, and messages colored by user (using the modus-vivendi Emacs theme).

images/emacs-with-fully-read-line.png

#emacs:libera.chat showing colored text from IRC users, replies with quoted parts, messages colored by user, addressed usernames colored by their user color, highlighted mentions, and the fully-read marker line (using the modus-vivendi Emacs theme).

images/screenshot5.png

Four rooms shown at once, with messages colored by user, in the default Emacs theme.

images/screenshot2.png

A room at the top in the “Elemental” display style, with sender names displayed over groups of messages, and only self-messages in an alternate color. The lower window shows an earlier version of the rooms list.

images/reactions.png

Reactions displayed as color emojis (may need proper Emacs configuration).

Installation

GNU ELPA

Ement.el is published in GNU ELPA as ement, so it may be installed in Emacs with the command M-x package-install RET ement RET. This is the recommended way to install Ement.el, as it will install the current stable release.

The latest development build may be installed from ELPA-devel or from Git (see below).

GNU Guix

Ement.el is available in GNU Guix as emacs-ement.

Debian, Ubuntu

Ement.el is available in Debian as elpa-ement and in Ubuntu as elpa-ement.

Nix

Ement.el is available in NixOS as emacsPackages.ement.

Other distributions

Ement.el is also available in some other distributions. See Repology for details.

Git master

The master branch of the Git repository is intended to be usable at all times; only minor bugs are expected to be found in it before a new stable release is made.

To install, it is recommended to use quelpa-use-package, like this (using this helpful command for upgrading versions):

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

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

One might also use systems like Elpaca or Straight (which is also used by DOOM), but the author cannot offer support for them.

Manual

Ement.el is intended to be installed with Emacs’s package system, which will ensure that the required autoloads are generated, etc. If you choose to install it manually, you’re on your own.

Usage

  1. Call command ement-connect to connect. Multiple sessions are supported: call the command again with a C-u universal prefix to connect to another account.
  2. Wait for initial sync to complete (which can take a few moments–initial sync JSON responses can be large).
  3. Use these commands (room-related commands may be called with universal prefix to prompt for the room):
    • ement-list-rooms to view the list of joined rooms.
    • ement-view-room to view a room’s buffer, selected with completion.
    • ement-create-room to create a new room.
    • ement-create-space to create a space.
    • ement-invite-user to invite a user to a room.
    • ement-join-room to join a room.
    • ement-leave-room to leave a room.
    • ement-forget-room to forget a room.
    • ement-tag-room to toggle a tag on a room (including favorite/low-priority status).
    • ement-list-members to list members in a room.
    • ement-send-direct-message to send a direct message to a user (in an existing direct room, or creating a new one automatically).
    • ement-room-edit-message to edit a message at point.
    • ement-room-send-file to send a file.
    • ement-room-send-image to send an image.
    • ement-room-set-topic to set a room’s topic.
    • ement-room-occur to search in a room’s known events.
    • ement-room-override-name to override a room’s display name.
    • ement-ignore-user to ignore a user (or with interactive prefix, un-ignore).
    • ement-room-set-message-format to set a room’s message format buffer-locally.
    • ement-room-toggle-space to toggle a room’s membership in a space (a way to group rooms in Matrix).
    • ement-directory to view a room directory.
    • ement-directory-search to search a room directory.
  4. Use these special buffers to see events from multiple rooms (you can also reply to messages from these buffers!):
    • See all new events that mention you in the *Ement Mentions* buffer.
    • See all new events in rooms that have open buffers in the *Ement Notifications* buffer.

Bindings

These bindings are common to all of the following buffer types:

  • Switch to a room buffer: M-g M-r
  • Switch to the room list buffer: M-g M-l
  • Switch to the mentions buffer: M-g M-m
  • Switch to the notifications buffer: M-g M-n

Room buffers

Note that if global minor mode ement-room-self-insert-mode is enabled (by default it is disabled), typing any of the common printable ascii characters (such as letters) in a room buffer will start a new message, and most of the following bindings are instead accessed via a prefix key. See the minor mode docstring for details. (The ? binding is an exception; by default it opens the command menu regardless of this minor mode.)

  • Show command menu: ?

images/transient.png

Movement

  • Next event: n
  • Previous event: p
  • End of buffer: N
  • Scroll up and mark read: SPC
  • Scroll down: S-SPC
  • Jump to fully-read marker: M-g M-p
  • Move read markers to point: m
  • Load older messages: at top of buffer, scroll contents up (i.e. S-SPC, M-v or mwheel-scroll)

Switching

  • List rooms: M-g M-l
  • Switch to other room: M-g M-r
  • Switch to mentions buffer: M-g M-m
  • Switch to notifications buffer: M-g M-n
  • Quit window: q

Messages

  • Write message: RET
  • Compose message in buffer: M-RET (while writing in minibuffer: C-c '‍). Customize the option ement-room-compose-method to make RET and the other message bindings use a compose buffer by default. Use command ement-room-compose-org to activate Org mode in the compose buffer.
  • Write reply to event at point: S-<return>
  • Edit message: <insert>
  • Delete message: C-k
  • Send reaction to event at point, or send same reaction at point: s r
  • Send emote: s e
  • Send file: s f
  • Send image: s i
  • View event source: v
  • Complete members and rooms at point: C-M-i (standard completion-at-point command). (Type an @ prefix for a member mention, a # prefix for a room alias, or a ! prefix for a room ID.)

Images

  • Toggle scale of image (between fit-to-window and thumbnail): mouse-1
  • Show image in new buffer at full size: double-mouse-1

Users

  • Send direct message: u RET
  • Invite user: u i
  • Ignore user: u I

Room

  • Occur search in room: M-s o
  • List members: r m
  • Set topic: r t
  • Set message format: r f
  • Set notification rules: r n
  • Override display name: r N
  • Tag/untag room: r T

Room membership

  • Create room: R c
  • Join room: R j
  • Leave room: R l
  • Forget room: R F
  • Toggle room’s spaces: R s

Other

  • Sync new messages (not necessary if auto sync is enabled; with prefix to force new sync): g

Room list buffer

  • Show buffer of room at point: RET
  • Show buffer of next unread room: SPC
  • Move between room names: TAB / <backtab>
  • Kill room’s buffer: k
  • Toggle room’s membership in a space: s

Directory buffers

  • View/join a room: RET / mouse-1
  • Load next batch of rooms: +

Mentions/notifications buffers

  • Move between events: TAB / <backtab>
  • Go to event at point in its room buffer: RET
  • Write reply to event at point (shows the event in its room while writing): S-<return>

Tips

  • Desktop notifications are enabled by default for events that mention the local user. They can also be shown for all events in rooms with open buffers.
  • Send messages in Org mode format by customizing the option ement-room-send-message-filter (which enables Org format by default), or by calling ement-room-compose-org in a compose buffer (which enables it for a single message). Then Org-formatted messages are automatically converted and sent as HTML-formatted messages (with the Org syntax as the plain-text fallback). You can send syntax such as:
    • Bold, italic, underline, strikethrough
    • Links
    • Tables
    • Source blocks (including results with :exports both)
    • Footnotes (okay, that might be pushing it, but you can!)
    • And, generally, anything that Org can export to HTML
    • Note that the default org-export-preserve-breaks value causes singular line breaks to be exported as spaces. To preserve the line breaks, indentation, and blank lines in a region, but otherwise use normal formatting, you can use the verse block type. Refer to (info "(org) Paragraphs") and (info "(org) Structure Templates") for details.
  • Starting in the room list buffer, by pressing SPC repeatedly, you can cycle through and read all rooms with unread buffers. (If a room doesn’t have a buffer, it will not be included.)
  • Room buffers and the room-list buffer can be bookmarked in Emacs, i.e. using C-x r m. This is especially useful with Burly: you can arrange an Emacs frame with several room buffers displayed at once, use burly-bookmark-windows to bookmark the layout, and then you can restore that layout and all of the room buffers by opening the bookmark, rather than having to manually arrange them every time you start Emacs or change the window configuration.
  • Images and other files can be uploaded to rooms using drag-and-drop.
  • Mention members by typing a @ followed by their displayname or Matrix ID. (Members’ names and rooms’ aliases/IDs may be completed with completion-at-point commands.)
  • Customize ement-room-use-variable-pitch to render messages using proportional fonts.
  • You can customize settings in the ement group.
    • Note: setq should not be used for certain options, because it will not call the associated setter function. Users who have an aversion to the customization system may experience problems.

Displaying symbols and emojis

Emacs may not display certain symbols and emojis well by default. Based on this question and answer, you may find that the simplest way to fix this is to install an appropriate font, like Noto Emoji, and then use this Elisp code:

(setf use-default-font-for-symbols nil)
(set-fontset-font t 'unicode "Noto Emoji" nil 'append)

Encrypted room support through Pantalaimon

Ement.el doesn’t support encrypted rooms natively, but it can be used transparently with the E2EE-aware reverse proxy daemon Pantalaimon. After configuring it according to its documentation, call ement-connect with the appropriate hostname and port, like:

(ement-connect :uri-prefix "http://localhost:8009")

Changelog

0.16-pre

Changes

  • Option ement-room-coalesce-events may now be set to (and defaults to) a maximum number of events to coalesce together. (This avoids potential performance problems in rare cases. See #247. Thanks to Arto Jantunen for reporting and Sergio Durigan Junior for testing.)

Fixes

  • Replies to edited messages are correctly sent to the original event (whereas previously they were sent to the edit, which caused reactions to not be shown). (#230, #277. Thanks to Phil Sainty for suggesting, and to dionisos for reporting.)

0.15.1

Fixes

0.15

Additions

Configurable emoji picker for sending reactions. (#199, #201. Thanks to Omar Antolín Camarena.)
  • Option ement-room-reaction-picker sets the default picker. Within that, the user may press C-g to choose a different one with a key bound in ement-room-reaction-map.
A variety of enhancements for using compose buffers. (#140. Thanks to Phil Sainty.)
Chiefly, messages can now be composed in small windows below room windows, rather than in the minibuffer or a full-sized window. A variety of options and commands are available related to these features. See compose buffer enhancements.
Global minor mode ement-room-self-insert-mode enables “just typing” to start a message. (Thanks to Phil Sainty.)
See ement-room-self-insert-mode.
Options affecting how images are displayed in room buffers.
See image display.

Changes

  • Improve prompt used when viewing a room that is not joined. (#241. Thanks to Phil Sainty.)
  • Format “was kicked and rejoined” membership event pairs.
  • Enclose reasons for membership events in quotes for clarity.
  • Improve default room list grouping.
  • When editing or replying to a message in a compose buffer, the related room event is highlighted persistently until the compose buffer is killed. (Thanks to Phil Sainty.)
  • In compose buffers dabbrev will prioritise firstly the associated room, and secondly all other rooms, before looking to other buffers for completions. (Thanks to Phil Sainty.)
  • Aborted messages are now added to ement-room-message-history rather than the kill-ring. (Thanks to Phil Sainty.)
  • Prefix bindings in ement-room-mode-map now have named labels in which-key and similar. (Thanks to Phil Sainty.)
  • Option: ement-room-use-variable-pitch (previously named ement-room-shr-use-fonts) enables variable-pitch fonts for all message types. (This option previously supported formatted messages, but now works for plain text messages as well.) Note: users who have customized the ement-room-message-text face to be variable-pitch should revert that change, as it causes problems for formatted messages, and is no longer necessary. (#174. Thanks to Phil Sainty.)

Fixes

  • Edits to previous edit events are correctly sent to the server as edits to the original message event. (#230. Thanks to Phil Sainty.)
  • Completion at point works more reliably in compose buffers. (Thanks to Phil Sainty.)
  • Toggling images to fill the window body no longer triggers unintended scrolling. (Thanks to Phil Sainty.)
  • Recognition of mentions after a newline. (#267. Thanks to Phil Sainty.)
  • Newlines in ement-room-message-format-spec are considered when calculating the wrap-prefix. (Thanks to Phil Sainty.)
  • Weight of face ement-room-list-direct (now correctly bold in room list heading).

Compose buffer enhancements

  • Option ement-room-compose-buffer-display-action declares how and where a new compose buffer window should be displayed. (By default, in a new window below the associated room buffer.)
  • Option ement-room-compose-buffer-window-dedicated determines whether compose buffers will have dedicated windows.
  • Option ement-room-compose-buffer-window-auto-height causes dynamic scaling of the compose buffer window height so that the full message is visible at all times.
  • Option ement-room-compose-buffer-window-auto-height-min specifies the minimum window height when ement-room-compose-buffer-window-auto-height is enabled.
  • Option ement-room-compose-buffer-window-auto-height-max specifies the maximum window height when ement-room-compose-buffer-window-auto-height is enabled.
  • Option ement-room-compose-method chooses between minibuffer-centric or compose-buffer-centric behaviour.
  • Command ement-room-dispatch-new-message starts writing a new message using your chosen ement-room-compose-method. (Bound to RET in room buffers.)
  • Command ement-room-dispatch-new-message-alt starts writing a new message using the alternative method. (Bound to M-RET in room buffers.)
  • Command ement-room-dispatch-edit-message edits a message using your chosen ement-room-compose-method. (Bound to <insert> in room buffers.)
  • Command ement-room-dispatch-reply-to-message replies to a message using your chosen ement-room-compose-method. (Bound to S-<return> in room buffers.)
  • Command ement-room-compose-edit edits a message using a compose buffer.
  • Command ement-room-compose-reply replies to a message using a compose buffer.
  • Command ement-room-compose-send-direct sends a message directly from a compose buffer (without the minibuffer). (Bound to C-x C-s in compose buffers.)
  • Command ement-room-compose-abort kills the compose buffer and delete its window. (Bound to C-c C-k in compose buffers.)
  • Command ement-room-compose-abort-no-history does the same without adding to ement-room-message-history. (Equivalent to C-u C-c C-k.)
  • Command ement-room-compose-history-prev-message cycles backwards through ement-room-message-history. (Bound to M-p in compose buffers.)
  • Command ement-room-compose-history-next-message cycles forwards through ement-room-message-history. (Bound to M-n in compose buffers.)
  • Command ement-room-compose-history-isearch-backward initiates an isearch through ement-room-message-history. (Bound to M-r in compose buffers; continue searching with C-r or C-s.)
  • Command ement-room-compose-history-isearch-backward-regexp initiates a regexp isearch through ement-room-message-history. (Bound to C-M-r in compose buffers; continue searching with C-r or C-s.)

ement-room-self-insert-mode

  • Option ement-room-self-insert-commands determines which commands will start a new message when ement-room-self-insert-mode is enabled (defaulting to self-insert-command and yank).
  • Option ement-room-self-insert-chars determines which typed characters will start a new message when ement-room-self-insert-mode is enabled (regardless of whether they are bound to self-insert-command).
  • Option ement-room-mode-map-prefix-key defines a prefix key for accessing the full ement-room-mode-map when ement-room-self-insert-mode is enabled. (By default this key is DEL.)

Image display

  • Option ement-room-image-margin is the number of pixels of margin around image thumbnails.
  • Option ement-room-image-relief is the number of pixels of shadow rectangle around image thumbnails.
  • Option ement-room-image-thumbnail-height is the window body height multiple to use when toggling full-sized images to thumbnails (by default, 0.2).
  • Option ement-room-image-thumbnail-height-min is the minimum pixel height for thumbnail images (by default, 30 pixels).

0.14

Additions

  • Audio events are rendered as a link to the audio file. (Thanks to Arto Jantunen.)
  • Customization group ement-room-list.
  • Option ement-room-list-space-prefix is applied to space names in the room list (e.g. set to empty string for cleaner appearance).
  • Option ement-room-reaction-names-limit sets how many senders of a reaction are shown in the buffer (more than that many are shown in the tooltip).

Changes

  • Bind TAB / BACKTAB to move between links in room and like buffers. (#113. Thanks to Eric S. Fraga for suggesting.)

Fixes

  • Insertion of sender headers (when using “Elemental” message format). (Refactoring contributed by Steven Allen.)
  • Some room event data was being unintentionally serialized to disk when caching the room list visibility state. (#256)
  • Notifications buffer restores properly when bookmarked.
  • Command ement-room-send-reaction checks for an event at point. (Thanks to Phil Sainty.)

0.13

Additions

  • Group joined direct rooms in directory buffers.
  • Command end-of-buffer is bound to N in room buffers.

Changes

  • Command ement-room-image-show use frame parameters to maximize the frame, making it easier for users to override. (#223. Thanks to Nicholas Vollmer.)

Fixes

  • Name for direct rooms in directory buffers.
  • Editing a message from the compose buffer would be sent as a reply to the edited message. (Fixes #189. Thanks to Phil Sainty for reporting.)
  • Editing an already-edited message. (#226. Thanks to Phil Sainty for reporting.)
  • Replying to an already-edited message. (#227. Thanks to Phil Sainty for reporting.)
  • Rendering redactions of edited messages. (#228. Thanks to Phil Sainty for reporting.)
  • Redacting an edited message. (#228. Thanks to Phil Sainty for reporting.)
  • Command ement-room-flush-colors maintains point position.

0.12

Additions

  • Command ement-notifications shows recent notifications, similar to the pane in the Element client. (This new command fetches recent notifications from the server and allows scrolling up to retrieve older ones. Newly received notifications, as configured in the ement-notify options, are displayed in the same buffer. This functionality will be consolidated in the future.)
  • Face ement-room-quote, applied to quoted parts of replies.

Changes

  • Commands ement-room-goto-next and ement-room-goto-prev work more usefully at the end of a room buffer. (Now pressing n on the last event moves point to the end of the buffer so it will scroll automatically for new messages, and then pressing p skips over any read marker to the last event.)
  • Room buffer bindings:
    • ement-room-goto-next and ement-room-goto-prev are bound to n and p, respectively.
    • ement-room-goto-fully-read-marker is bound to M-g M-p (the mnemonic being “go to previously read”).
  • The quoted part of a reply now omits the face applied to the rest of the message, helping to distinguish them.
  • Commands that read a string from the minibuffer in ement-room buffers and ement-connect user ID prompts use separate history list variables.
  • Use Emacs’s Jansson-based JSON-parsing functions when available. (This results in a 3-5x speed improvement for parsing JSON responses, which can be significant for large initial sync responses. Thanks to Ryan Rix for discovering this!)

Fixes

  • File event formatter assumed that file size metadata would be present (a malformed, e.g. spam, event might not have it).
  • Send correct file size when sending files/images.
  • Underscores are no longer interpreted as denoting subscripts when sending messages in Org format. (Thanks to Phil Sainty.)
  • Add workaround for savehist-mode’s serializing of the command-history variable’s arguments. (For ement- commands, that may include large data structures, like ement-session structs, which should never be serialized or reused, and savehist’s doing so could cause noticeable delays for users who enabled it). (See #216. Thanks to Phil Sainty and other users who helped to discover this problem.)

0.11

Additions

  • Commands ement-room-image-show and ement-room-image-scale (bound to RET and M-RET when point is at an image) view and scale images. (Thanks to Steven Allen for these and other image-related improvements.)
  • Command ement-room-image-show-mouse is used to show an image with the mouse.

Changes

  • Enable image-mode when showing images in a new buffer. (Thanks to Steven Allen.)
  • Command ement-room-image-show is not used for mouse events.
  • Show useful message in SSO login page.

Fixes

  • Allow editing of already-edited events.
  • Push rules’ actions may be listed in any order. (Fixes compatibility with v1.7 of the spec. Thanks to Steven Allen.)
  • Call external browser for SSO login page. (JavaScript is usually required, which EWW doesn’t support, and loading the page twice seems to change state on the server that causes the SSO login to fail, so it’s best to load the page in the external browser directly).
  • Clean up SSO server process after two minutes in case SSO login fails.
  • Don’t stop syncing if an error is signaled while sending a notification.
  • Command ement-room-list-next-unread could enter an infinite loop. (Thanks to Visuwesh and @mrtnmrtn:matrix.org.)
  • Events in notifications buffer could appear out-of-order. (#191. Thanks to Phil Sainty.)

Internal

  • The ement-read-receipt-idle-timer could be duplicated when using multiple sessions. (#196. Thanks to Phil Sainty.)

0.10

Security Fixes

  • When uploading a GPG-encrypted file (i.e. one whose filename ends in .gpg), if the recipient’s private key or the symmetric encryption key were cached by Emacs (or a configured agent, like gpg-agent), Emacs would automatically decrypt the file while reading its contents and then upload the decrypted contents. (This happened because the function insert-file-contents was used, which does many things automatically, some of which are not even mentioned in its docstring; refer to its entry in the Elisp Info manual for details. The fix is to use insert-file-contents-literally instead.) Thanks to @welkinsl:matrix.org for reporting.

Additions

Changes

  • Activating a space in the room list uses ement-view-space (which shows a directory of rooms in the space) instead of ement-view-room (which shows events in the space, which is generally not useful).
  • Command ement-view-room, when used for a space, shows a footer explaining that the buffer is showing a space rather than a normal room, with a button to call ement-view-space for it (which lists rooms in the space).
  • Command ement-describe-room shows whether a room is a space or a normal room.
  • Command ement-view-space shows the space’s name and alias.
  • Command ement-room-scroll-up-mark-read moves the fully read marker to the top of the window (when the marker’s position is within the range of known events), rather than only moving it when at the end of the buffer. (This eases the process of gradually reading a long backlog of messages.)
  • Improve readme export settings.

Fixes

  • Extra indentation of some membership events. (Thanks to Steven Allen.)
  • Customization group for faces.
  • Don’t reinitialize ement-room-list-mode when room list buffer is refreshed. (#146. Thanks to Ted Reed for reporting.)
  • Don’t fetch old events when scrolling to the bottom of a room buffer (only when scrolling to the top). (Thanks to Steven Allen.)
  • Minor improvements to auto-detection of homeserver URIs. (See #24. Thanks to Phil Sainty.)
  • Uploading of certain filetypes (e.g. Emacs would decompress some archives before uploading). Thanks to @welkinsl:matrix.org for reporting.
  • Messages edited multiple times sometimes weren’t correctly replaced.

0.9.3

Fixes

  • Another attempt at restoring position in room list when refreshing.
  • Command ement-room-list-next-unread.

0.9.2

Fixes

  • Restore position in room list when refreshing.
  • Completion in minibuffer.

0.9.1

Fixes

  • Error in ement-room-list command upon initial sync.

0.9

Additions

  • Option ement-room-timestamp-header-align controls how timestamp headers are aligned in room buffers.
  • Option ement-room-view-hook runs functions when ement-room-view is called. (By default, it refreshes the room list buffer.)
  • In the room list, middle-clicking a room which has a buffer closes its buffer.
  • Basic support for video events. (Thanks to Arto Jantunen.)

Changes

  • Using new option ement-room-timestamp-header-align, timestamp headers default to right-aligned. (With default settings, this keeps them near message timestamps and makes for a cleaner appearance.)

Fixes

  • Recognition of certain MXID or displayname forms in outgoing messages when linkifying (aka “pilling”) them.
  • Unreadable room avatar images no longer cause errors. (Fixes #147. Thanks to @jgarte for reporting.)
  • Don’t error in ement-room-list when no rooms are joined. (Fixes #123. Thanks to @Kabouik and Omar Antolín Camarena for reporting.)
  • Enable member/room completion in compose buffers. (Fixes #115. Thanks to Thanks to Justus Piater and Caleb Chase for reporting.)

0.8.3

Fixes

  • Avoid use of pcase’s (map :KEYWORD) form. (This can cause a broken installation on older versions of Emacs that have an older version of the map library loaded, such as Emacs 27.2 included in Debian 11. Since there’s no way to force Emacs to actually load the version of map required by this package before installing it (which would naturally happen upon restarting Emacs), we can only avoid using such forms while these versions of Emacs are widely used.)

0.8.2

Fixes

  • Deduplicate grouped membership events.

0.8.1

Added missing changelog entry (of course).

0.8

Additions

  • Command ement-create-space creates a new space.
  • Command ement-room-toggle-space toggles a room’s membership in a space (a way to group rooms in Matrix).
  • Visibility of sections in the room list is saved across sessions.
  • Command ement-room-list-kill-buffer kills a room’s buffer from the room list.
  • Set device_id and initial_device_display_name upon login (e.g. Ement.el: username@hostname). (#134. Thanks to Arto Jantunen for reporting.)

Changes

  • Room-related commands may be called interactively with a universal prefix to prompt for the room/session (allowing to send events or change settings in rooms other than the current one).
  • Command ement-room-list reuses an existing window showing the room list when possible. (#131. Thanks to Jeff Bowman for suggesting.)
  • Command ement-tag-room toggles tags (rather than adding by default and removing when called with a prefix).
  • Default room grouping now groups “spaced” rooms separately.

Fixes

  • Message format filter works properly when writing replies.
  • Improve insertion of sender name headers when using the “Elemental” message format.
  • Prompts in commands ement-leave-room and ement-forget-room.

0.7

Additions

  • Command ement-room-override-name sets a local override for a room’s display name. (Especially helpful for 1:1 rooms and bridged rooms. See MSC3015.)

Changes

  • Improve display of room tombstones (displayed at top and bottom of buffer, and new room ID is linked to join).
  • Use descriptive prompts in ement-leave-room and ement-forget-room commands.

Fixes

  • Command ement-view-space when called from a room buffer. (Thanks to Richard Brežák for reporting.)
  • Don’t call display-buffer when reverting room list buffer. (Fixes #121. Thanks to mekeor for reporting.)
  • Retry sync for network timeouts. (Accidentally broken in v0.6.)

Internal

  • Function ement-put-account-data accepts :room argument to put on a room’s account data.

0.6

Additions

  • Command ement-view-space to view a space’s rooms in a directory buffer.

Changes

  • Improve ement-describe-room command (formatting, bindings).

Fixes

  • Retry sync for HTTP 502 “Bad Gateway” errors.
  • Formatting of unban events.
  • Update password authentication according to newer Matrix spec. (Fixes compatibility with Conduit servers. #66. Thanks to Travis Peacock, Arto Jantunen, and Stephen D.)
  • Image scaling issues. (Thanks to Visuwesh.)

0.5.2

Fixes

  • Apply ement-initial-sync-timeout properly (important for when the homeserver is slow to respond).

0.5.1

Fixes

  • Autoload ement-directory commands.
  • Faces in ement-directory listings.

0.5

Additions

  • Present “joined-and-left” and “rejoined-and-left” membership event pairs as such.
  • Process and show rooms’ canonical alias events.

Changes

  • The taxy.el-based room list, with programmable, smart grouping, is now the default ement-room-list. (The old, tabulated-list-mode-based room list is available as ement-tabulated-room-list.)
  • When selecting a room to view with completion, don’t offer spaces.
  • When selecting a room with completion, empty aliases and topics are omitted instead of being displayed as nil.

Fixes

  • Use of send-message filter when replying.
  • Replies may be written in compose buffers.

0.4.1

Fixes

  • Don’t show “curl process interrupted” message when updating a read marker’s position again.

0.4

Additions

  • Option ement-room-unread-only-counts-notifications, now enabled by default, causes rooms’ unread status to be determined only by their notification counts (which are set by the server and depend on rooms’ notification settings).
  • Command ement-room-set-notification-state sets a room’s notification state (imitating Element’s user-friendly presets).
  • Room buffers’ Transient menus show the room’s notification state (imitating Element’s user-friendly presets).
  • Command ement-set-display-name sets the user’s global displayname.
  • Command ement-room-set-display-name sets the user’s displayname in a room (which is also now displayed in the room’s Transient menu).
  • Column Notifications in the ement-taxy-room-list buffer shows rooms’ notification state.
  • Option ement-interrupted-sync-hook allows customization of how sync interruptions are handled. (Now, by default, a warning is displayed instead of merely a message.)

Changes

  • When a room’s read receipt is updated, the room’s buffer is also marked as unmodified. (In concert with the new option, this makes rooms’ unread status more intuitive.)

Fixes

  • Binding of command ement-forget-room in room buffers.
  • Highlighting of @room mentions.

0.3.1

Fixes

  • Room unread status (when the last event in a room is sent by the local user, the room is considered read).

0.3

Additions

  • Command ement-directory shows a server’s room directory.
  • Command ement-directory-search searches a server’s room directory.
  • Command ement-directory-next fetches the next batch of rooms in a directory.
  • Command ement-leave-room accepts a FORCE-P argument (interactively, with prefix) to leave a room without prompting.
  • Command ement-forget-room accepts a FORCE-P argument (interactively, with prefix) to also leave the room, and to forget it without prompting.
  • Option ement-notify-mark-frame-urgent-predicates marks the frame as urgent when (by default) a message mentions the local user or “@room” and the message’s room has an open buffer.

Changes

  • Minor improvements to date/time headers.

Fixes

  • Command ement-describe-room for rooms without topics.
  • Improve insertion of old messages around existing timestamp headers.
  • Reduce D-Bus notification system check timeout to 2 seconds (from the default of 25).
  • Compatibility with Emacs 27.

0.2.1

Fixes

  • Info manual export filename.

0.2

Changes

  • Read receipts are re-enabled. (They’re now implemented with a global idle timer rather than window-scroll-functions, which sometimes caused a strange race condition that could cause Emacs to become unresponsive or crash.)
  • When determining whether a room is considered unread, non-message events like membership changes, reactions, etc. are ignored. This fixes a bug that caused certain rooms that had no message events (like some bridged rooms) to appear as unread when they shouldn’t have. But it’s unclear whether this is always preferable (e.g. one might want a member leaving a room to cause it to be marked unread), so this is classified as a change rather than simply a fix, and more improvements may be made to this in the future. (Fixes #97. Thanks to Julien Roy for reporting and testing.)
  • The ement-taxy-room-list view no longer automatically refreshes the list if the region is active in the buffer. (This allows the user to operate on multiple rooms without the contents of the buffer changing before completing the process.)

Fixes

  • Links to only rooms (as opposed to links to events in rooms) may be activated to join them.
  • Read receipts mark the last completely visible event (rather than one that’s only partially displayed).
  • Prevent error when a room avatar image fails to load.

0.1.4

Fixed

  • Info manual directory headers.

0.1.3

Fixed

  • Temporarily disable sending of read receipts due to an unusual bug that could cause Emacs to become unresponsive. (The feature will be re-enabled in a future release.)

0.1.2

Fixed

  • Function ement-room-sync correctly updates room-list buffers. (Thanks to Visuwesh.)
  • Only send D-Bus notifications when supported. (Fixes #83. Thanks to Tassilo Horn.)

0.1.1

Fixed

  • Function ement-room-scroll-up-mark-read selects the correct room window.
  • Option ement-room-list-avatars defaults to what function display-images-p returns.

0.1

After almost two years of development, the first tagged release. Submitted to GNU ELPA.

Development

Bug reports, feature requests, suggestions — oh my!

Copyright Assignment

Ement.el is published in GNU ELPA and is considered part of GNU Emacs. Therefore, cumulative contributions of more than 15 lines of code require that the author assign copyright of such contributions to the FSF. Authors who are interested in doing so may contact [email protected] to request the appropriate form.

Matrix spec in Org format

An Org-formatted version of the Matrix spec is available in the meta/spec branch.

Rationale

This section is preserved for posterity. As it says, Ement.el has long since surpassed ~matrix-client~, which should no longer be used.

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 does not use Matrix’s lazy-loading feature (which was added to the specification later), so initial sync requests can take a long time for the server to process and can be large (sometimes tens of megabytes of JSON for the client to process!). Ement.el uses lazy-loading, which significantly improves performance.
  • matrix-client automatically makes buffers for every room a user has joined, even if the user doesn’t currently want to watch a room. Ement.el opens room buffers on-demand, improving performance by not having to insert events into buffers for rooms the user isn’t watching.
  • 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.

Note that, while matrix-client remains usable, and probably will for some time to come, Ement.el has now surpassed it in every way. The only reason to choose matrix-client instead is if one is using an older version of Emacs that isn’t supported by Ement.el.

License

GPLv3

ement.el's People

Contributors

9viz avatar akater avatar alphapapa avatar hochata avatar jgarte avatar oantolin avatar polaris64 avatar progfolio avatar stebalien avatar tarsius avatar treed avatar tsdh avatar viiru- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ement.el's Issues

Link to events in room buffer (e.g. Org links)

To me, a killer feature would be the ability to link to ement messages from org files.

This seems to be quite easy to implement, using event ids as anchors.

@alphapapa, would this feature be appreciated? I might give it a shot myself when I find the time.

Password login fails

I installed plz and ement per straight, like this:

(use-package plz
  :straight (plz :host github :repo "alphapapa/plz.el"))

(use-package ement
  :straight (ement :host github :repo "alphapapa/ement.el"))

When I run M-x ement-connect, I'm asked for login-credentials but it does not do anything then. Same in IELM:

ELISP> (ement-connect "NICK@:matrix.org" "PASSWORD")
#<process plz-request-curl>

I also tried to debug it (with edebug) but I could not understand much.

What's wrong? Any idea? :)

Remember and verify login.

Is it possible to remember and verify the login/session details, currently when I open Emacs I have to run ement-connect and enter my username and password to login, and if I close and reopen Emacs it forgets the login details, and I have to login again. Is there some variable that I can set for my username, server and a password command, like for using with gpg probably. As I have my configuration on a public repository, so I don't want to expose my password.

Error message on retrieving earlier messages

I tried M-v to get message history; the history did show up but I also got an error message.

Debugger entered--Lisp error: (wrong-type-argument ement-event #s(ement-user :id "@alphapapa:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 2/65 0x1fef44d3634d> :color "#e26fc4" :username nil))
  signal(wrong-type-argument (ement-event #s(ement-user :id "@alphapapa:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 2/65 0x1fef44d3634d> :color "#e26fc4" :username nil)))
  #f(compiled-function (event) #<bytecode 0x1fef4523f2e9>)(#s(ement-user :id "@alphapapa:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 2/65 0x1fef44d3634d> :color "#e26fc4" :username nil))
  ement-room--insert-event(#s(ement-event :id ...))

This happens in every room for me. Just in case, proxy is not enabled.

install issues

Hello,

I'm trying to install this package on my openbsd system.

I've tried with quelpa and the plz package installs but ement errors with:

Debugger entered--Lisp error: (file-missing "Opening input file" "No such file or directory" "/home/ds/.cache/emacs/quelpa/packages/ement-202110...")
  insert-file-contents("/home/ds/.cache/emacs/quelpa/packages/ement-202110..." nil nil nil nil)
  insert-file-contents-literally("/home/ds/.cache/emacs/quelpa/packages/ement-202110...")
  quelpa-get-package-desc("/home/ds/.cache/emacs/quelpa/packages/ement-202110...")
  quelpa-package-install((ement :fetcher github :repo "alphapapa/ement.el"))
  apply(quelpa-package-install (ement :fetcher github :repo "alphapapa/ement.el") nil)
  quelpa((ement :fetcher github :repo "alphapapa/ement.el"))
  eval((quelpa '(ement :fetcher github :repo "alphapapa/ement.el")) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

I tried installing ement like so:

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

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

I then tried to git clone the repo and install with:

./makem.sh compile

which fails with:

getopt: unknown option -- o
getopt: unknown option -- l

It then prints the usage.

Would you know what's going wrong?

Is it possible currently to use ement in a tty?

I get this error:

Warning (ement): This Emacs was not built with ImageMagick support, nor does it support Cairo/XRender scaling, so images can't be displayed in Ement

Maybe there is a solution similar to what ranger does?

Prompt for homeserver instead of assuming it

When trying to connect with ement-connect, I am only prompted for my id @steew:steew.cyou and password, but not the homeserver.
My actual homeserver is located at matrix.steew.cyou, not steew.cyou, so it is wrongly trying to request an invalid host.
matrix-client.el did prompt for it so I could connect properly.
Best regards.

feature request: file upload/download support

I use matrix as a simple way to share files between people/devices.

From what I've seen, I can tell that there isn't a way to upload/download files (or maybe it's just not well documented?). It doesn't seem like that difficult of a feature to add. The terminal client gomuks supports it.

However, I don't have much experience with elisp to easily add it, so any tips would be appreciated if you're not interested in adding this feature.

It would also be cool to have a list view of room's media/files - just like in Element. I can create a separate feature request for this if you wish.

feature request: load `ement-room-scroll-down` when top of buffer reached

Hello,

Would it be possible for ement-room-scroll-down to be called when the point is at the top of the buffer and previous-line (or scroll-up) is called? It would make it easier to go back in history when reading missed messages and prevent having to remember to call ement-room-scroll-down specifically.

As always, thanks a lot for your work.

EV

{C-x C-s} in compose-buffer leaves behind stale window

Currently, {C-x C-s} in compose buffer leaves behind a stale window
because ement uses kill-buffer. Ideally, we would also want to close
the window that was created for the compose buffer (as indicated by
the FIXME comment).

This can be fixed by using `quit-restore-window' instead. See below

index 932009b..372a0a0 100644
--- a/ement-room.el
+++ b/ement-room.el
@@ -2199,8 +2199,7 @@ To be called from an `ement-room-compose' buffer."
         (session ement-session)
         (input-method current-input-method)
         (send-message-filter ement-room-send-message-filter))
-    ;; FIXME: This leaves the window from the compose buffer open, which feels awkward.
-    (kill-buffer (current-buffer))
+    (quit-restore-window (selected-window) 'kill)
     (ement-view-room session room)
     (let* ((prompt (format "Send message (%s): " (ement-room-display-name ement-room)))
            (current-input-method input-method) ; Bind around read-string call.

Ement scrolls image buffers upon insertion of new events

I apologise right away for this vague report. I tried to investigate to be more specific, only to be unsuccessful.

If you have ement connected and have a room buffer opened (but not viewed anywhere), and the current buffer is a pdf-tools buffer [*], upon insertion of new events in the ement room buffer, the pdf buffer is scrolled. This behaviour is not exhibited by "regular" buffers, as in buffers that only show text. I have been unsuccessful so far in coming up with a reproducer but it goes like this:

  1. M-x ement-connect RET
  2. Open a room.
  3. Visit a pdf file.
  4. Wait for an event to come up in the room, and watch the PDF file get scrolled. Sometimes, it takes an event or two to see the behaviour.

[*] I'm using pdf-tools in my description but I observe it in doc-view as well, or even an image-mode buffer with the image inserted such that it can be scrolled (i.e., "s b + +").

Edebug so far has not been very helpful... And nothing unusual shows up in lossage.

EDIT: In my tests, I had to scroll up in the image before (C-v). Ement scrolls down when there's an event. I haven't observed the inverse so far.

Manual ement-room-mark-read: (wrong-type-argument ewoc nil)

I noticed that private rooms created via the new functions from b09e8ca retain an unread flag even if visiting the room and reading all msgs. A manual (ement-room-mark-read) leads to:

Debugger entered--Lisp error: (wrong-type-argument ewoc nil)
  signal(wrong-type-argument (ewoc nil))
  ewoc-locate(nil)
  byte-code("\10\11\303\304\n!\211\305H\262\1\306\304\n!\211\305H\262\1\257\6\207" [ement-room ement-session ement-ewoc :read-event ewoc-locate 2 :fully-read-event] 8)
  call-interactively(ement-room-mark-read record nil)
  command-execute(ement-room-mark-read record)
  helm-M-x-execute-command(ement-room-mark-read)
  helm-execute-selection-action-1()
  helm-execute-selection-action()
  helm-internal((((name . "Emacs Commands history") (init #f(compiled-function () #<bytecode 0x2d5ffb9>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keep...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x4acee79>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search)) ((name . "Emacs Commands") (init #f(compiled-function () #<bytecode 0x404f495>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keep...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x3210339>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search))) nil "M-x " nil nil "*helm M-x*" nil nil helm-M-x-input-history)
  apply(helm-internal ((((name . "Emacs Commands history") (init #f(compiled-function () #<bytecode 0x2d5ffb9>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) (f1 lambda nil ... ...) (8 . helm-next-source) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . helm-follow-action-forward) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keeping se...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x4acee79>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search)) ((name . "Emacs Commands") (init #f(compiled-function () #<bytecode 0x404f495>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) (f1 lambda nil ... ...) (8 . helm-next-source) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . helm-follow-action-forward) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keeping se...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x3210339>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search))) nil "M-x " nil nil "*helm M-x*" nil nil helm-M-x-input-history))
  helm((((name . "Emacs Commands history") (init #f(compiled-function () #<bytecode 0x2d5ffb9>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keep...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x4acee79>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search)) ((name . "Emacs Commands") (init #f(compiled-function () #<bytecode 0x404f495>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keep...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x3210339>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search))) nil "M-x " nil nil "*helm M-x*" nil nil helm-M-x-input-history)
  apply(helm ((((name . "Emacs Commands history") (init #f(compiled-function () #<bytecode 0x2d5ffb9>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) (f1 lambda nil ... ...) (8 . helm-next-source) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . helm-follow-action-forward) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keeping se...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x4acee79>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search)) ((name . "Emacs Commands") (init #f(compiled-function () #<bytecode 0x404f495>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) (f1 lambda nil ... ...) (8 . helm-next-source) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . helm-follow-action-forward) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keeping se...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x3210339>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search))) nil "M-x " nil nil "*helm M-x*" nil nil helm-M-x-input-history))
  helm(:sources (((name . "Emacs Commands history") (init #f(compiled-function () #<bytecode 0x2d5ffb9>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keep...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x4acee79>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search)) ((name . "Emacs Commands") (init #f(compiled-function () #<bytecode 0x404f495>)) (candidates . helm-candidates-in-buffer) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . helm-mode-delete-char-backward-maybe) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (C-iso-lefttab . helm-follow-action-backward) (26 . helm-select-action) (tab . helm-execute-persistent-action) (33554440 . describe-key) (33554443 . helm-follow-action-backward) (33554442 . helm-follow-action-forward) (17 . ace-jump-helm-line) (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x332d3d9>)) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort #f(compiled-function (candidates source) #<bytecode 0x5f793e1>) helm-fuzzy-highlight-matches) (volatile . t) (match identity) (fuzzy-match . t) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "TAB: Describe this command (keep...") (multimatch . t) (must-match . t) (group . helm-command) (data . #f(compiled-function () #<bytecode 0x3210339>)) (get-line . buffer-substring-no-properties) (search helm-mm-exact-search helm-mm-search helm-candidates-in-buffer-search-default-fn helm-fuzzy-search))) :prompt "M-x " :buffer "*helm M-x*" :history helm-M-x-input-history)
  helm-M-x-read-extended-command([PROLATIONE $CfyXxkxeGmPBrJRlr1Hmc4BiqKWTMd48JwMTMBbh4TA HRYVNIA HEIGHT $xNcW3pxRP0jpxMXsM2Vfkn5b6sdZZvsKMJCvD_olMio LOCK REAHMUK $LZ2XBfg8GV4KW_g7PrJPta7X5ebewLMq4sJUVnSpmtU @fantomelement:matrix\.org $65RUUi8EVIKwb1TOafQsHZKdIc6wA1glwPaI-km-Mek DYAN @skyere:matrix\.org $pKb267I6qVnxPTpAWnATXVGF3jU9kPTJ9w13Qc_wyqM @david\.nutting:matrix\.org NUTILLU yaml--the-end AMPS @al4min:matrix\.org forge--color-luminance MFIEE --cl-block-jupyter-org-request-id-cleared-p--cmacro-- TEEEE ENUMERATION ZZYA cl-print--preprocess STWA $TJGlhVA4TVzeLMxuboPXlJ0RFEH7d-narumlEihuZfY @ashereye:matrix\.org @moritzmoritzmoritz:matrix\.org \1245678 @amnesy:matrix\.org AITON $5b2VeDsfW2qWdPw1dJQZAVUIWMkbJ6MJQThU_T1g7Gs RITUAL @slonner:matrix\.org @adridri:matrix\.org @kingo12444:matrix\.org $hSrcFPJnChU6EJ378iFhfYYQFc2gmZ89kPgvBvxr4ts ZZYP \' ZZYR @doe_nubkdes:matrix\.org ZZYT VITAE YAEMMAE EHTA ZZYX BEETA $l0py-gF5HXEKryNXpPXPvPJaWTpFHqoxWWsLor4zcFk \1 ...])
  helm-M-x(nil)
  funcall-interactively(helm-M-x nil)
  call-interactively(helm-M-x)
  (let ((completion-styles completion-styles)) (add-to-list 'completion-styles 'flex t) (call-interactively 'helm-M-x))
  spacemacs/helm-M-x-fuzzy-matching()
  funcall-interactively(spacemacs/helm-M-x-fuzzy-matching)
  call-interactively(spacemacs/helm-M-x-fuzzy-matching nil nil)
  command-execute(spacemacs/helm-M-x-fuzzy-matching)

Should ement-room-image-keymap be a child of image-map?

image-map has keys defined for scaling and rotating images. I think
it would be handy to have these commands so we can resize/rotate images
in-buffer. Org-mode, for instance, puts this keymap in the inline
image overlay.

ement-room-image-scale-mouse breaks after scaling the image with +/- though since
(image-property image :max-height) evaluates to nil.

Replies without replied-to content in reply body

Some clients don't have the replied to message in body or format_body fields. So one has to rely on the event_id cited in m.relates_to->m.in_reply_to. Example of such an event is (I stripped out the id),

((:id . "ID")
 (:sender . "@_discord_296842705454235650:t2bot.io")
 (:content
  (body . "sheesh u passed out at 4pm?")
  (format . "org.matrix.custom.html")
  (formatted_body . "sheesh u passed out at 4pm?")
  (m\.relates_to
   (m\.in_reply_to
	(event_id . "$TluJm8weVHXI3gwsD-kSeI1HM3UOGIzqe8b-ybmdyb4")))
  (msgtype . "m.text"))
 (:origin-server-ts . 1648191029121)
 (:type . "m.room.message")
 (:state-key)
 (:unsigned))

This is from the t2bot bridging a discord channel and a matrix room.

I can take a stab at implementing this on May.

Allow to explicitly state server's hostname when calling ement-connect.

Right now, if the server's well-known URI is not known, ement asks the user to input the server hostname. Having an optional arg to explicitly specify the server hostname will be convenient as I usually call `ement-connect' as follows:

(ement-connect "<myaccount>" (pass "<myaccount>"))

where the `pass' function prompts me for the master password. If the optional arg was added, it would be:

(ement-connect "<myaccount>" (pass "<myaccount>") "serverhostname")

saving me from having to type the server hostname every time.

tracking.el support

Wibjarm posted this in #ement.el:matrix.org:

So it turns out to be conveniently simple to plug ement into the modeline channel tracking from circe and get my preferred setup of "tag in the modeline on new messages, desktop notification on mentions"

(defun my/ement-notify-track-if-buffer (event room session)
    (when (ement-notify--room-buffer-live-p event room session)
      (tracking-add-buffer (map-elt (ement-room-local room) 'buffer))))

It's literally just adding this to ement-notify-functions

I'm not sure what the best thing to do now is: add this to the readme as a simple example of code users can copy into their config, put it in an ement-tracking.el file that users can load, or put it into ement-notify.el in a way that avoids compile-time, load-time, and run-time warnings.

Connection fails with pantalaimon

Hi, i always get the following error, trying to connect to matrix.org via pantalaimon:
error in process sentinel: Ement API error: "Ement: Unrecognized network error", #s(plz-error nil #s(plz-response 1.1 401 ((access-control-allow-headers . "Origin, X-Requested-With, Content-Type, Accept, Authorization") (access-control-allow-methods . "GET, POST, PUT, DELETE, OPTIONS") (access-control-allow-origin . "*") (content-type . "application/json") (content-length . "84") (date . "Mon, 21 Feb 2022 16:51:38 GMT") (server . "Python/3.9 aiohttp/3.8.1")) "{\"errcode\":\"M_UNKNOWN_TOKEN\",\"error\":\"Invalid macaroon passed.\",\"soft_logout\":false}") nil) [2 times]

Image insertion: "wrong-type-argument consp nil"

I encounter "wrong-type-argument consp nil" when trying to use ement.el.

I include the trace below.

I use a recently built emacs from master.

I guess something goes wrong with setting image properties?

/Joakim

Debugger entered--Lisp error: (wrong-type-argument consp nil)
image--set-property(nil :max-height 24)
ement--resize-image(nil nil 24)
ement-room-list--entry(#s(ement-session :user ... :server ... :token "syt_am9ha2lt_t..." :transaction-id 2465066195 :rooms ... :next-batch "s87075_102557_..." :device-id "RARSEKDBBL" :initial-device-display-name nil :has-synced-p t :account-data ... :events #<hash-table equal 371/487 0x1acb65d>) #s(ement-room :id "!QvxjshMimBMyV..." :display-name "gitlab/gitlab" :prev-batch "t3408--98_1025..." :summary ... :state ... :timeline ... :ephemeral nil :account-data ... :unread-notifications nil :latest-ts 1636729310691 :topic "Version Contro..." :canonical-alias "#gitlab_gitlab..." :avatar ... :type join ...))
#f(compiled-function (room) #<bytecode 0x1b0092d6f92d1489>)(#s(ement-room :id "!QvxjshMimBMyVIijfP:..." :display-name "gitlab/gitlab" :prev-batch "t3408--98_102549_102..." :summary (... ...) :state (... ... ... ... ... ... ... ... ... ... ...) :timeline (... ... ... ... ... ... ... ... ... ...) :ephemeral nil :account-data (...) :unread-notifications nil :latest-ts 1636729310691 :topic "Version Control on y..." :canonical-alias "#gitlab_gitlab:gitte..." :avatar #(" " 0 1 ...) :type join :invite-state nil :local (... ...)))
ement-room-list--set-entries()
tabulated-list-revert(nil nil)
revert-buffer()
ement-room-list-auto-update(#s(ement-session :user ... :server ... :token "syt_am9ha2lt_t..." :transaction-id 2465066195 :rooms ... :next-batch "s87075_102557_..." :device-id "RARSEKDBBL" :initial-device-display-name nil :has-synced-p t :account-data ... :events #<hash-table equal 371/487 0x1acb65d>))
run-hook-with-args(ement-room-list-auto-update #s(ement-session :user ... :server ... :token "syt_am9ha2lt_t..." :transaction-id 2465066195 :rooms ... :next-batch "s87075_102557_..." :device-id "RARSEKDBBL" :initial-device-display-name nil :has-synced-p t :account-data ... :events #<hash-table equal 371/487 0x1acb65d>))
ement--sync-callback(#s(ement-session :user ... :server ... :token "syt_am9ha2lt_t..." :transaction-id 2465066195 :rooms ... :next-batch "s87075_102557_..." :device-id "RARSEKDBBL" :initial-device-display-name nil :has-synced-p t :account-data ... :events #<hash-table equal 371/487 0x1acb65d>) (... ... ... ...))
apply(ement--sync-callback (... ...))
#f(compiled-function (&rest args2) #<bytecode -0xae4d5759041c51d>)(((next_batch . "s87075_102557_1032_3749_508_4_166_24818_1") (device_one_time_keys_count (signed_curve25519 . 0)) (org.matrix.msc2732.device_unused_fallback_key_types . []) (rooms (join (!JHAvEUUQKeqCqhJduQ:verona.se (timeline (events . []) (prev_batch . "s87075_102555_1031_3749_508_4_166_24818_1") (limited . :json-false)) (state (events . [])) (account_data (events . [])) (ephemeral (events . [...])) (unread_notifications (notification_count . 0) (highlight_count . 0)) (summary) (org.matrix.msc2654.unread_count . 0))))))
#f(compiled-function () #<bytecode 0xedcb3490649e78c>)()
plz--sentinel(# "finished\n")
ement-room-read-string("Send message (Pelle (Signal)): " nil nil nil inherit-input-method)
byte-code("\10\204\10\0\305\300!\210\11\204\20\0\305\301!\210\10\11\306\307\310\4!\n>\204$\0\311\312\300\6\6D"\210\3\313H"\314\216\13\203>\0\f\2036\0..." [ement-room ement-session cl-struct-ement-room-tags ement-room-send-typing ement-room-typing-timer cl--assertion-failed format "Send message (%s): " type-of signal wrong-type-argument 2 #f(compiled-function () #<bytecode 0x6e043aa79b3f2c>) cancel-timer run-at-time nil 15 ement-room--send-typing ement-room-read-string inherit-input-method :body] 9)
command-execute(ement-room-send-message)

Reset timestamp faces when theme changes

The automatic generation of faces for the time column is pretty sweet, but if I toggle between light and dark themes, the faces don't get updated. I could presumably add something to modus-themes-after-load-theme-hook in my case, but I'd need a function to call which can do that.

For now the workaround is closing the rooms list buffer and reopening it, so it's not high priority, but I figured I'd put the request in.

Transaction ID reuse warning

Hi there,

First of all, thanks so much for your work! It's great to have a Matrix chat client in Emacs!

I've been using Ement.el for the past week, mainly to communicate in E2EE rooms via Pantalaimon. I seem to be getting the following warning quite frequently: -

Warning (ement-room-send-event-callback): Event ID "${event-id}" already seen in session "@{my-username}".
This may indicate a reused transaction ID, which likely means that the event was not sent to the room ("{room-name}").
You may need to disconnect, delete the `ement-session-file', and connect again to start a new session.
Event content: (("format" . "org.matrix.custom.html") ("formatted_body" . "<p>
{message-content}</p>") ("msgtype" . "m.text") ("body" . "{message-content}"))

(I've replaced some actual details with identifiers in braces, e.g. {event-id}).

The first time this appears it seems to delay my message from being sent, but it does get sent after a few seconds. However the second time prevents the message from being sent at all. If I disconnect (without deleting ement-session-file as I cannot find this file stored anywhere) and reconnect then it all seems to be fine again, but just for a while.

map.el 2.1+ is required ("Symbol’s value as variable is void: sender")

I am able to sucessfully run ement-connect and can send messages in rooms. However, I cannot see any of the messages in any of the room buffers and it seems that many commands results in Symbol’s value as variable is void: sender

Ement: Checking server’s login flows...
Ement: Logging in with password...
Ement: Sync request sent, waiting for response...
Ement: Response arrived after 1.79 seconds. Reading 1.1M JSON response...
Ement: Reading JSON took 0.15 seconds
Ement: Reading events...
Ement: Sync request sent, waiting for response...
Ement: Sync done. Use commands ‘ement-list-rooms’ or ‘ement-view-room’ to view a room.
ement-room--format-message: Symbol’s value as variable is void: sender
ement-room--format-message: Symbol’s value as variable is void: sender

I'm running Doom on Emacs 28.0.50

I don't have any custom configuration for ement - any suggestions?

Grouping rooms in room list buffer

transient.el is known to be used in magit.el. It's pretty, allows to jump between sections easily, allows to expand or fold sections and allows different actions on items below the cursor. I think it suits perfectly fo ement-room-list. Should ement.el use it?

Need to compensate for lack of fringes when using TTY

Overview

I'm dealing with incorrectly displayed timestamps. Imagine a frame split vertically into two windows, with the same chatroom buffer displayed in them. Timestamps in the left one are missing the last char:

┌────────┬─────────┐
│a: hey  │a: hey   │
│ 12:34:5│ 12:34:56│
│        │         │
│        │         │
│        │         │
│        │         │
│        │         │
│        │         │
└────────┴─────────┘

Whenever the frame is split vertically into several windows, timestamps are only displayed correctly in the rightmost one.

Reproducing

  1. I ran this in tty, with dimensions 160x57. This may or may not be relevant.

  2. Run

emacs -Q \
      -L /usr/share/emacs/site-lisp/dash \
      -L /usr/share/emacs/site-lisp/ement \
      -L /usr/share/emacs/site-lisp/plz \
      -L /usr/share/emacs/site-lisp/s \
      -L /usr/share/emacs/site-lisp/ts \
      --eval "(require 'ement)" \
      --eval "(require 'ement-room-list)"

(modulo path to libraries)

  1. Eval (ement-connect "@user:matrix.org" "***").

  2. Visit a chatroom buffer.

  3. Ensure the frame is split vertically into two windows with the same chatroom buffer dispalyed in both of them.

  4. Observe incorrectly displayed timestamps in the left window.

Sending new message should be "in buffer" rather than a "prompt" in minibuffer.

First thanks for this new client for matrix, this looks and feels really nice and clean from the old matrix-client.el.

I noticed that to send a message you need to get to insert mode (as I'm using evil mode) and then press RET, then you get a prompt in minibuffer to type a message, to me at least it feels weird, I would prefer to type the message in buffer, like for example how telega or ERC has, just shows a > in buffer and you can go to insert mode start typing and press RET and send the message.

Prevent membership events from marking rooms unread

I don't know if there's already something for that, but often, when I'm looking at the room list I think that a room has new messages, but it's only some join/leave or nick changes.

Does the room list make the distinction between all events vs unread messages?

Compose buffer does not inherit the room's input method.

The compose buffer does not actually inherit the room's input method.
To reproduce this, do the following:

  1. Visit a room in ement.
  2. Set the room's input method to tamil-itrans (C-x C-m C-\
    tamil-itrans RET).
  3. Press RET and type something.
  4. Press C-c ' to switch to the compose buffer.
  5. Notice how the compose buffer has NOT inherited the input method
    i.e., its input method is rfc1345 (U in modeline) instead of tamil-itrans.
  6. Press C-x C-s to quit the compose buffer.
  7. Press C-g to cancel the message.
  8. The room's input method has changed to rfc1345. This is unexpected
    as input methods are supposed to be buffer local.
  9. Further invocation of any minibuffer command makes it use the
    tamil-itrans method. This should NOT happen. M-x should not inherit
    the input method but it does. To actually use it, you need to press C-\
    to switch back to the default input method.

In essence, the input methods go out of sync.

Now, if you change the compose buffer's input method. A different
behaviour is observed. To reproduce:

  1. Visit a room in ement.
  2. Set the room's input method to tamil-itrans (C-x C-m C-
    tamil-itrans RET).
  3. Press RET and type something.
  4. Press C-c ' to switch to the compose buffer.
  5. Notice how the compose buffer has NOT inherited the input method
    i.e., its input method is rfc1345 instead of tamil-itrans.
  6. Change the input method to TeX (C-x C-m C-\ C-\ TeX RET).
  7. Press C-x C-s to quit the compose buffer.
  8. Press C-g to cancel the message.
  9. The room's input method has changed to TeX. This is, again,
    unexpected as input methods are supposed to be buffer local.
  10. Further invocation of send message makes it use the TeX method.
    This is different from previous cases' 10 since now M-x does not use the
    TeX method (this is the expected behaviour).

This is again unexpected since changing the input method of the
compose buffer should not change the room's input method. There's an
extra C-\ in step 6 when changing the input method to disable the
tamil-itrans method. Somehow switching to the compose buffer makes
EVERY minibuffer command use the input method.

EDIT: I'll try to fix this tomorrow, as it is quite late right now.

Void-function ement-list-rooms

I have an issue that seems like it should be my fault entirely, but I might be wrong because I don't understand what's going on exactly.

System:

GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.4.0, NS appkit-2022.44 Version 11.3.1 (Build 20E241)) of 2021-06-03

MacOS 11.5 Big Sur on a 2013 MacBook

Plz.el (current head): 8d2654bba7bfa11525aef50f969c489c20ac0a43
Ement.el (current head): cd59430081a5eb8938e676585898bd48ddc9fa0b

I'm testing in emacs -Q with the following config (just pasted into scratch and eval):

(setq debug-on-error t)
(add-to-list 'load-path "~/.config/emacs/site-lisp/plz.el")
(add-to-list 'load-path "~/.config/emacs/site-lisp/ement.el")
(require 'ement)
(ement-connect "@geoff:custom.domain" "password")

Messages buffer:

Ement: Checking server’s login flows...
"Ement: Checking server’s login flows..."
Ement: Logging in with password...
Ement: Sync request sent, waiting for response...
Ement: Response arrived after 0.34 seconds.  Reading 38.3k JSON response...
Ement: Reading JSON took 0.00 seconds
Ement: Reading events... 
Ement: Sync request sent, waiting for response...
Entering debugger...

Then repeating every few seconds:

Ement: Response arrived after 30.37 seconds.  Reading 944 JSON response...
Ement: Reading JSON took 0.00 seconds
Ement: Reading events... 
Ement: Sync request sent, waiting for response...
run-hook-with-args: Symbol’s function definition is void: ement-list-rooms

The debugger begins with

Debugger entered--Lisp error: (void-function ement-list-rooms)

And then a lot of other stuff. It doesn't seem to mention my password, but does have a lot of tokens, ids and such that might give away my login information. I'd be happy to provide additional details or just send the entire Backtrace log (privately).

Errors on startup --without-x

Using Emacs --without-x, I have ement-room-avatars, ement-room-images, ement-room-list-avatars all set to nil but I still get errors.

Debugger output doesn't say much re: where to look.

Debugger entered--Lisp error: (error "Invalid image type ‘png’")
  signal(error ("Invalid image type ‘png’"))
  error("Invalid image type `%s'" png)
  image-type("\211PNG\15\n\32\n\0\0\0\15IHDR\0\0\1,\0\0\1,\10\6\0\0\0y}\216u\0\0\0\4sBIT\10\10\10\10|\10d\210\0..." nil t)
  create-image("\211PNG\15\n\32\n\0\0\0\15IHDR\0\0\1,\0\0\1,\10\6\0\0\0y}\216u\0\0\0\4sBIT\10\10\10\10|\10d\210\0..." nil data-p :ascent center :max-width 32 :max-height 32)
  #f(compiled-function (data) #<bytecode 0x1fe8293f3dc9>)("\211PNG\15\n\32\n\0\0\0\15IHDR\0\0\1,\0\0\1,\10\6\0\0\0y}\216u\0\0\0\4sBIT\10\10\10\10|\10d\210\0...")
  #f(compiled-function () #<bytecode 0x1fe8293a20c1>)()
  plz--sentinel(#<process plz-request-curl<1>> "finished\n")
  kill-buffer(#<buffer  *plz-request-curl*>)
  #f(compiled-function () #<bytecode 0x1fe829d2f055>)()
  plz--sentinel(#<process plz-request-curl> "finished\n")

Pantalaimon: "Encrypted by an unverified session"

Using Pantalaimon with this config:

[Default]
LogLevel = Debug
SSL = True

[local-matrix]
Homeserver = https://matrix.org
ListenAddress = localhost
ListenPort = 8009
SSL = False
UseKeyring = False
IgnoreVerification = True

When I send messages in an encrypted direct private room, they are shown with a red shield in Element.io with the message "Encrypted by an unverified session". How to verify the ement.el session?

faces, theming, modus

Hey,

In RDE[1] we are looking to provide a configuration of ement[2] which fits the flavour of the distribution[3], which is largely based on the excellent work of Prot in modus[4].

In these efforts, there is some share of the workload in each project to achieve the best results, with initial commentary on the matter in this issue[5].

from the current version in guix, 0.1-pre-1.c951737, two immediate inconsistencies are present, with the notification and mentions buffer not respecting the format string -- I haven't verified this in the head commit however, as I'm just trying to collect the relevant information in this step -- apologies if this has been addressed already.

I hope the coming works can provide some good for you too :)

Cheers,
Samuel

[1] RDE - https://sr.ht/~abcdw/rde https://lists.sr.ht/~abcdw/rde-devel
[2] RDE mailing list, feature-emacs-ement - https://lists.sr.ht/~abcdw/rde-devel/patches/29208
[3] RDE aesthetics - https://cdn.fosstodon.org/media_attachments/files/106/900/674/950/793/851/original/4b17f03528571ca0.png
[4] modus themes - https://protesilaos.com/emacs/modus-themes https://gitlab.com/protesilaos/modus-themes
[5] modus issue: ement - https://gitlab.com/protesilaos/modus-themes/-/issues/279

Gaps from limited sync responses are not filled

I'm not sure if the current behaviour is intended. Upon waking my suspended laptop and manually syncing a room with g, I expected ement to fetch all messages that I missed; but it only fetches the last few. Currently on c4fff82.

Room list should not be used with visual-line-mode

My windows are usually 80 chars wide, and *Ement Rooms* looks quite bad: apparently, it expects more width.

I don't see any relevant customization options in ement-room-list customization group

An example:

           Ement.el                  Ement.el, a Matrix client for Em... 45m8s
30
@akater:matrix.org
           Emacs                     The extensible self-documenting ...      
2h42m42s
372
@akater:matrix.org

Non-fully-specified default face may cause errors

I haven't used Ement for two weeks or so. Now, when visiting a room buffer, I very often get wrong-type-argument errors, message history in the buffer is incomplete, and when I scroll back, I often receive another error.

Let's start with the first one, on room entry. Here's trimmed backtrace:

Debugger entered--Lisp error: (wrong-type-argument ement-event #s(ement-user :id "@bbigras:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 1/65 0x1fe12ca36fad> :color "#b88366" :username nil))
  signal(wrong-type-argument (ement-event #s(ement-user :id "@bbigras:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 1/65 0x1fe12ca36fad> :color "#b88366" :username nil)))
  ement-room--add-member-face(#("bbigras: I'm here fo..." 0 1 (keymap ... mouse-face highlight follow-link t help-echo "https://matrix.to/#/..." category shr button t shr-url "https://matrix.to/#/..." face ... shr-indentation 0) 1 7 (keymap ... mouse-face highlight follow-link t help-echo "https://matrix.to/#/..." category shr button t shr-url "https://matrix.to/#/..." face ...) 7 8 (face ...) 8 9 (face ...) 9 12 (face ...) 12 13 (face ...) ...) #s(ement-room :id "..." :display-name "Ement.el" :prev-batch "..." :summary (... ...) :state (... ... ... ... ... ... ... ... ... ... ... ...) :timeline (... ... ... ... ... ... ... ... ... ...) :ephemeral nil :account-data (...) :unread-notifications nil :latest-ts 1630024698431 :topic "Ement.el, a Matrix c..." :canonical-alias "#ement.el:matrix.org" :avatar nil :type join :invite-state nil :local (... ... ...)))
  #f(compiled-function (event room session) "Formatted body content (i.e. rendered HTML)." #<bytecode 0x1fe12c498719>)(#s(ement-event :id "..." :sender ... :content ... :origin-server-ts 1630024686435 :type "m.room.message" :unsigned ... :state-key nil :local nil) #s(ement-room :id "..." :display-name "Ement.el" :prev-batch "..." :summary ... :state ... :timeline ... :ephemeral nil :account-data ... :unread-notifications nil :latest-ts 1630024698431 :topic "Ement.el, a Ma..." :canonical-alias "#ement.el:matr..." :avatar nil :type join ...) #s(ement-session :user ... :server ... :token "syt_YWthdGVy_q..." :transaction-id 0 :rooms ... :next-batch "...." :device-id "..." :initial-device-display-name nil :has-synced-p t :account-data ... :events #<hash-table equal 1300/1642 0x1fe12c3c8939>))
  ement-room--format-message(#s(ement-event :id "..." :sender ... :content ... :origin-server-ts 1630024686435 :type "m.room.message" :unsigned ... :state-key nil :local nil) #s(ement-room :id "..." :display-name "Ement.el" :prev-batch "..." :summary ... :state ... :timeline ... :ephemeral nil :account-data ... :unread-notifications nil :latest-ts 1630024698431 :topic "Ement.el, a Ma..." :canonical-alias "#ement.el:matr..." :avatar nil :type join ...) #s(ement-session :user ... :server ... :token "..." :transaction-id 0 :rooms ... :next-batch "...." :device-id "..." :initial-device-display-name nil :has-synced-p t :account-data ... :events #<hash-table equal 1300/1642 0x1fe12c3c8939>))
  ement-room--format-event(#s(ement-event ...)
  ement-room--pp-thing(#s(ement-event ...))
  #f(compiled-function (data) #<bytecode 0x1fe12c395e19>)(#s(ement-event ...))
  ewoc--refresh-node(#f(compiled-function (data) #<bytecode 0x1fe12c395e19>) [[[[[... #5 ... #<marker at 88 in *Ement Room: Ement.el*>] #4 #s(ement-user :id "@bbigras:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 1/65 0x1fe12ca36fad> :color "#b88366" :username nil) #<marker at 126 in *Ement Room: Ement.el*>] #3 #s(ement-event :id "..." :sender #s(ement-user :id "@bbigras:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 1/65 0x1fe12ca36fad> :color "#b88366" :username nil) :content (... ... ...) :origin-server-ts 1629863007143 :type "m.room.member" :unsigned (...) :state-key "@bbigras:matrix.org" :local nil) #<marker at 134 in *Ement Room: Ement.el*>] #2 #s(ement-user :id "@akater:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 2/65 0x1fe12c3d4fdd> :color nil :username nil) #<marker at 152 in *Ement Room: Ement.el*>] [#2 [#3 [#4 [#5 ... "" #<marker at 1 in *Ement Room: Ement.el*>] DL-LIST #<marker at 377 in *Ement Room: Ement.el*>] "" #<marker at 376 in *Ement Room: Ement.el*>] #s(ement-event :id "..." :sender #s(ement-user :id "@akater:matrix.org" :displayname nil :account-data nil :room-display-names #<hash-table eql 2/65 0x1fe12c3d4fdd> :color nil :username nil) :content ((body . "* bbigras: I'm here for issues.  You'l...") (m\.new_content ... ... ... ...) (m\.relates_to ... ...) (msgtype . "m.text")) :origin-server-ts 1630024698431 :type "m.room.message" :unsigned ((age . 1011671)) :state-key nil :local nil) #<marker at 159 in *Ement Room: Ement.el*>] #s(ement-event ...) #<marker at 159 in *Ement Room: Ement.el*>] [[[[[... #6 ... #<marker at 152 in *Ement Room: Ement.el*>] #5 #s(ement-event ...) #<marker at 159 in *Ement Room: Ement.el*>] #4 #s(ement-event ...) #<marker at 159 in *Ement Room: Ement.el*>] #3 "" #<marker at 376 in *Ement Room: Ement.el*>] [#3 [#4 [#5 [#6 ... ... #<marker at 32 in *Ement Room: Ement.el*>] #s(ement-event ...) #<marker at 12 in *Ement Room: Ement.el*>] #s(ement-user ...) #<marker at 2 in *Ement Room: Ement.el*>] "" #<marker at 1 in *Ement Room: Ement.el*>] DL-LIST #<marker at 377 in *Ement Room: Ement.el*>])
  ewoc--insert-new-node(..)
  ewoc-enter-before(..)
  ewoc-enter-after(..)
  ement-room--insert-event(..)
  #f(compiled-function (event) "`ement-room' handler function for m.room.message events." #<bytecode 0x1fe12c455a2d>)(..)
  ement-room--handle-events(..)
  ement-room--buffer(..)
  ement-view-room(..)
  ement-room-list-action(#<marker (moves after insertion) at 1712 in *Ement Rooms*>)
  button-activate(#<marker (moves after insertion) at 1712 in *Ement Rooms*> nil)
  push-button(1712)
  funcall-interactively(push-button 1712)
  call-interactively(push-button nil nil)
  command-execute(push-button) 

Workaround for infinite-loop/out-of-memory when printing backtraces: `(setq print-circle t)`

I have a weird issue: Occasionally ement suddenly runs amok, locking up emacs. top shows emacs fully loading a CPU and rapidly eating memory. If I don't kill emacs at this stage, the OOM killer will do it for me after a few 10s of seconds. (I have 16G RAM and no swap.)

I have not been able to reproduce it deterministically. My impression is that there is a risk of this happening when I run an ement command such as ement-list-buffers while ement is busy doing something (sync'ing in the background?).

Perhaps this is already enough information to suggest where to look for a cause? Or perhaps someone has a suggestion of how to debug this?

Edit: IIRC when this happens the bell is active (I use visible-bell t), and there's an ement message in the minibuffer. I instrumented my emacs to log all messages to persistent storage. Perhaps this will reveal a clue when this issue happens next.

Shell-like prompt instead of M-x ement-room-send-message

First of all, hats down @alphapapa for casually writing not one but two Matrix clients for Emacs. You are a rockstar.

I would like to ask about your intentions about a (missing) prompt. I think it's fair to assume that a lot of Ement.el users are former IRC users, and every IRC client for Emacs I've seen has a shell-like prompt (I don't know how to describe it better). Basically something like

ERC>

or

[#channelname]

And the message is composed after the prompt. I see major advantages over the current M-x ement-room-send-message:

  • One could send a quick message in some window while already composing a message in another one. Or do something else in Emacs.
  • Key bindings - I don't know if this is significant for vanilla users, but the ability to use Evil key bindings when writing a message is one of the most killer features ever.
  • Subjectively, it is more ergonomic to have a prompt in each chat window (I am looking to a window at the top-right, so I don't want to write a message in bottom-left)

I understand Matrix is not IRC and we are able to send replies, images, emojis, and all sorts of things, that the shell-like prompt is useless for. But I don't see this as a problem. The majority of messages are simple text and when one wants to send something different, he can use M-x ement-room-send-* commands.

Is the prompt on your roadmap or is it something you intentionally left out?

Provide default numeric values in list-latest<

This is how the tail of my *Ement Rooms* buffer looks now:

some-chat                               3y257d13h53m38s  @akater:matrix.org
F-Droid    F-Droid, the free...                          @akater:matrix.org
Ement.el   Ement.el, a Matrix client...                  @akater:matrix.org

Observe that the last several chats don't have a latest-time label.

Here's current definition of list-latest<:

(defun ement-room-list-latest< (a b)
  "Return non-nil if entry A has fewer members than room B.
A and B should be entries from `tabulated-list-mode'."
  (pcase-let* ((`(,_room [,_name-for-list ,_topic ,a-latest ,_session]) a)
               (`(,_room [,_name-for-list ,_topic ,b-latest ,_session]) b))
    (< (get-text-property 0 'value a-latest)
       (get-text-property 0 'value b-latest))))

Entities corresponding to the last two chats above had empty strings for their a-latest / b-latest. Consequently, get-text-property returned nil and < errored. So I had to alter list-latest< to be able to use Ement:

(defun ement-room-list-latest< (a b)
  "Return non-nil if entry A has fewer members than room B.
A and B should be entries from `tabulated-list-mode'."
  (pcase-let* ((`(,_room [,_name-for-list ,_topic ,a-latest ,_session]) a)
               (`(,_room [,_name-for-list ,_topic ,b-latest ,_session]) b))
    (< (or (get-text-property 0 'value a-latest) 0)
       (or (get-text-property 0 'value b-latest) 0))))

I don't know how to reproduce the bug; the rooms in question are different each time. However, i think that providing a default numeric value is reasonable anyway. But maybe you have better ideas for this so this is not a PR.

ement.el for ElementOne

Hi,

Even though this is probably an issue on Elements side. I've registered for ElementOne and sadly I can no longer use ement.el. It worked fine with the free matrix.org hosting. Is there anything that can be done on ement.el side or is there something that I can push to Elements side?

This is the output from running ement-connect

Ement: Checking server’s login flows...
error in process sentinel: Matrix server doesn’t support m.login.password login flow. Supported flows: nil

Too much depends on default-directory

One of my Ement room buffers had default-directory set to a name of non-existent directory (it had been deleted recently). I was getting an error

Error running timer ‘ement-room--send-typing’: (file-missing "Setting current directory" "No such file or directory" "/whatever/directory/")

on ement-room-send-message. I could write a message but couldn't send it.

FYI: setq-local default-directory to an existing directory immediately fixed it even though default-directory is still invalid (non-existent) in other Ement buffers. But it is unclear why default-directory should matter at all for sending messages.

Emacs process sentinel/plz.el issue ("wrong-type-argument plz-response nil")

Emacs 27.2.50
OS Windows 10
ement 20210928.943

On ement-connect I get the backtrace:

Debugger entered--Lisp error: (wrong-type-argument plz-response nil)
  signal(wrong-type-argument (plz-response nil))
  ement--hostname-uri("matrix.org")
  #f(compiled-function () #<bytecode 0x89ff194f11>)()
  ement-connect(:user-id "@redacted:matrix.org" :password "redacted")
  funcall-interactively(ement-connect :user-id "@redacted:matrix.org" :password "redacted")
  call-interactively(ement-connect record nil)
  command-execute(ement-connect record)
  helm-M-x-execute-command(ement-connect)
  helm-execute-selection-action-1()
  helm-execute-selection-action()

any ideas on further debugging this? Minimal reproducer is (ement--hostname-uri "matrix.org") in which eventually (plz 'get "https://matrix.org/.well-known/matrix/client" :as 'response :then 'sync) is nil.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.