aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-05-31 14:13:14 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-05-31 14:13:14 +0200
commitb7a6145b89d4b07e0932d4c9e7dad20d031c9bd7 (patch)
treebf2211a6e55501d2c2ce32bded2eb2d6877d8b91
parent476268af7d78d3136d6d6bf11856d0c0d6fd1c7a (diff)
parentac5684acaa2c0910350a5a79977b28dea8ddf8d7 (diff)
Merge branch 'develop'
-rw-r--r--README.org60
-rw-r--r--lisp/mastodon-http.el17
-rw-r--r--lisp/mastodon-notifications.el6
-rw-r--r--lisp/mastodon-profile.el21
-rw-r--r--lisp/mastodon-tl.el90
-rw-r--r--lisp/mastodon-toot.el13
-rw-r--r--lisp/mastodon.el3
-rw-r--r--mastodon-index.org91
-rw-r--r--mastodon.info134
-rw-r--r--mastodon.texi39
10 files changed, 303 insertions, 171 deletions
diff --git a/README.org b/README.org
index 498625f..db79dde 100644
--- a/README.org
+++ b/README.org
@@ -127,6 +127,8 @@ not contain =:client_id= and =:client_secret=.
**** Keybindings
+For a full list of commands and variables, see [[file:mastodon-index.org][mastodon-index.org]].
+
|----------------+---------------------------------------------------------------------------------|
| Key | Action |
|----------------+---------------------------------------------------------------------------------|
@@ -156,6 +158,7 @@ not contain =:client_id= and =:client_secret=.
| =,= | view favouriters of toot at point |
| =.= | view boosters of toot at point |
| =/= | switch between mastodon buffers |
+| =\= | prompt for an instance domain and view its local timeline (if poss) |
| =Z= | report user/toot at point to instances moderators |
|----------------+---------------------------------------------------------------------------------|
| | *Other views* |
@@ -217,13 +220,15 @@ in =text-mode= and =mastodon-toot= minor mode. Enter the contents of your toot
here. =C-c C-c= sends the toot. =C-c C-k= cancels. Both actions kill the buffer
and window. Further keybindings are displayed in the buffer, and in the following subsection.
-Replies preserve visibility status/content warnings, and include boosters by default.
+Replies preserve visibility status/content warnings, and include boosters by default. If the region is active when you start a reply, it will be yanked into the compose buffer prefixed with =>= to form a rough reply quote.
-Server's max toot length, and attachment previews, are shown.
+Server's max toot length, with running char count, and attachment previews, are shown.
You can download and use your instance's custom emoji
(=mastodon-toot--download-custom-emoji=, =mastodon-toot--enable-custom-emoji=).
+If you want to view some of the toot being replied to in the compose buffer, set =mastodon-toot-display-orig-in-reply-buffer= to non-nil.
+
The compose buffer uses =text-mode= so any configuration you have for that mode
will be enabled. If any of your existing config conflicts with =mastodon-toot=,
you can disable it in the =mastodon-toot-mode-hook=. For example, the default
@@ -237,28 +242,32 @@ value of that hook is as follows:
**** Keybindings
-|---------+----------------------------------|
-| Key | Action |
-|---------+----------------------------------|
-| =C-c C-c= | Send toot |
-| =C-c C-k= | Cancel toot |
-| =C-c C-w= | Add content warning |
-| =C-c C-v= | Change toot visibility |
-| =C-c C-n= | Add sensitive media/nsfw flag |
-| =C-c C-a= | Upload attachment(s) |
-| =C-c != | Remove all attachments |
-| =C-c C-e= | Add emoji (if =emojify= installed) |
-| =C-c C-p= | Create a poll |
-| =C-c C-l= | Set toot language |
-|---------+----------------------------------|
-
-**** Autocompletion of mentions, tags, and emoji
-
-Autocompletion of mentions, tags, and emoji is triggered by =@=, =#=, and =:=
-respectively, plus a few letters. It is provided by
+|----------+----------------------------------|
+| Key | Action |
+|----------+----------------------------------|
+| =C-c C-c= | Send toot |
+| =C-c C-k= | Cancel toot |
+| =C-c C-w= | Add content warning |
+| =C-c C-v= | Change toot visibility |
+| =C-c C-n= | Add sensitive media/nsfw flag |
+| =C-c C-a= | Upload attachment(s) |
+| =C-c != | Remove all attachments |
+| =C-c C-e= | Add emoji (if =emojify= installed) |
+| =C-c C-p= | Create a poll |
+| =C-c C-l= | Set toot language |
+| =-C-c C-s= | Schedule toot |
+|----------+----------------------------------|
+
+**** Autocompletion of mentions, tags and emoji
+
+Autocompletion of mentions, tags, and emojis is provided by
=completion-at-point-functions= (capf) backends.
-=mastodon-toot--enable-completion= is enabled by default. If you want to enable
-=company-mode= in the toot compose buffer, set
+=mastodon-toot--enable-completion= is enabled by default.
+
+To trigger completion, type a prefix followed by a few letters, =@= for
+mentions, =#= for tags, and =:= for emoji.
+
+If you want to enable =company-mode= in the toot compose buffer, set
=mastodon-toot--use-company-for-completion= to =t=. (=mastodon.el= used to run its
own native company backends, but these have been removed in favour of capfs.)
@@ -277,7 +286,7 @@ combination is =consult= and =corfu=.
*** Other commands and account settings:
In addition to =mastodon=, the following three functions are autoloaded and should
-work without first loading =mastodon.el=:
+work without first loading a =mastodon.el= buffer:
- =mastodon-toot=: Compose new toot
- =mastodon-notifications-get=: View all notifications
- =mastodon-url-lookup=: Attempt to load a URL in =mastodon.el=. URL may be at
@@ -352,6 +361,9 @@ See =M-x customize-group RET mastodon= to view all customize options.
- Display toot being replied to
- Set default reply visibility
+- Nofitication options:
+ - Display user's profile note in follow requests
+
*** Commands and variables index
An index of all user-facing commands and custom variables is available here: [[file:mastodon-index.org][mastodon-index.org]].
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 7ef6f77..60654ff 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -141,14 +141,21 @@ Used for API form data parameters that take an array."
&optional params headers unauthenticated-p json)
"POST synchronously to URL, optionally with PARAMS and HEADERS.
Authorization header is included by default unless
-UNAUTHENTICATED-P is non-nil.If JSON, encode PARAMS as JSON for
-the request data."
+UNAUTHENTICATED-P is non-nil.
+If JSON is :json, encode PARAMS as JSON for
+the request data. If it is :raw, just use the plain params."
+ ;; NB: raw is used by `mastodon-tl--unfilter-user-languages'; not sure if
+ ;; there's a way around it?
(mastodon-http--authorized-request "POST"
(let* ((url-request-data
(when params
- (if json
- (json-encode params)
- (mastodon-http--build-params-string params))))
+ (cond ((eq json :json)
+ (json-encode
+ params))
+ ((eq json :raw)
+ params)
+ (t
+ (mastodon-http--build-params-string params)))))
(url-request-extra-headers
(append url-request-extra-headers ; auth set in macro
(unless (assoc "Content-Type" headers) ; pleroma compat:
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 9b40861..c26d0b0 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -59,13 +59,11 @@
:group 'mastodon)
(defcustom mastodon-notifications--profile-note-in-foll-reqs t
- "When non-nil, show some of a user's profile note in follow
-request notifications."
+ "If non-nil, show a user's profile note in follow request notifications."
:type '(boolean))
(defcustom mastodon-notifications--profile-note-in-foll-reqs-max-length nil
- "The maximum character length for display of user profile note in
-follow requests.
+ "The max character length for user profile note in follow requests.
Profile notes are only displayed if
`mastodon-notifications--profile-note-in-foll-reqs' is non-nil.
If unset, profile notes of any size will be displayed, which may
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 31a1983..46a56f6 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -130,7 +130,10 @@ It contains details of the current user's account.")
Other clients can change these settings on the server at any
time, so this list is not the canonical source for settings. It
is updated on entering mastodon mode and on toggle any setting it
-contains")
+contains.
+This variable is set from data in
+`mastodon-profile-credential-account' not
+`mastodon-profile-account-preferences-data'.")
(define-minor-mode mastodon-profile-update-mode
"Minor mode to update user profile."
@@ -498,7 +501,7 @@ Returns the results as an alist."
"Limit string X to 255 chars max."
(if (> (length x) 255) (substring x 0 255) x))
-;; used in tl.el
+;; used in tl.el and toot.el:
(defun mastodon-profile--get-preferences-pref (pref)
"Fetch PREF from the endpoint \"/preferences\".
If `mastodon-profile-acccount-preferences-data' is set, fetch
@@ -697,12 +700,20 @@ TAG is a hashtag to restrict posts to."
'success)
;; insert relationship (follows)
(let-alist relationships
- (let ((followsp (mastodon-profile--follows-p
- (list .requested_by .following .followed_by))))
+ (let* ((followsp (mastodon-profile--follows-p
+ (list .requested_by .following .followed_by)))
+ (rels (mastodon-profile--relationships-get .id))
+ (langs-filtered (if-let ((langs (alist-get 'languages rels)))
+ (concat " ("
+ (mapconcat #'identity
+ langs
+ " ")
+ ")")
+ "")))
(if followsp
(mastodon-tl--set-face
(concat (when (equal .following 't)
- " | FOLLOWED BY YOU")
+ (format " | FOLLOWED BY YOU%s" langs-filtered))
(when (equal .followed_by 't)
" | FOLLOWS YOU")
(when (equal .requested_by 't)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index db923a4..aa70507 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -88,6 +88,7 @@
(autoload 'mastodon-http--get-response "mastodon-http")
(autoload 'mastodon-search--insert-heading "mastodon-search")
(autoload 'mastodon-media--process-full-sized-image-response "mastodon-media")
+(autoload 'mastodon-search--trending-statuses "mastodon-search")
(defvar mastodon-toot--visibility)
(defvar mastodon-toot-mode)
@@ -213,7 +214,8 @@ respects the user's `browse-url' settings."
:type '(boolean))
(defcustom mastodon-tl--remote-local-domains nil
- "A list of domains to view the local timelines of using `mastodon-tl--get-remote-local-timeline'."
+ "A list of domains to view the local timelines of.
+See `mastodon-tl--get-remote-local-timeline' for view remote local domains."
:type '(repeat string))
@@ -473,7 +475,10 @@ You can enter any working instance domain. Domains that you want
to regularly load can be stored in
`mastodon-tl--remote-local-domains' for easy access with completion.
Note that some instances do not make their local timelines public, in
-which case this will not work."
+which case this will not work.
+To interact with any item, you must view it from your own
+instance, which you can do with
+`mastodon-tl--view-item-on-own-instance'."
(interactive)
(let* ((domain (completing-read "Domain for remote local tl: "
mastodon-tl--remote-local-domains))
@@ -485,17 +490,22 @@ which case this will not work."
(mastodon-http--api "instance/peers")))))
;; condition-case doesn't work here, so i added basic error handling to
;; `mastodon-tl--init*' instead
- (if (not known)
- (when (y-or-n-p
- "Domain appears unknown to your instance. Proceed?")
- ;; TODO: refactor these calls:
- (mastodon-tl--init buf
- "timelines/public" 'mastodon-tl--timeline nil
- params nil domain))
+ (when (or known
+ (y-or-n-p
+ "Domain appears unknown to your instance. Proceed?"))
(mastodon-tl--init buf
"timelines/public" 'mastodon-tl--timeline nil
params nil domain))))
+(defun mastodon-tl--view-item-on-own-instance ()
+ "Load current toot on your own instance.
+Use this to re-load remote-local items in order to interact with them."
+ (interactive)
+ (mastodon-tl--do-if-item
+ (let* ((toot (mastodon-tl--property 'item-json))
+ (uri (mastodon-tl--field 'uri toot)))
+ (mastodon-url-lookup uri))))
+
(defun mastodon-tl--get-local-timeline (&optional prefix)
"Open local timeline.
With a single PREFIX arg, hide-replies.
@@ -2036,19 +2046,21 @@ ID is that of the post the context is currently displayed for."
;;; FOLLOW/BLOCK/MUTE, ETC
-(defun mastodon-tl--follow-user (user-handle &optional notify langs reblogs)
+(defun mastodon-tl--follow-user (user-handle
+ &optional notify langs reblogs json)
"Query for USER-HANDLE from current status and follow that user.
If NOTIFY is \"true\", enable notifications when that user posts.
If NOTIFY is \"false\", disable notifications when that user posts.
Can be called to toggle NOTIFY on users already being followed.
LANGS is an array parameters alist of languages to filer user's posts by.
REBLOGS is a boolean string like NOTIFY, enabling or disabling
-display of the user's boosts in your timeline."
+display of the user's boosts in your timeline.
+JSON is a flag arg for `mastodon-http--post'."
(interactive
(list (mastodon-tl--user-handles-get "follow")))
(mastodon-tl--do-if-item
(mastodon-tl--do-user-action-and-response
- user-handle "follow" nil notify langs reblogs)))
+ user-handle "follow" nil notify langs reblogs json)))
;; TODO: make this action "enable/disable notifications"
(defun mastodon-tl--enable-notify-user-posts (user-handle)
@@ -2081,24 +2093,42 @@ display of boosts."
(mastodon-tl--follow-user user-handle nil nil "true"))
(defun mastodon-tl--filter-user-user-posts-by-language (user-handle)
- "Query for USER-HANDLE and enable notifications when they post.
-This feature is experimental and for now not easily varified by
-the instance API."
+ "Query for USER-HANDLE and filter display of their posts by language.
+If they are not already followed, they will be too.
+To be filtered, a post has to be marked as in the language given.
+This may mean that you will not see posts that are in your
+desired language if they are not marked as such (or as anything)."
(interactive
(list (mastodon-tl--user-handles-get "filter by language")))
(let ((langs (mastodon-tl--read-filter-langs)))
(mastodon-tl--do-if-item
- (mastodon-tl--follow-user user-handle nil langs))))
+ (if (equal "" (cdar langs))
+ (mastodon-tl--unfilter-user-languages user-handle)
+ (mastodon-tl--follow-user user-handle nil langs)))))
+
+(defun mastodon-tl--unfilter-user-languages (user-handle)
+ "Remove any language filters for USER-HANDLE.
+This means you will receive posts of theirs marked as being in
+any or no language."
+ (interactive
+ (list (mastodon-tl--user-handles-get "filter by language")))
+ (let ((langs "languages[]"))
+ (mastodon-tl--do-if-item
+ ;; we need "languages[]" as a param, with no "=" and not json-encoded as
+ ;; a string
+ (mastodon-tl--follow-user user-handle nil langs nil :raw))))
(defun mastodon-tl--read-filter-langs (&optional langs)
"Read language choices and return an alist array parameter.
LANGS is the accumulated array param alist if we re-run recursively."
- (let* ((langs-alist langs)
+ (let* ((iso-const mastodon-iso-639-1)
+ (iso (cons '("None (all)" . "") iso-const))
+ (langs-alist langs)
(choice (completing-read "Filter user's posts by language: "
- mastodon-iso-639-1)))
+ iso)))
(when choice
(setq langs-alist
- (push `("languages[]" . ,(alist-get choice mastodon-iso-639-1
+ (push `("languages[]" . ,(alist-get choice iso
nil nil #'string=))
langs-alist))
(if (y-or-n-p "Filter by another language? ")
@@ -2204,7 +2234,7 @@ Action must be either \"unblock\" or \"unmute\"."
accts nil t)))) ; require match
(defun mastodon-tl--do-user-action-and-response
- (user-handle action &optional negp notify langs reblogs)
+ (user-handle action &optional negp notify langs reblogs json)
"Do ACTION on user USER-HANDLE.
NEGP is whether the action involves un-doing something.
If NOTIFY is \"true\", enable notifications when that user posts.
@@ -2234,18 +2264,18 @@ display of the user's boosts in your timeline."
(url (mastodon-http--api (format "accounts/%s/%s" user-id action))))
(if account
(if (equal action "follow") ; y-or-n for all but follow
- (mastodon-tl--do-user-action-function url name user-handle action notify args reblogs)
+ (mastodon-tl--do-user-action-function url name user-handle action notify args reblogs json)
(when (y-or-n-p (format "%s user %s? " action name))
(mastodon-tl--do-user-action-function url name user-handle action args)))
(message "Cannot find a user with handle %S" user-handle))))
(defun mastodon-tl--do-user-action-function
- (url name user-handle action &optional notify args reblogs)
+ (url name user-handle action &optional notify args reblogs json)
"Post ACTION on user NAME/USER-HANDLE to URL.
NOTIFY is either \"true\" or \"false\", and used when we have been called
by `mastodon-tl--follow-user' to enable or disable notifications.
ARGS is an alist of any parameters to send with the request."
- (let ((response (mastodon-http--post url args)))
+ (let ((response (mastodon-http--post url args nil nil json)))
(mastodon-http--triage
response
(lambda (response)
@@ -2271,6 +2301,8 @@ ARGS is an alist of any parameters to send with the request."
((or (string-equal action "mute")
(string-equal action "unmute"))
(message "User %s (@%s) %sd!" name user-handle action))
+ ((equal args "languages[]")
+ (message "User %s language filters removed!" name))
((assoc "languages[]" args #'equal)
(message "User %s filtered by language(s): %s" name
(mapconcat #'cdr args " ")))
@@ -2868,7 +2900,17 @@ RESPONSE is the data returned from the server by
JSON and http headers, without it just the JSON."
(let ((json (if headers (car response) response)))
(cond ((not json) ; praying this is right here, else try "\n[]"
- (message "Looks like nothing returned from endpoint: %s" endpoint))
+ ;; this means that whatever tl was inited won't load, which is not
+ ;; always wanted, as sometimes you still need the page to load so
+ ;; you can be in eg mastodon-mode, have keymap, search etc.
+ (message "Looks like nothing returned from endpoint: %s" endpoint)
+ ;; if we are a new account, home tl may have nothing, but then
+ ;; this clause means we can never load mastodon.el at all!
+ ;; so as a fallback, load trending statuses:
+ ;; FIXME: this could possibly be a fallback for all timelines not
+ ;; just home?
+ (when (equal endpoint "timelines/home")
+ (mastodon-search--trending-statuses)))
((eq (caar json) 'error)
(user-error "Looks like the server bugged out: \"%s\"" (cdar json)))
(t
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 864d767..654918c 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -50,6 +50,7 @@
(defvar mastodon-tl--buffer-spec)
(defvar mastodon-tl--enable-proportional-fonts)
(defvar mastodon-profile-account-settings)
+(defvar mastodon-profile-acccount-preferences-data)
(autoload 'iso8601-parse "iso8601")
(autoload 'mastodon-auth--user-acct "mastodon-auth")
@@ -92,6 +93,8 @@
(autoload 'mastodon-views--view-scheduled-toots "mastodon-views")
(autoload 'org-read-date "org")
(autoload 'mastodon-tl--toot-or-base "mastodon-tl")
+(autoload 'mastodon-profile--get-source-value "mastodon-toot")
+(autoload 'mastodon-tl--get-buffer-type "mastodon-tl")
;; for mastodon-toot--translate-toot-text
(autoload 'mastodon-tl--content "mastodon-tl")
@@ -1878,11 +1881,19 @@ EDIT means we are editing an existing toot, not composing a new one."
(switch-to-buffer-other-window buffer)
(text-mode)
(mastodon-toot-mode t)
+ ;; set visibility:
(setq mastodon-toot--visibility
(or (plist-get mastodon-profile-account-settings 'privacy)
;; use toot visibility setting from the server:
- (mastodon-profile--get-source-pref 'privacy)
+ (mastodon-profile--get-source-value 'privacy)
"public")) ; fallback
+ ;; default language:
+ ;; NB: this is not necessarily set in
+ ;; `mastodon-profile-credential-account' nor in
+ ;; `mastodon-profile-account-settings'!
+ (setq mastodon-toot--language
+ (mastodon-profile--get-preferences-pref 'posting:default:language))
+ ;; display original toot:
(if mastodon-toot-display-orig-in-reply-buffer
(progn
(mastodon-toot--display-docs-and-status-fields reply-text)
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 6eac3d8..a0b5bbc 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -6,7 +6,7 @@
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Marty Hiatt <martianhiatus@riseup.net>
;; Maintainer: Marty Hiatt <martianhiatus@riseup.net>
-;; Version: 1.0.22
+;; Version: 1.0.23
;; Package-Requires: ((emacs "27.1") (request "0.3.0") (persist "0.4"))
;; Homepage: https://codeberg.org/martianh/mastodon.el
@@ -175,6 +175,7 @@ Use. e.g. \"%c\" for your locale's date and time format."
(define-key map (kbd "P") #'mastodon-profile--show-user)
(define-key map (kbd "s") #'mastodon-search--query)
(define-key map (kbd "/") #'mastodon-switch-to-buffer)
+ (define-key map (kbd "\\") #'mastodon-tl--get-remote-local-timeline)
;; quitting mastodon
(define-key map (kbd "q") #'kill-current-buffer)
(define-key map (kbd "Q") #'mastodon-kill-window)
diff --git a/mastodon-index.org b/mastodon-index.org
index 14cba03..4dd5ae3 100644
--- a/mastodon-index.org
+++ b/mastodon-index.org
@@ -109,7 +109,7 @@
| | mastodon-tl--do-link-action | Do the action of the link at point. |
| | mastodon-tl--do-link-action-at-point | Do the action of the link at POSITION. |
| | mastodon-tl--enable-notify-user-posts | Query for USER-HANDLE and enable notifications when they post. |
-| | mastodon-tl--filter-user-user-posts-by-language | Query for USER-HANDLE and enable notifications when they post. |
+| | mastodon-tl--filter-user-user-posts-by-language | Query for USER-HANDLE and filter display of their posts by language. |
| | mastodon-tl--follow-tag | Prompt for a tag and follow it. |
| W | mastodon-tl--follow-user | Query for USER-HANDLE from current status and follow that user. |
| | mastodon-tl--follow-user-disable-boosts | Prompt for a USER-HANDLE, and disable display of boosts in home timeline. |
@@ -140,6 +140,7 @@
| | mastodon-tl--toggle-spoiler-in-thread | Toggler content warning for all posts in current thread. |
| c | mastodon-tl--toggle-spoiler-text-in-toot | Toggle the visibility of the spoiler text in the current toot. |
| C-S-b | mastodon-tl--unblock-user | Query for USER-HANDLE from list of blocked users and unblock that user. |
+| | mastodon-tl--unfilter-user-languages | Remove any language filters for USER-HANDLE. |
| | mastodon-tl--unfollow-tag | Prompt for a followed tag, and unfollow it. |
| C-S-w | mastodon-tl--unfollow-user | Query for USER-HANDLE from current status and unfollow that user. |
| | mastodon-tl--unmute-thread | Mute the thread displayed in the current buffer. |
@@ -147,6 +148,7 @@
| u, g | mastodon-tl--update | Update timeline with new toots. |
| | mastodon-tl--view-full-image | Browse full-sized version of image at point in a new window. |
| | mastodon-tl--view-full-image-or-play-video | View full sized version of image at point, or try to play video. |
+| | mastodon-tl--view-item-on-own-instance | Load current toot on your own instance. |
| | mastodon-tl--view-whole-thread | From a thread view, view entire thread. |
| t | mastodon-toot | Update instance with new toot. Content is captured in a new buffer. |
| C-c C-a | mastodon-toot--attach-media | Prompt for an attachment FILE with DESCRIPTION. |
@@ -237,47 +239,46 @@
#+end_src
#+RESULTS:
-| Custom variable | Description |
-|--------------------------------------------------------------+--------------------------------------------------------------------------------------------------|
-| mastodon-active-user | Username of the active user. |
-| mastodon-client--token-file | File path where Mastodon access tokens are stored. |
-| mastodon-instance-url | Base URL for the fediverse instance you want to be active. |
-| mastodon-media--avatar-height | Height of the user avatar images (if shown). |
-| mastodon-media--enable-image-caching | Whether images should be cached. |
-| mastodon-media--preview-max-height | Max height of any media attachment preview to be shown in timelines. |
-| mastodon-mode-hook | Hook run when entering Mastodon mode. |
-| mastodon-notifications--profile-note-in-foll-reqs | When non-nil, show some of a user's profile note in follow |
-| mastodon-notifications--profile-note-in-foll-reqs-max-length | The maximum character length for display of user profile note in |
-| mastodon-notifications-profile-note-in-foll-reqs | When non-nil, show some of a user's profile note in follow |
-| mastodon-profile-mode-hook | Hook run after entering or leaving `mastodon-profile-mode'. |
-| mastodon-profile-update-mode-hook | Hook run after entering or leaving `mastodon-profile-update-mode'. |
-| mastodon-search-mode-hook | Hook run after entering or leaving `mastodon-search-mode'. |
-| mastodon-tl--display-caption-not-url-when-no-media | Display an image's caption rather than URL. |
-| mastodon-tl--display-media-p | A boolean value stating whether to show media in timelines. |
-| mastodon-tl--enable-proportional-fonts | Nonnil to enable using proportional fonts when rendering HTML. |
-| mastodon-tl--enable-relative-timestamps | Whether to show relative (to the current time) timestamps. |
-| mastodon-tl--expand-content-warnings | Whether to expand content warnings by default. |
-| mastodon-tl--hide-replies | Whether to hide replies from the timelines. |
-| mastodon-tl--highlight-current-toot | Whether to highlight the toot at point. Uses `cursor-face' special property. |
-| mastodon-tl--load-full-sized-images-in-emacs | Whether to load full-sized images inside Emacs. |
-| mastodon-tl--no-fill-on-render | Non-nil to disable filling by shr.el while rendering toot body. |
-| mastodon-tl--remote-local-domains | A list of domains to view the local timelines of using `mastodon-tl--get-remote-local-timeline'. |
-| mastodon-tl--show-avatars | Whether to enable display of user avatars in timelines. |
-| mastodon-tl--show-stats | Whether to show toot stats (faves, boosts, replies counts). |
-| mastodon-tl--symbols | A set of symbols (and fallback strings) to be used in timeline. |
-| mastodon-tl--tag-timeline-tags | A list of up to four tags for use with `mastodon-tl--followed-tags-timeline'. |
-| mastodon-tl--timeline-posts-count | Number of posts to display when loading a timeline. |
-| mastodon-tl-position-after-update | Defines where `point' should be located after a timeline update. |
-| mastodon-toot--attachment-height | Height of the attached images preview in the toot draft buffer. |
-| mastodon-toot--completion-style-for-mentions | The company completion style to use for mentions. |
-| mastodon-toot--default-media-directory | The default directory when prompting for a media file to upload. |
-| mastodon-toot--default-reply-visibility | Default visibility settings when replying. |
-| mastodon-toot--emojify-in-compose-buffer | Whether to enable `emojify-mode' in the compose buffer. |
-| mastodon-toot--enable-completion | Whether to enable completion of mentions and hashtags. |
-| mastodon-toot--enable-custom-instance-emoji | Whether to enable your instance's custom emoji by default. |
-| mastodon-toot--proportional-fonts-compose | Nonnil to enable using proportional fonts in the compose buffer. |
-| mastodon-toot--use-company-for-completion | Whether to enable company for completion. |
-| mastodon-toot-display-orig-in-reply-buffer | Display a copy of the toot replied to in the compose buffer. |
-| mastodon-toot-mode-hook | Hook run after entering or leaving `mastodon-toot-mode'. |
-| mastodon-toot-orig-in-reply-length | Length to crop toot replied to in the compose buffer to. |
-| mastodon-toot-timestamp-format | Format to use for timestamps. |
+| Custom variable | Description |
+|--------------------------------------------------------------+-------------------------------------------------------------------------------|
+| mastodon-active-user | Username of the active user. |
+| mastodon-client--token-file | File path where Mastodon access tokens are stored. |
+| mastodon-instance-url | Base URL for the fediverse instance you want to be active. |
+| mastodon-media--avatar-height | Height of the user avatar images (if shown). |
+| mastodon-media--enable-image-caching | Whether images should be cached. |
+| mastodon-media--preview-max-height | Max height of any media attachment preview to be shown in timelines. |
+| mastodon-mode-hook | Hook run when entering Mastodon mode. |
+| mastodon-notifications--profile-note-in-foll-reqs | When non-nil, show some of a user's profile note in follow |
+| mastodon-notifications--profile-note-in-foll-reqs-max-length | The maximum character length for display of user profile note in |
+| mastodon-profile-mode-hook | Hook run after entering or leaving `mastodon-profile-mode'. |
+| mastodon-profile-update-mode-hook | Hook run after entering or leaving `mastodon-profile-update-mode'. |
+| mastodon-search-mode-hook | Hook run after entering or leaving `mastodon-search-mode'. |
+| mastodon-tl--display-caption-not-url-when-no-media | Display an image's caption rather than URL. |
+| mastodon-tl--display-media-p | A boolean value stating whether to show media in timelines. |
+| mastodon-tl--enable-proportional-fonts | Nonnil to enable using proportional fonts when rendering HTML. |
+| mastodon-tl--enable-relative-timestamps | Whether to show relative (to the current time) timestamps. |
+| mastodon-tl--expand-content-warnings | Whether to expand content warnings by default. |
+| mastodon-tl--hide-replies | Whether to hide replies from the timelines. |
+| mastodon-tl--highlight-current-toot | Whether to highlight the toot at point. Uses `cursor-face' special property. |
+| mastodon-tl--load-full-sized-images-in-emacs | Whether to load full-sized images inside Emacs. |
+| mastodon-tl--no-fill-on-render | Non-nil to disable filling by shr.el while rendering toot body. |
+| mastodon-tl--remote-local-domains | A list of domains to view the local timelines of. |
+| mastodon-tl--show-avatars | Whether to enable display of user avatars in timelines. |
+| mastodon-tl--show-stats | Whether to show toot stats (faves, boosts, replies counts). |
+| mastodon-tl--symbols | A set of symbols (and fallback strings) to be used in timeline. |
+| mastodon-tl--tag-timeline-tags | A list of up to four tags for use with `mastodon-tl--followed-tags-timeline'. |
+| mastodon-tl--timeline-posts-count | Number of posts to display when loading a timeline. |
+| mastodon-tl-position-after-update | Defines where `point' should be located after a timeline update. |
+| mastodon-toot--attachment-height | Height of the attached images preview in the toot draft buffer. |
+| mastodon-toot--completion-style-for-mentions | The company completion style to use for mentions. |
+| mastodon-toot--default-media-directory | The default directory when prompting for a media file to upload. |
+| mastodon-toot--default-reply-visibility | Default visibility settings when replying. |
+| mastodon-toot--emojify-in-compose-buffer | Whether to enable `emojify-mode' in the compose buffer. |
+| mastodon-toot--enable-completion | Whether to enable completion of mentions and hashtags. |
+| mastodon-toot--enable-custom-instance-emoji | Whether to enable your instance's custom emoji by default. |
+| mastodon-toot--proportional-fonts-compose | Nonnil to enable using proportional fonts in the compose buffer. |
+| mastodon-toot--use-company-for-completion | Whether to enable company for completion. |
+| mastodon-toot-display-orig-in-reply-buffer | Display a copy of the toot replied to in the compose buffer. |
+| mastodon-toot-mode-hook | Hook run after entering or leaving `mastodon-toot-mode'. |
+| mastodon-toot-orig-in-reply-length | Length to crop toot replied to in the compose buffer to. |
+| mastodon-toot-timestamp-format | Format to use for timestamps. |
diff --git a/mastodon.info b/mastodon.info
index 16b19d0..e300abe 100644
--- a/mastodon.info
+++ b/mastodon.info
@@ -63,6 +63,10 @@ File: mastodon.info, Node: README, Prev: Top, Up: Top
that implement the Mastodon API. For info see joinmastodon.org
(https://joinmastodon.org/).
+ NB: ‘mastodon.el’ now ships this readme as an .info file, so if you
+have it installed you should be able to browse this readme inside emacs.
+‘C-h i’ for info, then ‘m masto RET’ should load it for you.
+
* Menu:
* Installation::
@@ -237,6 +241,9 @@ your ‘mastodon-token-file’ does not contain ‘:client_id’ and
1. Keybindings
+ For a full list of commands and variables, see mastodon-index.org
+ (mastodon-index.org).
+
Key Action
-----------------------------------------------------------------------------------------------------------
*Help*
@@ -264,6 +271,7 @@ your ‘mastodon-token-file’ does not contain ‘:client_id’ and
‘,’ view favouriters of toot at point
‘.’ view boosters of toot at point
‘/’ switch between mastodon buffers
+ ‘\’ prompt for an instance domain and view its local timeline (if poss)
‘Z’ report user/toot at point to instances moderators
*Other views*
‘s’ search (posts, users, tags) (NB: only posts you have interacted with)
@@ -326,14 +334,20 @@ cancels. Both actions kill the buffer and window. Further keybindings
are displayed in the buffer, and in the following subsection.
Replies preserve visibility status/content warnings, and include
-boosters by default.
+boosters by default. If the region is active when you start a reply, it
+will be yanked into the compose buffer prefixed with ‘>’ to form a rough
+reply quote.
- Server’s max toot length, and attachment previews, are shown.
+ Server’s max toot length, with running char count, and attachment
+previews, are shown.
You can download and use your instance’s custom emoji
(‘mastodon-toot--download-custom-emoji’,
‘mastodon-toot--enable-custom-emoji’).
+ If you want to view some of the toot being replied to in the compose
+buffer, set ‘mastodon-toot-display-orig-in-reply-buffer’ to non-nil.
+
The compose buffer uses ‘text-mode’ so any configuration you have for
that mode will be enabled. If any of your existing config conflicts
with ‘mastodon-toot’, you can disable it in the
@@ -346,28 +360,33 @@ is as follows:
1. Keybindings
- Key Action
- -------------------------------------------------
- ‘C-c C-c’ Send toot
- ‘C-c C-k’ Cancel toot
- ‘C-c C-w’ Add content warning
- ‘C-c C-v’ Change toot visibility
- ‘C-c C-n’ Add sensitive media/nsfw flag
- ‘C-c C-a’ Upload attachment(s)
- ‘C-c !’ Remove all attachments
- ‘C-c C-e’ Add emoji (if ‘emojify’ installed)
- ‘C-c C-p’ Create a poll
- ‘C-c C-l’ Set toot language
-
- 2. Autocompletion of mentions and tags
-
- Autocompletion of mentions and tags is provided by
+ Key Action
+ --------------------------------------------------
+ ‘C-c C-c’ Send toot
+ ‘C-c C-k’ Cancel toot
+ ‘C-c C-w’ Add content warning
+ ‘C-c C-v’ Change toot visibility
+ ‘C-c C-n’ Add sensitive media/nsfw flag
+ ‘C-c C-a’ Upload attachment(s)
+ ‘C-c !’ Remove all attachments
+ ‘C-c C-e’ Add emoji (if ‘emojify’ installed)
+ ‘C-c C-p’ Create a poll
+ ‘C-c C-l’ Set toot language
+ ‘-C-c C-s’ Schedule toot
+
+ 2. Autocompletion of mentions, tags and emoji
+
+ Autocompletion of mentions, tags, and emojis is provided by
‘completion-at-point-functions’ (capf) backends.
- ‘mastodon-toot--enable-completion’ is enabled by default. If you
- want to enable ‘company-mode’ in the toot compose buffer, set
- ‘mastodon-toot--use-company-for-completion’ to ‘t’. (‘mastodon.el’
- used to run its own native company backends, but these have been
- removed in favour of capfs.)
+ ‘mastodon-toot--enable-completion’ is enabled by default.
+
+ To trigger completion, type a prefix followed by a few letters, ‘@’
+ for mentions, ‘#’ for tags, and ‘:’ for emoji.
+
+ If you want to enable ‘company-mode’ in the toot compose buffer,
+ set ‘mastodon-toot--use-company-for-completion’ to ‘t’.
+ (‘mastodon.el’ used to run its own native company backends, but
+ these have been removed in favour of capfs.)
If you don’t run ‘company’ and want immediate, keyless completion,
you’ll need to have another completion engine running that handles
@@ -390,7 +409,7 @@ File: mastodon.info, Node: Other commands and account settings, Next: Customiz
------------------------------------------
In addition to ‘mastodon’, the following three functions are autoloaded
-and should work without first loading ‘mastodon.el’:
+and should work without first loading a ‘mastodon.el’ buffer:
• ‘mastodon-toot’: Compose new toot
• ‘mastodon-notifications-get’: View all notifications
• ‘mastodon-url-lookup’: Attempt to load a URL in ‘mastodon.el’. URL
@@ -475,6 +494,9 @@ See ‘M-x customize-group RET mastodon’ to view all customize options.
• Display toot being replied to
• Set default reply visibility
+ • Nofitication options:
+ • Display user’s profile note in follow requests
+

File: mastodon.info, Node: Commands and variables index, Next: Alternative timeline layout, Prev: Customization, Up: Usage
@@ -484,6 +506,10 @@ File: mastodon.info, Node: Commands and variables index, Next: Alternative tim
An index of all user-facing commands and custom variables is available
here: mastodon-index.org (mastodon-index.org).
+ You can also hit ‘?’ in any ‘mastodon.el’ buffer to see the available
+bindings, or run ‘M-X’ (upper-case ‘X’) to view all commands in the
+buffer with completion, and call one.
+

File: mastodon.info, Node: Alternative timeline layout, Next: Live-updating timelines mastodon-async-mode, Prev: Commands and variables index, Up: Usage
@@ -695,36 +721,36 @@ File: mastodon.info, Node: Contributors, Prev: Supporting mastodonel, Up: REA
Tag Table:
Node: Top210
Node: README962
-Node: Installation1378
-Node: ELPA1667
-Node: MELPA1895
-Node: Repo2275
-Node: Emoji2768
-Node: Discover3099
-Node: Usage3651
-Node: Logging in to your instance4094
-Node: Timelines5091
-Ref: Keybindings5566
-Ref: Toot byline legend10139
-Node: Composing toots10448
-Ref: Keybindings (1)11687
-Ref: Autocompletion of mentions and tags12205
-Ref: Draft toots12918
-Node: Other commands and account settings13389
-Node: Customization16547
-Node: Commands and variables index17334
-Node: Alternative timeline layout17654
-Node: Live-updating timelines mastodon-async-mode18059
-Node: Translating toots18911
-Node: Bookmarks and mastodonel20093
-Node: Dependencies20565
-Node: Network compatibility21175
-Node: Contributing22057
-Node: Bug reports22553
-Node: Fixes and features23464
-Node: Coding style23965
-Node: Supporting mastodonel24589
-Node: Contributors25156
+Node: Installation1596
+Node: ELPA1885
+Node: MELPA2113
+Node: Repo2493
+Node: Emoji2986
+Node: Discover3317
+Node: Usage3869
+Node: Logging in to your instance4312
+Node: Timelines5309
+Ref: Keybindings5784
+Ref: Toot byline legend10558
+Node: Composing toots10867
+Ref: Keybindings (1)12419
+Ref: Autocompletion of mentions tags and emoji12985
+Ref: Draft toots13851
+Node: Other commands and account settings14322
+Node: Customization17489
+Node: Commands and variables index18367
+Node: Alternative timeline layout18883
+Node: Live-updating timelines mastodon-async-mode19288
+Node: Translating toots20140
+Node: Bookmarks and mastodonel21322
+Node: Dependencies21794
+Node: Network compatibility22404
+Node: Contributing23286
+Node: Bug reports23782
+Node: Fixes and features24693
+Node: Coding style25194
+Node: Supporting mastodonel25818
+Node: Contributors26385

End Tag Table
diff --git a/mastodon.texi b/mastodon.texi
index b33162d..571a2d7 100644
--- a/mastodon.texi
+++ b/mastodon.texi
@@ -75,6 +75,8 @@ Contributing
@samp{mastodon.el} is an Emacs client for the AcitivityPub social networks that
implement the Mastodon API@. For info see @uref{https://joinmastodon.org/, joinmastodon.org}.
+NB: @samp{mastodon.el} now ships this readme as an .info file, so if you have it installed you should be able to browse this readme inside emacs. @samp{C-h i} for info, then @samp{m masto RET} should load it for you.
+
@menu
* Installation::
* Usage::
@@ -234,6 +236,8 @@ not contain @samp{:client_id} and @samp{:client_secret}.
@anchor{Keybindings}Keybindings
+For a full list of commands and variables, see @uref{mastodon-index.org, mastodon-index.org}.
+
@multitable {aaaaaaaaaaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@headitem Key
@tab Action
@@ -287,6 +291,8 @@ not contain @samp{:client_id} and @samp{:client_secret}.
@tab view boosters of toot at point
@item @samp{/}
@tab switch between mastodon buffers
+@item @samp{\}
+@tab prompt for an instance domain and view its local timeline (if poss)
@item @samp{Z}
@tab report user/toot at point to instances moderators
@item
@@ -387,13 +393,15 @@ in @samp{text-mode} and @samp{mastodon-toot} minor mode. Enter the contents of y
here. @samp{C-c C-c} sends the toot. @samp{C-c C-k} cancels. Both actions kill the buffer
and window. Further keybindings are displayed in the buffer, and in the following subsection.
-Replies preserve visibility status/content warnings, and include boosters by default.
+Replies preserve visibility status/content warnings, and include boosters by default. If the region is active when you start a reply, it will be yanked into the compose buffer prefixed with @samp{>} to form a rough reply quote.
-Server's max toot length, and attachment previews, are shown.
+Server's max toot length, with running char count, and attachment previews, are shown.
You can download and use your instance's custom emoji
(@samp{mastodon-toot--download-custom-emoji}, @samp{mastodon-toot--enable-custom-emoji}).
+If you want to view some of the toot being replied to in the compose buffer, set @samp{mastodon-toot-display-orig-in-reply-buffer} to non-nil.
+
The compose buffer uses @samp{text-mode} so any configuration you have for that mode
will be enabled. If any of your existing config conflicts with @samp{mastodon-toot},
you can disable it in the @samp{mastodon-toot-mode-hook}. For example, the default
@@ -410,7 +418,7 @@ value of that hook is as follows:
@anchor{Keybindings (1)}Keybindings
-@multitable {aaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
+@multitable {aaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@headitem Key
@tab Action
@item @samp{C-c C-c}
@@ -433,16 +441,22 @@ value of that hook is as follows:
@tab Create a poll
@item @samp{C-c C-l}
@tab Set toot language
+@item @samp{-C-c C-s}
+@tab Schedule toot
@end multitable
@item
-@anchor{Autocompletion of mentions and tags}Autocompletion of mentions and tags
+@anchor{Autocompletion of mentions tags and emoji}Autocompletion of mentions, tags and emoji
-Autocompletion of mentions and tags is provided by
+Autocompletion of mentions, tags, and emojis is provided by
@samp{completion-at-point-functions} (capf) backends.
-@samp{mastodon-toot--enable-completion} is enabled by default. If you want to enable
-@samp{company-mode} in the toot compose buffer, set
+@samp{mastodon-toot--enable-completion} is enabled by default.
+
+To trigger completion, type a prefix followed by a few letters, @samp{@@} for
+mentions, @samp{#} for tags, and @samp{:} for emoji.
+
+If you want to enable @samp{company-mode} in the toot compose buffer, set
@samp{mastodon-toot--use-company-for-completion} to @samp{t}. (@samp{mastodon.el} used to run its
own native company backends, but these have been removed in favour of capfs.)
@@ -472,7 +486,7 @@ Compose buffer text is saved as you type, kept in @samp{mastodon-toot-current-to
@subsection Other commands and account settings:
In addition to @samp{mastodon}, the following three functions are autoloaded and should
-work without first loading @samp{mastodon.el}:
+work without first loading a @samp{mastodon.el} buffer:
@itemize
@item
@samp{mastodon-toot}: Compose new toot
@@ -611,6 +625,13 @@ Display toot being replied to
@item
Set default reply visibility
@end itemize
+
+@item
+Nofitication options:
+@itemize
+@item
+Display user's profile note in follow requests
+@end itemize
@end itemize
@node Commands and variables index
@@ -618,6 +639,8 @@ Set default reply visibility
An index of all user-facing commands and custom variables is available here: @uref{mastodon-index.org, mastodon-index.org}.
+You can also hit @samp{?} in any @samp{mastodon.el} buffer to see the available bindings, or run @samp{M-X} (upper-case @samp{X}) to view all commands in the buffer with completion, and call one.
+
@node Alternative timeline layout
@subsection Alternative timeline layout