Meme generator in emacs

#TIL it is possible to create memes in emacs using meme, this package allow to choose an image and add some text to it, we can also select any image and use it.

Installation

This package, at the time of writing this, is not available on melpa so we have to install it manually or using straight.el or quelpa, because I'm using straight.el for my config we'll use that.

(use-package imgur
  :ensure t
  :straight (imgur
	     :type git
	     :host github
	     :repo "myuhe/imgur.el"))

(use-package meme
  :ensure t
  :straight (meme
	     :type git
	     :host github
	     :repo "larsmagne/meme"))

meme require imgur as a dependency so we need to install it before.

straight.el compiles all the installed packages and load them from a different folder so we won't have the base images in the correct folder, we can copy them with:

cp -r ~/.emacs.d/straight/repos/meme/images ~/.emacs.d/straight/build/meme

The meme generator is based on the SVG support that emacs provides, you can check is your emacs installation has it with:

(image-type-available-p 'svg)

If it returns t you're ready to go.

Usage

Now we can run M-x meme and we can choose a base image:

/images/til/meme-generator-in-emacs/pick-meme.png

And then we can and add some text to it, like the image below:

/images/til/meme-generator-in-emacs/edit-text.png

Enjoy! 🎉