emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] void function definition of org-dynamic-block-define


From: stardiviner
Subject: [O] void function definition of org-dynamic-block-define
Date: Thu, 28 Feb 2019 10:12:53 +0800
User-agent: mu4e 1.1.0; emacs 27.0.50

Yesterday, I restarted my Emacs, then I found emacs raise following error:

* Stacktrace

#+begin_example
Debugger entered--Lisp error: (void-function org-dynamic-block-define)
  (org-dynamic-block-define "clocktable" #'org-clock-report)
  eval-buffer(#<buffer  *load*-994977> nil 
"/home/stardiviner/Code/Emacs/org-mode/lisp/org-clo..." nil t)  ; Reading at 
buffer position 76334
  
load-with-code-conversion("/home/stardiviner/Code/Emacs/org-mode/lisp/org-clo..."
 "/home/stardiviner/Code/Emacs/org-mode/lisp/org-clo..." nil t)
  require(org-clock)
  eval-buffer(#<buffer  *load*-996906> nil 
"/home/stardiviner/Code/Emacs/org-mode/lisp/org-tim..." nil t)  ; Reading at 
buffer position 1494
  
load-with-code-conversion("/home/stardiviner/Code/Emacs/org-mode/lisp/org-tim..."
 "/home/stardiviner/Code/Emacs/org-mode/lisp/org-tim..." nil t)
  require(org-timer)
  eval-buffer(#<buffer  *load*-524624> nil 
"/home/stardiviner/.emacs.d/init/org-mode/init-org-..." nil t)  ; Reading at 
buffer position 155
  
load-with-code-conversion("/home/stardiviner/.emacs.d/init/org-mode/init-org-..."
 "/home/stardiviner/.emacs.d/init/org-mode/init-org-..." nil t)
  require(init-org-clock)
  eval-buffer(#<buffer  *load*-445340> nil 
"/home/stardiviner/.emacs.d/init/org-mode/init-org-..." nil t)  ; Reading at 
buffer position 684
  
load-with-code-conversion("/home/stardiviner/.emacs.d/init/org-mode/init-org-..."
 "/home/stardiviner/.emacs.d/init/org-mode/init-org-..." nil t)
  require(init-org-mode)
  eval-buffer(#<buffer  *load*> nil "/home/stardiviner/.emacs.d/init.el" nil t) 
 ; Reading at buffer position 3581
  load-with-code-conversion("/home/stardiviner/.emacs.d/init.el" 
"/home/stardiviner/.emacs.d/init.el" t t)
  load("/home/stardiviner/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 
0x1ffbe1cfdd39>) #f(compiled-function () #<bytecode 0x1ffbe1cfdd09>) t)
  command-line()
  normal-top-level()
#+end_example

* Debug

- [X] I checked out my recently .emacs config git log. Have not found any
  org-mode package related changes.
- [X] I also checked out Org Mode repository recent git log, no clue neither.
- [X] I try to git check out to a previous about 1 week ago commit, still has 
this error.
- [X] Then I guess might be issue on 
[[https://github.com/jwiegley/use-package][use-package]] recently update? But 
it only
  have one commits in README recently in 2019 year. weird now.

I write this ~org-dynamic-block-define~ by myself. I have ~declare-function~ in
files like =org-clock.el=. Don't know why report void function error.

#+begin_src emacs-lisp
(declare-function org-dynamic-block-define "org" (type func))
#+end_src

Does anybody have idea?

Maybe I need to add ~;;;###autoload~ cookie on ~org-dynamic-block-define~? I 
tried
it locally, then restart Emacs, still not work.

* My config and temporary workaround

By the way, here is my org mode loading config:

#+begin_src emacs-lisp
(use-package org
  :pin manual
  :load-path "~/Code/Emacs/org-mode/lisp/"
  :preface
  ;; Org Mode modules -- modules that should always be loaded together with 
org.el.
  ;; t: greedy load all modules.
  ;; nil: disable all extra org-mode modules to speed-up Org-mode file opening.
  (setq org-modules nil)
  :mode (("\\.org\\'" . org-mode))
  :init
  ;; add source code version Org-mode Info into Emacs.
  (with-eval-after-load 'info
    (info-initialize)
    (add-to-list 'Info-directory-list "~/Code/Emacs/org-mode/doc/"))
  ;; load org before using some Org settings.
  (require 'org)
  (use-package org-plus-contrib
    :pin manual
    :load-path "~/Code/Emacs/org-mode/contrib/lisp/"
    :no-require t))
#+end_src

I can't fix it, but I added some workaround temporally:

#+begin_src emacs-lisp
(use-package org
  :pin manual
  :load-path "~/Code/Emacs/org-mode/lisp/"
  :defer nil
  :preface
  ;; Org Mode modules -- modules that should always be loaded together with 
org.el.
  ;; t: greedy load all modules.
  ;; nil: disable all extra org-mode modules to speed-up Org-mode file opening.
  (setq org-modules nil)
  :mode (("\\.org\\'" . org-mode))
  :defines (org-dynamic-block-alist)
  :commands (org-dynamic-block-define)
  :init
  ;; add source code version Org-mode Info into Emacs.
  (with-eval-after-load 'info
    (info-initialize)
    (add-to-list 'Info-directory-list "~/Code/Emacs/org-mode/doc/"))
  ;; load org before using some Org settings.
  (require 'org)
  (use-package org-plus-contrib
    :pin manual
    :load-path "~/Code/Emacs/org-mode/contrib/lisp/"
    :no-require t)
  (autoload 'org-buffer-hash "org-compat"))
#+end_src

More init configs are here: https://github.com/stardiviner/emacs.d

BTW, The function ~org-buffer-hash~ has some issue. Seems =org.el= is not fully
loaded at all.

At the end, thank you for watched this long message.

-- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      



reply via email to

[Prev in Thread] Current Thread [Next in Thread]