emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: use-package and "Error Autoloading file"
Date: Wed, 17 Oct 2018 11:53:36 -0400	[thread overview]
Message-ID: <CAN_Dec_KekQhZE9M5FsuXZWe4qKqaxKWFY7mYe5oxnG9phQ-9Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2206 bytes --]

Hello everyone,

I'm trying to switch my config over to use-package and running into an
issue with org. Most of my init file seems to be org-related (!), so I
won't post the whole thing, but will try to summarize. I've also posted a
bug report to the use-package repo (
https://github.com/jwiegley/use-package/issues/730).

Like many people, I have lots of versions of org-mode installed on my
machine: the old org that comes with emacs 27.0.50, the version from the
org ELPA repo, which is a dependency of many other packages, and finally an
up-to-date git master, which is the version of org I prefer to use.  When I
posted my bug report, I thought that the issue might result form using the
git repo, but it seems to persist even when I remove the repo paths from
load-path and take out the custom :load-path command form my use-package
for org.

On initial invocation of use-package and also on load of every subsequent
org-mode file, I get this error:

File mode specification error: (error Autoloading file ... failed to define
function org)

It also happens whenever I try to use the agenda, which seems completely
broken now.  That's the main reason I hope to track down this bug :-(

This happens regardless of whether I use the ELPA org-plus-contrib or set
:load-path to the location of the lisp and contrb/lisp folders in the git
repo and :pin to manual.  I'm wondering if anyone on the list has had and
hopefully solved this problem!

Here's the beginning of my current use-package invocation:

  (use-package org
    :ensure org-plus-contrib
    :functions org
    :init
    (setq org-export-backends '(ascii beamer html hugo icalendar md gfm
reveal latex odt org))
    :hook
    ((org-mode . (lambda () (flyspell-mode 1)))
     (org-mode . turn-off-auto-fill))
    :mode "\\.org"
    :bind
    (("C-c l" . 'org-store-link)
     ("C-c a" . 'org-agenda))
    :commands (org-mode org-capture org-agenda )
    :config
  ;; Targets include this file and any file contributing to the agenda - up
to 5 levels deep
  (setq org-refile-targets (quote ((org-agenda-files :maxlevel . 5) (nil
:maxlevel . 5)
;; ....
;; ... set lots of variable values & do some other stuff
;; ....
)

Thank you as always!

[-- Attachment #2: Type: text/html, Size: 2822 bytes --]

             reply	other threads:[~2018-10-17 15:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 15:53 Matt Price [this message]
2018-10-17 17:43 ` use-package and "Error Autoloading file" Matt Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN_Dec_KekQhZE9M5FsuXZWe4qKqaxKWFY7mYe5oxnG9phQ-9Q@mail.gmail.com \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).