From 270718072ead8d7506484fe6789a6cc9c8ae9083 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 18 Nov 2022 16:46:05 -0600 Subject: [PATCH 1/6] Meta: v0.5.1-pre --- README.org | 4 ++++ ement.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 976f678f..40bbdff4 100644 --- a/README.org +++ b/README.org @@ -287,6 +287,10 @@ Note that, while ~matrix-client~ remains usable, and probably will for some time :TOC: :depth 0 :END: +** 0.5.1-pre + +Nothing new yet. + ** 0.5 *Additions* diff --git a/ement.el b/ement.el index ae0093ff..f8a9b74b 100644 --- a/ement.el +++ b/ement.el @@ -5,7 +5,7 @@ ;; Author: Adam Porter ;; Maintainer: Adam Porter ;; URL: https://github.com/alphapapa/ement.el -;; Version: 0.5 +;; Version: 0.5.1-pre ;; Package-Requires: ((emacs "27.1") (map "2.1") (plz "0.2") (taxy "0.10") (taxy-magit-section "0.12.1") (svg-lib "0.2.5") (transient "0.3.7")) ;; Keywords: comm From 56e19f26c8f043666064559c3ea91f316fcffcf2 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 18 Nov 2022 16:46:30 -0600 Subject: [PATCH 2/6] Fix: (ement-directory) Add autoloads --- README.org | 3 ++- ement-directory.el | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 40bbdff4..1aee8d75 100644 --- a/README.org +++ b/README.org @@ -289,7 +289,8 @@ Note that, while ~matrix-client~ remains usable, and probably will for some time ** 0.5.1-pre -Nothing new yet. +*Fixes* ++ Autoload ~ement-directory~ commands. ** 0.5 diff --git a/ement-directory.el b/ement-directory.el index af9aa24a..23278704 100644 --- a/ement-directory.el +++ b/ement-directory.el @@ -150,6 +150,7 @@ ;; TODO: Pagination of results. +;;;###autoload (cl-defun ement-directory (&key server session since (limit 100)) "View the public room directory on SERVER with SESSION. Show up to LIMIT rooms. Interactively, with prefix, prompt for @@ -194,6 +195,7 @@ SINCE may be a next-batch token." remaining))))))) (ement-message "Listing %s rooms on %s..." limit server))) +;;;###autoload (cl-defun ement-directory-search (query &key server session since (limit 1000)) "View public rooms on SERVER matching QUERY. QUERY is a string used to filter results." From 1afb185971cfa75caa0320ef359dba8ba20b5f14 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 18 Nov 2022 17:03:10 -0600 Subject: [PATCH 3/6] Comment: Add FIXME --- ement-directory.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ement-directory.el b/ement-directory.el index 23278704..51af2244 100644 --- a/ement-directory.el +++ b/ement-directory.el @@ -189,6 +189,9 @@ SINCE may be a next-batch token." (alist-get 'limit ement-directory-etc) limit) (setq-local revert-buffer-function revert-function) (when remaining + ;; FIXME: The server seems to report all of the rooms on + ;; the server as remaining even when searching for a + ;; specific term like "emacs". (message (substitute-command-keys "%s rooms remaining (use \\[ement-directory-next] to fetch more)") From 83d4e12c88045a69985dc779210dc613ce57d8c1 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 18 Nov 2022 17:03:20 -0600 Subject: [PATCH 4/6] Fix: (ement-directory-define-column "Name") Faces --- README.org | 1 + ement-directory.el | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 1aee8d75..95e52ae3 100644 --- a/README.org +++ b/README.org @@ -291,6 +291,7 @@ Note that, while ~matrix-client~ remains usable, and probably will for some time *Fixes* + Autoload ~ement-directory~ commands. ++ Faces in ~ement-directory~ listings. ** 0.5 diff --git a/ement-directory.el b/ement-directory.el index 51af2244..11807938 100644 --- a/ement-directory.el +++ b/ement-directory.el @@ -118,8 +118,8 @@ (ement-directory-define-column "Name" (:max-width 25) (pcase-let* (((map name ('room_type type)) item) (face (pcase type - ("m.space" 'ement-tabulated-room-list-space) - (_ 'ement-tabulated-room-list-name)))) + ("m.space" 'ement-room-list-space) + (_ 'ement-room-list-name)))) (propertize (or name "[unnamed]") 'face face))) From 7c0e606b938506817b6dabf1230943e1088d309b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 18 Nov 2022 17:05:16 -0600 Subject: [PATCH 5/6] Comment: Add TODO --- ement-directory.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ement-directory.el b/ement-directory.el index 11807938..57c17a26 100644 --- a/ement-directory.el +++ b/ement-directory.el @@ -192,6 +192,8 @@ SINCE may be a next-batch token." ;; FIXME: The server seems to report all of the rooms on ;; the server as remaining even when searching for a ;; specific term like "emacs". + ;; TODO: Display this in a more permanent place (like a + ;; header or footer). (message (substitute-command-keys "%s rooms remaining (use \\[ement-directory-next] to fetch more)") From f16798721b160905297c9be24dabeed7e3961fbb Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 18 Nov 2022 17:20:16 -0600 Subject: [PATCH 6/6] Comment: Add TODO --- ement-room.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ement-room.el b/ement-room.el index f006d25b..082b91a7 100644 --- a/ement-room.el +++ b/ement-room.el @@ -999,6 +999,10 @@ Note that, if ROOM has no buffer, STRING is returned unchanged." (ement-afirst (equal room-id (ement-room-id it)) (ement-session-rooms session)) (cl-assert it nil "Room %S not found on session %S" room-id session-id)))) + ;; TODO: Put point at the end of the room buffer. However, this doesn't seem easy or + ;; even possible, possibly because the bookmark library itself moves point after this + ;; function returns. My attempts at setting the buffer's and window's points after + ;; calling `ement-view-room' have had no effect. (ement-view-room room session))) ;;;; Commands