I recently decided rewrite my emacs configuration. I want to load my custom org configuration only in the case when I am opening a *.org file. Considering a minimalistic configuration of init.el
(use-package orgmode-setup :load-path "custom/" :mode "\\.org\\'" )
that loads a orgmode-setup.el in .emacs.d/custom that looks like this
however I get the error
File mode specification error: (error Autoloading failed to define function orgmode-setup)
However, before I am doing the same thing with Ido
(use-package ido-setup :load-path "custom/" )
with ido-setup.el saved in the .emacs.d/custom folder.
I am not proficient with emacs, could you please help me to debug this?