emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: void function definition of org-dynamic-block-define
Date: Thu, 28 Feb 2019 10:12:53 +0800	[thread overview]
Message-ID: <87lg20y82i.fsf@gmail.com> (raw)


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	other threads:[~2019-02-28  2:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  2:12 stardiviner [this message]
2019-02-28  4:16 ` [SOLVED] Re: void function definition of org-dynamic-block-define stardiviner

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=87lg20y82i.fsf@gmail.com \
    --to=numbchild@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).