emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* use-package and "Error Autoloading file"
@ 2018-10-17 15:53 Matt Price
  2018-10-17 17:43 ` Matt Price
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Price @ 2018-10-17 15:53 UTC (permalink / raw)
  To: Org Mode

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: use-package and "Error Autoloading file"
  2018-10-17 15:53 use-package and "Error Autoloading file" Matt Price
@ 2018-10-17 17:43 ` Matt Price
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Price @ 2018-10-17 17:43 UTC (permalink / raw)
  To: Org Mode

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

oh jeez, this was a trivial fix:

    :mode "\\.org" . ;; --->
    :mode ("\\.org" . org-mode)

Sorry for the noise, hope that maybe someone benefits from my stupidity!

On Wed, Oct 17, 2018 at 11:53 AM Matt Price <moptop99@gmail.com> wrote:

> 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: 3423 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-17 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17 15:53 use-package and "Error Autoloading file" Matt Price
2018-10-17 17:43 ` Matt Price

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).