mooseyboots / mastodon.el Goto Github PK
View Code? Open in Web Editor NEWEmacs client for Mastodon. moved to:
Home Page: https://codeberg.org/martianh/mastodon.el
License: GNU General Public License v3.0
Emacs client for Mastodon. moved to:
Home Page: https://codeberg.org/martianh/mastodon.el
License: GNU General Public License v3.0
It would be nice to have an overview of the possible keybinds+commands through a magit-like popup.
Possible options are:
I'll provide a PR for both.
Apparently, mastodon.el does not automatically refrshes the open timeline: I need to call mastodon-tl--update (which has no key binding by default). Why not a periodic automatic resfresh, with a period configured by a variable?
mastodon-auth.el
requires plstore which should be mentioned in the README
file
The default color for toots is a very pale grey, almost unreadable. The blue for the user names is not much better.
I suggest to change the default and (probably more important) to document how the user could change it (my own preference would be to use the default font/color for everything).
When you open a toot-mode buffer, there should be read-only documentation:
C-c C-c
sends tootC-c C-k
cancels tootIn mastodon-mode, non-ASCII characters in usernames or in toots are displayed by escape sequences of the UTF-8 (\303\251 instead of é).
mastodon.el just git pulled
GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-17 on lgw01-04, modified by Debian (can display Unicode just fine)
They appear empty. Pls fix.
Prompt for a hashtag and open a timeline.
Attach media_ids
to a toot send from the minor mode. Limit to four.
Testing is good. I should add tests.
mastodon-toot
returns a 403 Forbidden
error response. The error message mentions a scope issue:
{"error":"This action is outside the authorized scopes"}
Since mastodon.el registers with "read write follow"
scopes, this doesn't make much sense.
I can use the same token from mastodon--api-token-string
to GET posts.
curl --header "Authorization: Bearer ${TOKEN}" -sS https://mastodon.social/api/v1/statuses/1895661
This returns a 200
and the toot data.
mastodon--http-post
should be mastodon-http--post
for example.
Look into the unwind-protect
function for cleaning up buffers on TL switches, new toots, replies, etc.
The headings in mastodon.el state it's licensed under the GPLv3 but this repository doesn't have a copy of it
Right now, I'm developing/testing against the flagship API. It would probably be better to use a locally running Mastodon instance. Add a docker-compose file that spins up an instance. Integrates with the dev environment from #2 too?
If I Favourite/Boost the third toot on a timeline, my cursor will be moved to the second toot on the timeline. It should stay on the third.
Buffers for toot-mode
should count down characters from 500 as they are entered.
It would be nice if the countdown lived alongside the documentation from #14.
You can't favourite an already favourited toot. You get a 422
response. We should handle this gracefully instead of popping the failed response buffer. Options:
Already favourited #12345
Fix should be applied to the boost function too.
Right now, the success callback on a new toot opens the response buffer from url-retrieve
. It should just message a success, perhaps with the toot id
.
With discover
, we auto-detect it in the user's Emacs environment and use it if it's there. This keeps the user from having to write their own hook. I'd like to do the same with emojify
now that the UTF-8 encoding issue is fixed.
Add a notifications timeline and bind it to N
.
They just display as links right now.
The asynch default of url-retrieve
makes things too complicated, especially the HTTP actions taken in mastodon-auth
. Look at mastodon-http--get
for an example of how much url-retreive-synchronously
makes life easier.
Hello,
I have configured mastodon.el as follows:
(add-to-list 'load-path "~/.emacs.d/elisp/mastodon/lisp")
(require 'mastodon)
(setq mastodon-instance-url "https://mastodon.zaclys.com")
When I then try to M-x mastodon
, I am asked for my e-mail and password and then get the following error:
Contacting host: mastodon.zaclys.com:443
error in process filter: url-http-parse-headers: Wrong type argument: char-or-string-p, nil
error in process filter: Wrong type argument: char-or-string-p, nil
json-read: JSON readtable error
My Emacs version is GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of 2015-03-07 on trouble, modified by Debian
.
Thank you for making this Mastodon Emacs client, I hope that I will soon be able to test it!
For instance, is there a plan to add the ability to display toots, not just create them?
How to reproduce:
Expected:
(F)
marker on a tootActual:
Replaced 0 occurrences
messageAfter this when favourite the toot from the emacs buffer I get:
Favourited #3825346
and I get the new buffer with
HTTP/1.1 422 Unprocessable Entity
Date: Sat, 22 Apr 2017 20:53:01 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: Mastodon
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 2017-04-22T20:55:00.151905Z
Vary: Accept-Encoding, Origin
Content-Encoding: gzip
Cache-Control: no-cache
X-Request-Id: bee31336-e2c2-4208-aa47-c22c131d7044
X-Runtime: 0.059796
{"error":"Validation failed: Status has already been taken"}
(not a good "success" callback by the way)
I need a clean working Emacs state. Since I use Spacemacs, I risk some contamination from other packages. A Docker image with a clean Emacs is probably the easiest solution.
When I use the mastodon-tl--goto-next-toot
function from the last toot in my buffer, it should request toots older than toot at point
and append the response data to the buffer.
You'll get the successful feedback:
Favourited #12345
And then a buffer:
HTTP/1.1 422 Unprocessable Entity
Date: Sat, 22 Apr 2017 20:53:01 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: Mastodon
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 2017-04-22T20:55:00.151905Z
Vary: Accept-Encoding, Origin
Content-Encoding: gzip
Cache-Control: no-cache
X-Request-Id: bee31336-e2c2-4208-aa47-c22c131d7044
X-Runtime: 0.059796
{"error":"Validation failed: Status has already been taken"}
This was useful before the major mode existed. Now, it is out of date and will throw an error when used.
New lines are not properly respected.
We should be able to do the following from a mastodon-toot
mode buffer:
What kind of self-respecting Emacs user...
This is more an epic level issue that should be broken down. The major mode should provide:
This would allow to get a permanent authorization, avoiding to type the password each time you run Emacs. The Twitter twittering-mode does it.
mastodon--register-client-app
should be mastodon-auth--register-client-app
for example.
When a user has 2 Factor Auth enabled, mastodon.el is unable to authenticate and will prompt for the username and password until the user either (a) disables their 2 Factor Auth, or (b) exits emacs.
Mastodon.el should do one of the following if 2FA is turned on:
Continuous integration is good too. Once I've got some tests to run ( #5 ), I should setup CI with Travis.
Basically, just turn on flycheck.
Timeline mentions are displayed as full URLs:
@johnson
--> https://mastodon.social/@johnson
It should be @johnson
.
When requesting more toots mastodon-tl--more
results in the point being set to the end of the buffer rather than at the first new toot.
It would be nice.
I want to be able to visit a user profile like a timeline in the major mode.
For debugging purposes, open the HTTP response buffer on API calls if mastodon-debug
is non-nil.
Many of my keybindings are Vim inspired. This proposes a problem for evil
users in normal mode. Look into what it would take to support evil
users out of the box.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.