aboutsummaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
...
| * cherry pick ieure's cosmetic changesmousebot2021-05-072-6/+6
| |
| * docstringmousebot2021-05-061-1/+1
| |
| * delete toot keybindingmousebot2021-05-061-0/+2
| |
| * add delete toot functionmousebot2021-05-062-0/+22
| |
* | apply pleroma patch from #208mousebot2021-12-231-0/+2
| |
* | Merge pull request #230 from ieure/ieure/http-timeoutsmooseyboots2021-12-211-2/+9
|\ \ | | | | | | Set a HTTP timeout.
| * | Guard against the old version of Emacs which mastodon.el supports.Ian Eure2020-05-031-3/+7
| | |
| * | Set a HTTP timeout.Ian Eure2020-05-031-2/+5
| |/ | | | | | | This prevents mastodon.el from locking Emacs and spinning forever.
* | Merge pull request #231 from ieure/handle-auth-errorsmooseyboots2021-12-212-7/+63
|\ \ | | | | | | Rewrite `mastodon-auth--access-token` so it handles errors.
| * | Rewrite `mastodon-auth--access-token` so it handles errors.Ian Eure2020-05-032-7/+63
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, `mastodon-auth--access-token` unconditionally returns the value of the `:access_token` key from the response of `(mastodon-auth--get-token)`. This causes problems when there was an error getting the token, for example, if you enter the wrong password. If a token couldn’t be retrieved, the JSON looks like: (:error "invalid_grant" :error_description "The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.") Since there is no `:access_token` key, `mastodon-auth--access-token` returns `nil`, which results in a broken header in the next request: Authorization: Bearer Which causes the whole thing to freeze Emacs until you mash `C-g`. This commit rewrites the function to handle that case; to explicitly signal an error for *any* response that isn’t expected; to use `if-let`, which allows the temporary `token` variable to be eliminated; uses `pcase` to determine what kind of response was received; and adds ERT tests for all these cases.
* / Fix: make after-change-functions buffer local.mousebot2021-10-041-0/+1
|/ | | | See issue #218 — we mistakenly modified the global value and `mastodon-toot--update-status-fields` makes no sense outside the toot compose buffer.
* Update copyright and bump versionJohnson Denen2019-03-0411-19/+19
|
* Update discover function with new keybindingsJohnson Denen2019-03-041-7/+7
|
* Close #199 with keybinding refactorJohnson Denen2019-03-041-16/+18
|
* Refactor mastodon-discover functionalityJohnson Denen2019-03-042-31/+32
|
* Fix #219 no `with-eval-after-load` in the code (#220)H Durer2019-03-042-31/+69
| | | | The package-lint logic is too daft to cope with this (you cannot even mention it in a comment). We now move the discover functionality into its own package and just mention in the README file how to make use of it.
* Explitly require json.el in files where we dynamically bind its vars.Holger Dürer2019-03-042-0/+3
| | | | | | As pointed out in issue #211 the compiler actually warned the user about `json-array-type` etc. being unused lexical vars. Let's hope that this fixes the errors reported with reading json.
* Add ability to change the visibilityJeremy Dormitzer2019-03-041-3/+14
|
* Improvements on posting toots.Holger Durer2019-03-041-33/+141
| | | | | | | | | | | | | - Visual feedback in the buffer of: - Number of characters - Content warning flag - Posting visibility - Can't post an empty toot. - Changing visibility to something other than "public". Still missing: - Attaching media - Enabling the NSWF-flag toggling.
* Use the email address of the current user as default (#203)Jürgen Hötzel2019-03-041-1/+1
| | | | * Use the email address of the current user as default
* Bump to version 0.8.0Johnson Denen2018-08-108-8/+8
|
* Fix boosting and faving in the notifications buffer.Holger Dürer2018-08-102-6/+12
| | | | Now that we calculate the base toot id, we can ensure that it is unset in notifications that do not represent a toot.
* Fix the boosting/favouriting of statuses in profiles.Holger Durer2018-08-103-5/+9
| | | | | | | (Favouriting itself is still hard since we have clobbered the 'f' keybinding, but if you bind it to something else or invoke it via `M-x mastodon-toot--toggle-favourite` then at least it works.) This also changes the regular boosting/favoriting behavior. Before we would boost/fav a boost or fav instead of the actual toot that was boosted/faved. With this change we always boost/fav the base toot. To do this we now keep a second toot id (with the base toot) in the byline's properities. (For regular statuses 'toot-id and 'base-toot-id will be identical.)
* Rebind and document some keybindingsJohnson Denen2018-08-101-3/+7
|
* Clean up whitespaceJohnson Denen2018-08-102-3/+3
|
* Fixes to boosting/favoriting. (#194)H Durer2018-08-102-33/+59
| | | | I had issues that occasionally I couldn't unfavorite / unboost a toot. Once that was fixed it annoyed me that the cursor would often jump on those actions (jumping to the byline with no need).
* Tiny fixes to `mastodon-inspect--dump-json-in-buffer` (#195)H Durer2018-08-101-4/+5
| | | | - Erase buffer before adding new contents - Don't globally set `print-level` and `print-length`; just temporarily let them to the locally desired values.
* More profile work (#193)H Durer2018-08-103-71/+164
| | | | | | | | | | | | * Add an alternative approach to user profile opening. This way asks the user in the minibuffer for the handle and offering completion for all user handles in the current status but allowing the user to also enter any other handle to browse whichever account they wish. This also cleans up some compiler warnings about profile code. * Create a new minor mode for mastodon profile pages. There we override the 'f' and 'F' keys to show following and followers respectively. Those pages now look very similar to the regular profile page (with a header).
* Remove compiler warnings in mastodon-notifications.el (#190)H Durer2018-08-101-0/+12
|
* Give mastodon-media--inline-images a saner interface. (#191)H Durer2018-08-105-39/+44
| | | | | | | | Instead of making it search the whole buffer every time to find images to load, give it a range where this work should be done. We then call this immediately after inserting a single status, notification, ... There should be no big noticible difference - images might load a tiny bit sooner although I doubt you can see that. This should be more efficient on large buffers although Alex didn't notice any problems when testing streamed buffers. We should still do it as it make things easier to understand. I was always worried about these global operations.
* Adjusted mastodon-tl.el to open user profiles in emacs. (#189)Alexander Griffith2018-08-103-21/+73
| | | | | | * Adjusted mastodon-tl.el to open user profiles in emacs. This also fixes an issue in user profiles where new statuses were insert at the above rather than below the user profile header.
* Add user profiles closes #165 (#186)Alexander Griffith2018-08-103-7/+172
| | | | | | | | * Add user profiles - added keybinding U for opening user profiles - (also added vimish keybindings 'h' and 'l' as aliased for tab and stab in mastodon-mode to compliment jk nav) - autoloads 'mastodon-profile--get-next-author
* Make users handles tabstops (#188) Closes #166H Durer2018-08-101-8/+36
| | | | | | * User ids in the body are tab stops. * Make user handles in byline also links to profile.
* added mastodon-notifications--get to mastodon.el load in. (#185)Alexander Griffith2018-08-101-0/+1
|
* Toggle read-only when inserting thread contents. (#184)Alexander Griffith2018-08-101-4/+5
|
* Some small tweaks to our keymap handling. (#183)H Durer2018-08-102-28/+30
| | | | | - Use special mode which sets up a sensible base keymap. - Define the keymap just once so that users can tweak it as they wish without us messing with that on each invocation of mastodon-mode.
* Optionally use auth-source-search for fetching and saving password. (#181)H Durer2018-08-101-0/+47
| | | | | | | | | * Use auth-source-search for fetching and saving password This gives users the ability to save their password to either the gpg-encrypted ~/.authinfo.gpg or ~/.authinfo so that they don't have to provide username/password each time * Add a new custom var to decide whether to use the auth-source package or not.
* Adds the notification timeline to mastodon.el closing #34. (#178)Alexander Griffith2018-08-103-4/+141
| | | | | | | - Can now handle notifications (follow reblog favourite and mention) - Tests for each of the rendering functions are included - Added keybinding N to mastodon.el for mastodon-notifications-get - added mastodon-notifications to ert-helper.el
* Fixed jk nav issue and replaced tabs with spaces in mastodon-tl.elAlexander Griffith2018-08-101-24/+25
|
* Support toggling content warning anywhere in the toot. (#180)H Durer2018-08-102-7/+29
| | | | | This new functionality is bound to the 'c' key. To help with this functionality this also changes the 'toot-json and 'toot-id properties. These are now applied to the whole toot not just the toot's byline.
* Clean up code to remove compilation warnings.Holger Durer2018-08-104-3/+11
| | | | | We used to be clean but have slipped recently. Let's clean up the code so it's easier to see real code smell warnings in the compilation.
* Generalizations for notifications (#174)Alexander Griffith2018-08-101-20/+36
| | | | | | | | * Added generalizations needed for adding notifications #37 - Made generalizations to toot and bylines to enable notifications. - Fixed tl tests to account for the new function arguments. - fixed whitespace
* Fix missing thread notifications (#176)Alexander Griffith2018-08-101-12/+18
| | | | | | * Print "No Thread\!" if there are no descendants or ancestors. * Fixed errors for Reblog, follow and favourited notifications.
* Recognise hashtag links and make them link to our own tag browsing ↵Holger Durer2018-08-101-20/+72
| | | | functionality instead.
* Retoot add accts closes #155Alexander Griffith2018-03-054-6/+51
| | | | | | | | | | | | | When responding to toots the full acct for both local and federated accounts are now added to the new toot buffer. Changes - Added a function in mastodon.el to return the current user acct - Added mastodon-toot--process-local, which takes an acct and appends the current server if it is local returns an empty string if the acct matches the current user and does only adds a prefix @ if the acct is federated - mastodon-toot--mentions will return a formatted string of mentions or an empty string - adds tests for mastodon-toot--mentions - adds a missing , in mastodon-http--post - `mastodon-toot--reply` now passes `mastodon-toot` a toot-id rather than the whole json - 'mastodon-toot--reply-to-id is now a local var in a new toot
* Bump to 0.7.2 and shorten long code lines (#172)Alexander Griffith2018-03-058-50/+78
| | | | | | * Bump version numbers to 0.7.2 * Adjusted functions to bring line length below 90.
* Make "Content warning" a tab stop and toggle to show/hide the main contents. ↵H Durer2018-03-051-27/+115
| | | | | | | | | | | | | (#170) * Allow user to navigate interesting things in a buffer via tabbing (tab to go forward, M-tab and S-Tab to go back). This has always been possible while on a hyperlink but now works everywhere. Currently only hyperlinks are tab stops but in the future we will want to support other things and there are already TODO comments in the code to note where we may want to do this. * Add a new tab stop and link type: spoiler toggling. This initially hides the spoiler in a toot and makes the "Content warning" a link and tab stop. The action taken is to toggle the visibility of the toot.
* Add a new customization flag to switch between using fixed width or ↵Holger Dürer2018-03-051-1/+8
| | | | | | proportional fonts. The default stays as is now to use fixed width fonts.
* Allow user to navigate interesting things in a buffer via tabbing (tab to go ↵Holger Dürer2018-03-052-62/+170
| | | | | | | forward, M-tab and S-Tab to go back). This has always been possible while on a hyperlink but now works everywhere. Currently only hyperlinks are tab stops but in the future we will want to support other things and there are already TODO comments in the code to note where we may want to do this.
* Explicity set output variables to "unlimited" when saving plstore.Holger Durer2018-03-021-1/+6
| | | | | | | Alex Griffith reported ellipses in the output which seems to indicate the printing was somehow truncated. I cannot see anywhere in the code path for plstore-save that these variables be set explictly. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Output-Variables.html for an explanation of these variables.