Mastodon and Emacs - The Restart

2024-07-05 Personal Emacs Nerdy TEDN Tips & Tricks

Ok … I admit it! I am using emacs! A lot!

I am also using emacs to do my tooting.

Means I am using mastodon.el.

The other day I had to reset/reinstall my emacs configuration and had to re-authenticate my mastodon server.

That proofed to be more challenging than I thought, because there is a screen missing. Let me explain … or even better: Let me walk you through how you can reset the authentication, if/when you have to …

  1. Delete the mastodon-client--token-file (default: ~/.emacs.d/mastodon.plstore)
  2. Go to your/the mastodon instance/account that you have configured with (setq mastodon-instance-url "https://social.instance.org" mastodon-active-user "example_user"). And revoke any old/existing mastodon.el applications from Account -> Authorized Apps
  3. Restart emacs and start mastodon with alt-x mastodon
  4. You should be asked for the email and password (once) to finish the setup/authentication
  5. If things do not go quite right you will be asked/prompted for the/an Authorization Code
  6. In the best case a screen will/should be displayed that explains how you can get the authorization code
  7. In the worst case you will just be prompted
  8. What is not obvious is that a url was put into your cut-and-paste buffer. You need to paste this url into the browser of your choice and finish the authentication to get the authorization code

You can then paste the authorization code into the emacs mini-buffer prompt and you are done!