From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: use-package and "Error Autoloading file" Date: Wed, 17 Oct 2018 13:43:03 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006468560578703142" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCpq7-0007OB-P6 for emacs-orgmode@gnu.org; Wed, 17 Oct 2018 13:42:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCpq6-0007Ux-IR for emacs-orgmode@gnu.org; Wed, 17 Oct 2018 13:42:35 -0400 Received: from mail-it1-x12f.google.com ([2607:f8b0:4864:20::12f]:34860) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCpq4-0007HM-SR for emacs-orgmode@gnu.org; Wed, 17 Oct 2018 13:42:33 -0400 Received: by mail-it1-x12f.google.com with SMTP id p64-v6so3579959itp.0 for ; Wed, 17 Oct 2018 10:42:24 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --0000000000006468560578703142 Content-Type: text/plain; charset="UTF-8" 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 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! > --0000000000006468560578703142 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
oh jeez, this was a trivial fix:

= =C2=A0=C2=A0=C2=A0 :mode "\\.org" . ;; --->
=C2=A0=C2=A0=C2= =A0 :mode ("\\.org" . org-mode)

Sorry for the noise, hope that maybe someone benefits from my stupi= dity!

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

I'm trying to switch my conf= ig 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).
<= /div>

Like many people, I have lots of versions of org-m= ode 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 packag= es, and finally an up-to-date git master, which is the version of org I pre= fer to use.=C2=A0 When I posted my bug report, I thought that the issue mig= ht result form using the git repo, but it seems to persist even when I remo= ve the repo paths from load-path and take out the custom :load-path command= form my use-package for org. =C2=A0

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

File mode specification er= ror: (error Autoloading file ... failed to define function org)
<= br>
It also happens whenever I try to use the agenda, which seems= completely broken now.=C2=A0 That's the main reason I hope to track do= wn this bug :-(

This happens regardless of wh= ether 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.=C2=A0 = I'm wondering if anyone on the list has had and hopefully solved this p= roblem!

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

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

Th= ank you as always!
--0000000000006468560578703142--