aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
Commit message (Collapse)AuthorAgeFilesLines
* add copy-toot-text functionmousebot2022-02-281-0/+7
|
* Merge branch 'develop' into mpv-play-at-pointmousebot2022-02-111-6/+0
|\
| * revert to requiring mastodon tootmousebot2022-02-111-6/+0
| | | | | | | | | | | | | | | | we always need all the funs for operating on individual toots so this is best. Revert "revert require of mastodon-toot to autoloads" This reverts commit 6a164669e0bffed67ad59c206f13651a67456127.
* | put point after a boost/fave marker on successmousebot2022-02-111-1/+4
|/ | | | | | this will leave point on the author-byline, which is where we want it to be, as the marker is not strictly part of the byline, and we are adding info/actions to the author-byline.
* revert require of mastodon-toot to autoloadsmousebot2022-02-051-0/+6
| | | | | - use (autoload) call in mastodon.el for functions - use autoload cookie in mastodon-tool.el for customize options.
* update homepage and copyright boilerplatemousebot2022-02-051-1/+2
|
* keep mastodon-toot--max-toot-chars a number not a string.mousebot2022-01-121-4/+3
| | | | | we use it as a number various times so let's leave it a number, then convert to string for display in toot info.
* FIX fetching max toot length from servermousebot2022-01-111-4/+12
| | | | | | | | some servers have 'max_toot_chars, but others seem to have 'max_characters, under statuses, under configuation. we allow for both types, but also we check our var isn't nil before trying to check it's length, which broke toot--send in some cases.
* reload on pin togglemousebot2021-12-251-2/+6
|
* text-mode for toot compose buffermousebot2021-12-241-1/+1
| | | | and remove duplicate mastodon-toot-mode call.
* docstring and move pin toot togglemousebot2021-12-201-21/+18
|
* refactoring delete/redraft functionsmousebot2021-12-201-37/+43
|
* autoload typomousebot2021-12-171-1/+1
|
* y-or-n-p before cancelling a toot.mousebot2021-12-171-1/+7
|
* bump version to a round numbermousebot2021-12-171-1/+1
|
* boilerplate maintainer contactmousebot2021-12-171-0/+1
|
* depend on emacs 27.1, flychecks, docstrings, etc.mousebot2021-12-171-3/+7
| | | | strictly, the 27.1 dependency is only for proper-list-p in -http.el.
* bump version, change homepage link, readmemousebot2021-12-171-2/+2
|
* ensure media-attachment is not a dirmousebot2021-12-171-9/+11
|
* Merge branch 'immed-async-media-upload' into developmousebot2021-12-171-15/+18
|\
| * fix media attachments test before postingmousebot2021-12-171-15/+18
| | | | | | | | | | | | if --media-attachments is non-nil, make sure we have non-nil media-args, and that we have same num of -ids to attach as attachments uploaded.
* | Merge branch 'immed-async-media-upload' into developmousebot2021-12-161-26/+28
|\|
| * attach media test before postmousebot2021-12-151-3/+6
| | | | | | | | just test that length of --media-attachments == length of --media-attachment-ids.
| * a first hack to make media uploads immediate and async.mousebot2021-12-151-23/+22
| | | | | | | | | | | | | | | | | | this commit moves the call to -upload-attached-media into -attach-media. upload-attached-media now uploads a single item only, whichever file has just been selected at the prompt. but we still use the list of attached-media to handle preview displays.
* | customize option to enable custom emoji by default.mousebot2021-12-151-0/+5
|/
* rename company mentions to 'mastodon-toot-mentions'mousebot2021-12-121-5/+6
| | | | and fix matching for both user handle and user display name.
* autocompletion ignores case of handles/display namesmousebot2021-11-091-2/+2
|
* Do a bit if `if` and `progn` sanitizing.Holger Dürer2021-11-061-15/+14
| | | | | | | - A `progn` with a single form is redundant - `when` doesn't need a `progn` body - `if` has an implicit `progn` for the consequences - I converted one cascade of `if`s into a `cond`.
* Use portable filename component functions.Holger Dürer2021-11-061-12/+14
| | | | | | | | | | | | | | Apparently one should not rely on "/" being the directory separator and use the funtions from https://www.gnu.org/software/emacs/manual/html_node/elisp/File-Name-Components.html#File-Name-Components instead. The new version seems strictly better in that it won't create paths with double slashes when `emojify-emojis-dir` already ends in a slash. This also refines the test for `emojify-emojis-dir` to actually check it is an existing directoy and not just an existing file, dir, or symlink.
* Convert most uses of `(cdr (assoc <some-symbol> <a-list>))` to `(alist-get ↵Holger Dürer2021-11-061-32/+32
| | | | | | | <some-symbol> <a-list>)` This is more readable and actually more efficient (maybe) since it uses `eq` rather than `equal` as a test.
* Reformat all code.Holger Dürer2021-11-061-53/+53
| | | | | | | | | | | Basically, in Emacs for each file: select all text and `indent-region`. - This also removes one redundant comment, and - fixes an error with json decoding where the `json-read-from-string` was actually not within the intended `unless` clause (which explains the warning about "result of (string-equal "" json-string) will be ignored" which I never understood.
* Use `defvar-local` to create buffer-local vars.Holger Dürer2021-11-061-16/+8
| | | | | This is much cleaner than first using `defvar` immediately followed by `make-variable-buffer-local`.
* tiny cleanupmousebot2021-11-061-1/+1
|
* support downloading/using custom emoji with emojify.mousebot2021-11-051-1/+72
| | | | | | | | | - adds functions to download custom emoji from mastodon-instance-url, collect them into a list formatted as needed by emojify-user-emojis, and to update that var with the mastodon custom emoji so that they can be used with emojify-insert-emoji. - for now the user has to enable these by calling -enable-custom-emoji themselves.
* defvar company-backends for flycheckmousebot2021-11-051-1/+2
|
* Fix compilation warnings.Holger Dürer2021-11-011-18/+23
| | | | | | | | | | | | This is mostly reflowing / reworkding docstrings to keep within 80 characters limit and adding autoloads. There are two warning remaining that I don't understand: - mastodon-async.el:359:16: Warning: reference to free variable ‘url-http-end-of-headers’ - mastodon-http.el:139:8: Warning: value returned from (string-equal json-string "") is unused When adding autoloads this sorts them for better readability.
* include user's profile URL in company mentions completion.mousebot2021-11-011-13/+15
| | | | | also rename company mentions completion default value to "following" not "followers", which is what the actual search is called and what it returns.
* fix toot--send setting args/args-mediamousebot2021-10-291-17/+14
|
* make get-max-toot-chars asyncmousebot2021-10-291-6/+11
|
* docstringsmousebot2021-10-291-1/+1
|
* merge upload-media-attachments functionality into toot-send.mousebot2021-10-291-38/+32
| | | | | | | | | | | | | | | | | | | | this obviates the need for the user to upload files before posting their toot. - this commit makes http--post-media-attachment synchronous, so that toot-send has to wait for it. - in toot-send: if mastodon-toot--media-attachements is non-nil, the files it contains are uploaded synchronously, and their returned ids are added to toot-media-attachment-ids, which are parsed as args for the POST request to be attached to the toot. - then we send toot as usual. - clear-all-attachments also clears mastodon-toot--media-attachment-ids just in case. - we have no more need of media-attachments-filenames, as media-attachments is now a list and not a boolean value.
* fix for image uploads error in 'emacs -Q': expand file name!mousebot2021-10-291-1/+2
|
* fix group of mastodon-toot--attachment-heightmousebot2021-10-281-1/+1
|
* api/v2 for media attachment uploadsmousebot2021-10-261-1/+1
|
* toot--enable-completion-for-mentions only if company noerrormousebot2021-10-261-4/+5
| | | | - from testing with 'emacs -Q'
* _args for update-status-fieldsmousebot2021-10-251-1/+1
|
* declare company-mode functionsmousebot2021-10-251-1/+5
|
* rewrite bookmark-toot as togglemousebot2021-10-231-20/+17
|
* move defcustom attachment-height from media to tootmousebot2021-10-221-4/+7
| | | | | | | | - this makes the autoload fun mastodon-toot have access to the variable, so that it can be successfully called without mastodon-mode having been enabled previously. - maybe there is another work around for making variables available to autoloaded functions, but i failed to find it!
* don't allow posts longer than server's max_toot_chars lengthmousebot2021-10-221-7/+9
|