aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* flycheck, autoloads, docstringsmousebot2021-10-221-2/+6
|
* bookmark/unbookmark toot funsmousebot2021-10-221-0/+24
|
* use http--api in max-toot-chars funmousebot2021-10-221-3/+2
|
* collect max toot chars from server and display in new toot buffermousebot2021-10-221-2/+17
|
* redrafts adopt reply to id from deleted tootmousebot2021-10-211-2/+5
|
* fix cw test for replies and for redrafts: "" not nil.mousebot2021-10-211-2/+2
|
* print toot keybinding docs in two columnsmousebot2021-10-211-5/+37
|
* move attachments lower in toot-docsmousebot2021-10-211-4/+5
|
* revert to forward-whitespace -1 test for companymousebot2021-10-211-3/+7
| | | | | | | - this is an attempt to only engage company completion when our "word" at point is prefixed with a "@" - for some reason i dont understand, using company-grab-symbol-cons "^@ ..." doesn't work here: typing words with no @ still triggers company
* redraft toots adopt visibility and CW of deleted tootmousebot2021-10-211-6/+14
|
* when toot replied to has a CW, adopt it as default for replying tootmousebot2021-10-211-3/+11
|
* replies to toots adopt their visibility status by default.mousebot2021-10-211-7/+11
| | | | | | | | | this makes it so that if you reply to a direct message, your toot will also be direct by default. - we feed the reply's full toot JSON through the chain of functions called, all the way down to "setup-as-reply". that way, if anything else needs to be extracted when setting up a reply, it's all there.
* improvements to toot mentions completionmousebot2021-10-211-12/+11
| | | | | | | | | - customize option for completion off, following-only, or all. - 'following=true' is forwarded to http--get-search accordingly. - use company-grab-symbol-cons + regex, prepend "@" to it - also prepend '@' to the list in get-user-info-no-url - this makes company display user handles prepended with '@', and to match and - enter a handle without duplicating the '@'
* fix default-toot-visibility customizemousebot2021-10-211-5/+5
|
* make add mentions-company-backend to company-backens buffer localmousebot2021-10-211-1/+2
| | | | | - we add to company-backends rather than replacing it, but it is still only buffer local.
* Merge branch 'develop' into ments-completionmousebot2021-10-201-48/+111
|\
| * docstringsmousebot2021-10-151-2/+2
| |