Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org from git: Error Autoloading file... failed to define function org #730

Closed
titaniumbones opened this issue Oct 16, 2018 · 1 comment
Closed

Comments

@titaniumbones
Copy link

Hi, I'm trying to switch my config over to use-package and am having trouble with org. I am running a pretty recent emacs git (27.0.50 from sept 3) and an up-to-date org-mode from git master (release_9.1.14-987-g823d90 @ /home/matt/src/org-mode/lisp/).

As I guess everyone knows, it is not easy to inform ELPA that I have a local copy of org, and as i use a number of ELPA packages that depend on org, I have the org package installed as well.

org-mode itself seems to load just fine and org-version shows that org is being loaded from my src directory. Howver, every time an org-mode file is loaded, and also every time I invoke the agenda, the mode is not activated and I get the following error:
File mode specification error: (error Autoloading file /home/matt/src/org-mode/lisp/org.elc failed to define function org)

My (use-package) for org is quite long but I will reproduce what I hope are hte relevant parts:

  (use-package org
    :ensure t
    :pin manual
    :load-path (org-lisp org-contrib)
    :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) ("/home/matt/org/.org2blog.el" :maxlevel . 1) ("/home/matt/Dropbox/Work/History/HackingHistory/Grades.org" :maxlevel . 5))))

It goes on a ways from there. the paths org-lisp and org-contrib are defined somewhat earlier in the config file.

The Autoloading errors are also always preceded by these messages:

ad-handle-definition: ‘org-open-at-point’ got redefined
Created magit link.
Created zotero link.

org-zotxt and magit create new org link types. org-zotxt is loaded by use-package with :after org, though magit doesn't have an :after command. if you have thoughts I would be very grateful!

@titaniumbones
Copy link
Author

oh jeez, this was a trivial fix:

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

sorry for the noise, but leaving the solution here in case anyone else is as dumb as me. If it's any ocnsolation, I definitely suffered more for this idiocy than anyone else!

arichiardi added a commit to arichiardi/emacs.d that referenced this issue Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant