aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-07-18 12:58:05 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-07-18 12:58:05 +0200
commit43cd626f6a3ec81cf72b4d7e522be3930e5a3846 (patch)
tree4a5ee702ee65b2d2d97fd4fc56681a0de6f8f3e1
parentf16fcb15a8be0143db1f4a11f5025512feca5b44 (diff)
parentaa6b7b25bef714fe88493d4c04327a61fba0bd53 (diff)
Merge branch 'emoji.el' into develop
-rw-r--r--README.org37
-rw-r--r--lisp/mastodon-toot.el11
-rw-r--r--mastodon-index.org4
-rw-r--r--mastodon.info113
-rw-r--r--mastodon.texi28
5 files changed, 112 insertions, 81 deletions
diff --git a/README.org b/README.org
index b542142..d8f94f9 100644
--- a/README.org
+++ b/README.org
@@ -65,8 +65,7 @@ it shouldn't be very hard to get it working.
*** Emoji
-=mastodon-mode= will enable [[https://github.com/iqbalansari/emacs-emojify][Emojify]] if it is loaded in your Emacs environment, so
-there's no need to write your own hook anymore. =emojify-mode= is not required.
+Since Emacs 28, it has builtin emoji support with =emoji.el=. If you prefer to use [[https://github.com/iqbalansari/emacs-emojify][Emojify]], =require= it and set =mastodon-use-emojify= to non-nil to display emoji in timelines and to use it when composing toots. =Emoji.el= is the better option, but for now only =emojify= supports downloading and using custom emoji from your instance. From personal experience, =emojify= also tends to result in less TOFU.
*** Discover
@@ -242,21 +241,21 @@ 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 |
-| =-C-c C-s= | Schedule toot |
-|----------+----------------------------------|
+|----------+-------------------------------|
+| 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= | Insert emoji |
+| =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
@@ -265,7 +264,7 @@ Autocompletion of mentions, tags, and emojis is provided by
=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.
+mentions, =#= for tags, and =:= for emoji (for now this only works when using =emojify.el=).
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
@@ -424,7 +423,7 @@ Hard dependencies (should all install with =mastodon.el=):
- +=persist= for storing some settings across sessions+ (we now use =multisession.el= for this)
Optional dependencies (install yourself, =mastodon.el= can use them):
-- =emojify= for inserting and viewing emojis
+- =emojify= to use custom emoji (else we use builtin =emoji.el=)
- =mpv= and =mpv.el= for viewing videos and gifs
- =lingva.el= for translating toots
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 51cf1c0..e1d7259 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -31,6 +31,8 @@
;;; Code:
(eval-when-compile (require 'subr-x))
+
+(defvar mastodon-use-emojify)
(require 'emojify nil :noerror)
(declare-function emojify-insert-emoji "emojify")
(declare-function emojify-set-emoji-data "emojify")
@@ -157,8 +159,6 @@ If the original toot visibility is different we use the more restricted one."
"Whether to enable your instance's custom emoji by default."
:type 'boolean)
-(defvar mastodon-use-emojify)
-
(defcustom mastodon-toot--proportional-fonts-compose nil
"Nonnil to enable using proportional fonts in the compose buffer.
By default fixed width fonts are used."
@@ -281,8 +281,7 @@ Includes boosts, and notifications that display toots."
(define-key map (kbd "C-c C-w") #'mastodon-toot--toggle-warning)
(define-key map (kbd "C-c C-n") #'mastodon-toot--toggle-nsfw)
(define-key map (kbd "C-c C-v") #'mastodon-toot--change-visibility)
- (when (require 'emojify nil :noerror)
- (define-key map (kbd "C-c C-e") #'mastodon-toot--insert-emoji))
+ (define-key map (kbd "C-c C-e") #'mastodon-toot--insert-emoji)
(define-key map (kbd "C-c C-a") #'mastodon-toot--attach-media)
(define-key map (kbd "C-c !") #'mastodon-toot--clear-all-attachments)
(define-key map (kbd "C-c C-p") #'mastodon-toot--create-poll)
@@ -764,7 +763,9 @@ TEXT-ONLY means don't check for attachments or polls."
;;; EMOJIS
(defalias 'mastodon-toot--insert-emoji
- #'emojify-insert-emoji
+ (if mastodon-use-emojify
+ #'emojify-insert-emoji
+ #'emoji-search)
"Prompt to insert an emoji.")
(defun mastodon-toot--emoji-dir ()
diff --git a/mastodon-index.org b/mastodon-index.org
index 4637403..949cd6d 100644
--- a/mastodon-index.org
+++ b/mastodon-index.org
@@ -110,7 +110,7 @@
| | 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 filter display of their posts by language. |
-| | mastodon-tl--follow-tag | Prompt for a tag and follow it. |
+| | mastodon-tl--follow-tag | Prompt for a tag (from post at point) 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. |
| | mastodon-tl--follow-user-enable-boosts | Prompt for a USER-HANDLE, and enable display of boosts in home timeline. |
@@ -121,9 +121,7 @@
| \ | mastodon-tl--get-remote-local-timeline | Prompt for an instance domain and try to display its local timeline. |
| # | mastodon-tl--get-tag-timeline | Prompt for tag and opens its timeline. |
| n | mastodon-tl--goto-next-item | Jump to next item. |
-| C-<down> | mastodon-tl--goto-next-toot | |
| p | mastodon-tl--goto-prev-item | Jump to previous item. |
-| C-<up> | mastodon-tl--goto-prev-toot | |
| " | mastodon-tl--list-followed-tags | List followed tags. View timeline of tag user choses. |
| C-<return> | mastodon-tl--mpv-play-video-at-point | Play the video or gif at point with an mpv process. |
| | mastodon-tl--mpv-play-video-from-byline | Run `mastodon-tl--mpv-play-video-at-point' on first moving image in post. |
diff --git a/mastodon.info b/mastodon.info
index e300abe..1689c1d 100644
--- a/mastodon.info
+++ b/mastodon.info
@@ -24,6 +24,7 @@ README
* Contributing::
* Supporting ‘mastodon.el’: Supporting mastodonel.
* Contributors::
+* screenshots::
Installation
@@ -76,6 +77,7 @@ have it installed you should be able to browse this readme inside emacs.
* Contributing::
* Supporting ‘mastodon.el’: Supporting mastodonel.
* Contributors::
+* screenshots::

File: mastodon.info, Node: Installation, Next: Usage, Up: README
@@ -150,10 +152,12 @@ File: mastodon.info, Node: Emoji, Next: Discover, Prev: Repo, Up: Installati
1.1.4 Emoji
-----------
-‘mastodon-mode’ will enable Emojify
-(https://github.com/iqbalansari/emacs-emojify) if it is loaded in your
-Emacs environment, so there’s no need to write your own hook anymore.
-‘emojify-mode’ is not required.
+Since Emacs 28, it has builtin emoji support with ‘emoji.el’. If you
+prefer to use Emojify (https://github.com/iqbalansari/emacs-emojify),
+‘require’ it and set ‘mastodon-use-emojify’ to non-nil to display emoji
+in timelines and to use it when composing toots. ‘Emoji.el’ is the
+better option, but for now only ‘emojify’ supports downloading and using
+custom emoji from your instance.

File: mastodon.info, Node: Discover, Prev: Emoji, Up: Installation
@@ -361,7 +365,7 @@ 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
@@ -369,7 +373,7 @@ is as follows:
‘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-e’ Insert emoji
‘C-c C-p’ Create a poll
‘C-c C-l’ Set toot language
‘-C-c C-s’ Schedule toot
@@ -381,7 +385,8 @@ is as follows:
‘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.
+ for mentions, ‘#’ for tags, and ‘:’ for emoji (for now this only
+ works when using ‘emojify.el’).
If you want to enable ‘company-mode’ in the toot compose buffer,
set ‘mastodon-toot--use-company-for-completion’ to ‘t’.
@@ -574,11 +579,12 @@ File: mastodon.info, Node: Bookmarks and mastodonel, Prev: Translating toots,
1.2.10 Bookmarks and ‘mastodon.el’
----------------------------------
-‘mastodon.el’ doesn’t currently implement its own bookmark record and
-handler, which means that emacs bookmarks will not work as is. Until we
-implement them, you can get bookmarks going immediately by using
-bookmark+.el
-(https://github.com/emacsmirror/emacswiki.org/blob/master/bookmark%2b.el).
+‘mastodon.el’ implements a basic bookmark record and handler.
+Currently, this means that you can bookmark a post item and later load
+it in thread view. This could be expanded to any item with an id, but
+probably not to things like timeline views. If you want to be able to
+bookmark something, open an issue and ask, it’s trivial to expand the
+bookmarking code.

File: mastodon.info, Node: Dependencies, Next: Network compatibility, Prev: Usage, Up: README
@@ -592,7 +598,7 @@ Hard dependencies (should all install with ‘mastodon.el’):
• ‘persist’ for storing some settings across sessions
Optional dependencies (install yourself, ‘mastodon.el’ can use them):
- • ‘emojify’ for inserting and viewing emojis
+ • ‘emojify’ to use custom emoji (else we use builtin ‘emoji.el’)
• ‘mpv’ and ‘mpv.el’ for viewing videos and gifs
• ‘lingva.el’ for translating toots
@@ -701,7 +707,7 @@ I can provide IBAN or other bank account details.
out.

-File: mastodon.info, Node: Contributors, Prev: Supporting mastodonel, Up: README
+File: mastodon.info, Node: Contributors, Next: screenshots, Prev: Supporting mastodonel, Up: README
1.7 Contributors
================
@@ -716,41 +722,58 @@ File: mastodon.info, Node: Contributors, Prev: Supporting mastodonel, Up: REA
• <https://github.com/hdurer>
• <https://codeberg.org/Red_Starfish>
+
+File: mastodon.info, Node: screenshots, Prev: Contributors, Up: README
+
+1.8 screenshots
+===============
+
+Here’s a (federated) timeline:
+
+
+
+
+ Here’s a notifcations view plus a compose buffer:
+
+
+
+

Tag Table:
Node: Top210
-Node: README962
-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
+Node: README978
+Node: Installation1628
+Node: ELPA1917
+Node: MELPA2145
+Node: Repo2525
+Node: Emoji3018
+Node: Discover3536
+Node: Usage4088
+Node: Logging in to your instance4531
+Node: Timelines5528
+Ref: Keybindings6003
+Ref: Toot byline legend10777
+Node: Composing toots11086
+Ref: Keybindings (1)12638
+Ref: Autocompletion of mentions tags and emoji13173
+Ref: Draft toots14098
+Node: Other commands and account settings14569
+Node: Customization17736
+Node: Commands and variables index18614
+Node: Alternative timeline layout19130
+Node: Live-updating timelines mastodon-async-mode19535
+Node: Translating toots20387
+Node: Bookmarks and mastodonel21569
+Node: Dependencies22108
+Node: Network compatibility22742
+Node: Contributing23624
+Node: Bug reports24120
+Node: Fixes and features25031
+Node: Coding style25532
+Node: Supporting mastodonel26156
+Node: Contributors26723
+Node: screenshots27158

End Tag Table
diff --git a/mastodon.texi b/mastodon.texi
index 571a2d7..059435e 100644
--- a/mastodon.texi
+++ b/mastodon.texi
@@ -38,6 +38,7 @@ README
* Contributing::
* Supporting @samp{mastodon.el}: Supporting @samp{mastodonel}.
* Contributors::
+* screenshots::
Installation
@@ -85,6 +86,7 @@ NB: @samp{mastodon.el} now ships this readme as an .info file, so if you have it
* Contributing::
* Supporting @samp{mastodon.el}: Supporting @samp{mastodonel}.
* Contributors::
+* screenshots::
@end menu
@node Installation
@@ -150,8 +152,7 @@ it shouldn't be very hard to get it working.
@node Emoji
@subsection Emoji
-@samp{mastodon-mode} will enable @uref{https://github.com/iqbalansari/emacs-emojify, Emojify} if it is loaded in your Emacs environment, so
-there's no need to write your own hook anymore. @samp{emojify-mode} is not required.
+Since Emacs 28, it has builtin emoji support with @samp{emoji.el}. If you prefer to use @uref{https://github.com/iqbalansari/emacs-emojify, Emojify}, @samp{require} it and set @samp{mastodon-use-emojify} to non-nil to display emoji in timelines and to use it when composing toots. @samp{Emoji.el} is the better option, but for now only @samp{emojify} supports downloading and using custom emoji from your instance.
@node Discover
@subsection Discover
@@ -418,7 +419,7 @@ value of that hook is as follows:
@anchor{Keybindings (1)}Keybindings
-@multitable {aaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
+@multitable {aaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@headitem Key
@tab Action
@item @samp{C-c C-c}
@@ -436,7 +437,7 @@ value of that hook is as follows:
@item @samp{C-c !}
@tab Remove all attachments
@item @samp{C-c C-e}
-@tab Add emoji (if @samp{emojify} installed)
+@tab Insert emoji
@item @samp{C-c C-p}
@tab Create a poll
@item @samp{C-c C-l}
@@ -454,7 +455,7 @@ Autocompletion of mentions, tags, and emojis is provided by
@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.
+mentions, @samp{#} for tags, and @samp{:} for emoji (for now this only works when using @samp{emojify.el}).
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
@@ -690,9 +691,7 @@ to your translator function as its text argument. Here's what
@node Bookmarks and @samp{mastodonel}
@subsection Bookmarks and @samp{mastodon.el}
-@samp{mastodon.el} doesn’t currently implement its own bookmark record and handler,
-which means that emacs bookmarks will not work as is. Until we implement them,
-you can get bookmarks going immediately by using @uref{https://github.com/emacsmirror/emacswiki.org/blob/master/bookmark%2b.el, bookmark+.el}.
+@samp{mastodon.el} implements a basic bookmark record and handler. Currently, this means that you can bookmark a post item and later load it in thread view. This could be expanded to any item with an id, but probably not to things like timeline views. If you want to be able to bookmark something, open an issue and ask, it's trivial to expand the bookmarking code.
@node Dependencies
@section Dependencies
@@ -708,7 +707,7 @@ Hard dependencies (should all install with @samp{mastodon.el}):
Optional dependencies (install yourself, @samp{mastodon.el} can use them):
@itemize
@item
-@samp{emojify} for inserting and viewing emojis
+@samp{emojify} to use custom emoji (else we use builtin @samp{emoji.el})
@item
@samp{mpv} and @samp{mpv.el} for viewing videos and gifs
@item
@@ -826,4 +825,15 @@ Some significant contributors are:
@uref{https://codeberg.org/Red_Starfish}
@end itemize
+@node screenshots
+@section screenshots
+
+Here's a (federated) timeline:
+
+@image{screenshot-tl,,,,png}
+
+Here's a notifcations view plus a compose buffer:
+
+@image{screenshot-notifs+compose,,,,png}
+
@bye \ No newline at end of file