DEV Community

Erick ๐Ÿ™ƒ Navarro
Erick ๐Ÿ™ƒ Navarro

Posted on • Originally published at erick.navarro.io on

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"))
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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)
Enter fullscreen mode Exit fullscreen mode

If it returns t you're ready to go.

Usage

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

pick meme

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

add text

Enjoy! ๐ŸŽ‰

Top comments (0)