I wanted to mark certain filenames as images and added this to my config.el:

(add-to-list 'image-file-name-regexps "/preview/")

But when I run org-toggle-inline-images now, I get the following error.

image-file-name-regexp: Wrong type argument: characterp, "/preview/"

Even though it says:

image-file-name-regexps is a variable defined in image-file.el.gz.


List of regexps matching image-file filenames.

And the variable is clearly a list.

  • 2
    This is a bug in Emacs. Please report it using M-x report-emacs-bug
    – rpluim
    Aug 2 at 12:50


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.