From 5a779da29e9e52d230ab80c290416062e3f46d30 Mon Sep 17 00:00:00 2001 From: cage Date: Mon, 8 Apr 2024 20:45:44 +0200 Subject: [PATCH] - added new command: 'thread-open-parent-post'; - updated documentation and NEWS file. --- NEWS.org | 23 +++++++++++++---------- doc/tinmop.man | 9 ++++++--- doc/tinmop.org | 5 +++-- etc/init.lisp | 4 +++- src/package.lisp | 3 ++- src/ui-goodies.lisp | 9 +++++++-- 6 files changed, 34 insertions(+), 19 deletions(-) diff --git a/NEWS.org b/NEWS.org index c8fe713..f09ed8f 100644 --- a/NEWS.org +++ b/NEWS.org @@ -1,17 +1,20 @@ * 2024-xx-xx version 0.9.9.1414213562 - - new features - - [fediverse] Multi account supported. Users can specify the account to use on the command line or switching at runtime. + - New features + - [fediverse] Multiple accounts supported. Users can specify the account to use on the command line or switching at runtime. - [TUI] added new commands: - - thread-go-to-parent-post - - thread-delete-subtree - - added a bash completion script - - prevented the poll's results to be printed before expiration - - [script] added the option to submit the feed to and antenna instance, when generating a gemlog; + * thread-go-to-parent-post; + * thread-delete-subtree. + - added a bash completion script; + - prevented the poll's results to be printed before expiration; + - [script] added the option to submit the feed to an antenna instance, when generating a gemlog. - Bugfix - - [TUI] fixed checks of configuration file + - [TUI] fixed checks of configuration file; - updated README to mention that also libjpegturbo and TK must be installed; - - [GUI] fixed managing of gemini responses when a titan request was performed (TOFU errors, TLS certificate password etc.) - - [TUI] fixed line wrapping of announcements window. + - [GUI] fixed managing of gemini responses when a titan request was performed (TOFU errors, TLS certificate password etc.); + - [TUI] fixed line wrapping of announcements window; + - [TUI] prevented crash when looking for links contained ina a empty message. + + Thanks to people who run [[https://mastodon.uno/][mastodon.uno]] (and, needless to say, [[https://emacs.ch][emacs.ch]]) for their support and help to test this new release. * 2024-03-02 version 0.9.9.141421356 - new features diff --git a/doc/tinmop.man b/doc/tinmop.man index 6880be3..6591984 100644 --- a/doc/tinmop.man +++ b/doc/tinmop.man @@ -81,7 +81,7 @@ Start as gemini gui server only \fB-v, --version \fP Print program version and exit .TP -\fB--fediverse-account \fP +\fB-F, --fediverse-account \fP Specify a fediverse user account (format: user-name@server-name) .SH "Usage" @@ -570,16 +570,19 @@ change-visibility .SS "Thread window" .TP -\fB^ \fP +\fB[ \fP thread-go-to-parent-post .TP +\fB^ \fP +thread-open-parent-post +.TP \fB/ b \fP thread-search-next-message-body .TP \fB/ m \fP thread-search-next-message-meta .TP -\fBC-J (key \fIenter\fP) \fP +\fBC-J (key \fIenter\fP)\fP thread-open-selected-message .TP \fBC-X m b \fP diff --git a/doc/tinmop.org b/doc/tinmop.org index 2a26e4d..3785c78 100644 --- a/doc/tinmop.org +++ b/doc/tinmop.org @@ -346,10 +346,11 @@ ** Thread window -- ^ :: thread-go-to-parent-post +- [ :: thread-go-to-parent-post +- ^ :: thread-open-parent-post - / b :: thread-search-next-message-body - / m :: thread-search-next-message-meta -- C-J (key /enter/) :: thread-open-selected-message +- C-J (key /enter/) :: thread-open-selected-message - C-X m b :: boost-selected-status - C-X m f :: favourite-selected-status - C-X m r b :: unboost-selected-status diff --git a/etc/init.lisp b/etc/init.lisp index a101a71..2ffc845 100644 --- a/etc/init.lisp +++ b/etc/init.lisp @@ -270,7 +270,9 @@ (status-id (db:row-message-status-id selected-row))) (ui:info-message (format nil "ID: ~a" status-id)))) -(define-key "^" #'thread-go-to-parent-post *thread-keymap*) +(define-key "[" #'thread-go-to-parent-post *thread-keymap*) + +(define-key "^" #'thread-open-parent-post *thread-keymap*) (define-key "/ b" #'thread-search-next-message-body *thread-keymap*) diff --git a/src/package.lisp b/src/package.lisp index 25e74b5..7eb9b88 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -3204,7 +3204,8 @@ :show-announcements :show-parent-post :switch-fediverse-account - :thread-go-to-parent-post)) + :thread-go-to-parent-post + :thread-open-parent-post)) (defpackage :scheduled-events (:use diff --git a/src/ui-goodies.lisp b/src/ui-goodies.lisp index b59a70a..193d4bf 100644 --- a/src/ui-goodies.lisp +++ b/src/ui-goodies.lisp @@ -3655,6 +3655,11 @@ gemini client certificates!)." (status-parent-row (db::find-status-id-folder-timeline generic-parent-id folder timeline)) ;; ...and get the correct message index (index (db:row-message-index status-parent-row)) - (event (make-instance 'thread-goto-message + (goto-event (make-instance 'thread-goto-message :payload index))) - (push-event event))) + (push-event goto-event))) + +(defun thread-open-parent-post () + "Move to, select and open parent post" + (thread-go-to-parent-post) + (thread-open-selected-message))