From 21c6572d62d9129b48003129e60c97d0f64868d0 Mon Sep 17 00:00:00 2001 From: mousebot Date: Thu, 23 Sep 2021 11:42:14 +0200 Subject: hacks to minimize toot bug: copy text, only kill buffer after post --- lisp/mastodon-toot.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index d86eefd..1c8a475 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -301,10 +301,12 @@ If media items have been uploaded with `mastodon-toot--add-media-attachment', at (message "Looks like your uploads are not yet ready...") (if empty-toot-p (message "Empty toot. Cowardly refusing to post this.") - (mastodon-toot--kill) - (let ((response (mastodon-http--post endpoint args nil))) + (let ((response (mastodon-http--post endpoint args nil))) (mastodon-http--triage response - (lambda () (message "Toot toot!")))))))) + (lambda () + (kill-new toot) ; copy toot text to kill ring + (mastodon-toot--kill) ; only kill buffer after sending + (message "Toot toot!")))))))) (defun mastodon-toot--process-local (acct) "Adds domain to local ACCT and replaces the curent user name with \"\". -- cgit v1.2.3