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

Error running timer ‘org-indent-initialize-agent’: (void-function org-time-add) #129

Closed
bladrome opened this issue Nov 14, 2019 · 9 comments
Labels

Comments

@bladrome
Copy link

Something wrong with

org-startup-indented t
, normal as org-startup-indented is nil.

@seagle0128
Copy link
Owner

This is just an option. I don't understand why it caused this issue. Can you provide detailed backtrace?

@bladrome
Copy link
Author

Debugger entered--Lisp error: (void-function org-time-add)
  org-time-add(nil (0 0 400000))
  org-indent-add-properties(#<marker at 1 in 1118.org> 4 (0 0 400000))
  org-indent-initialize-buffer(#<buffer 1118.org> (0 0 400000))
  org-indent-initialize-agent()
  apply(org-indent-initialize-agent nil)
  timer-event-handler([t 0 0 200000 t org-indent-initialize-agent nil idle 0])

where 1118.org is just empty.

@seagle0128
Copy link
Owner

Please check and provide the information below.

  1. Emacs version
  2. org version
  3. Centaur emacs version
  4. Your private configurations
  5. Reproduce steps
  6. logs and messages, etc.

@bladrome
Copy link
Author

  1. emacs: 26.3
  2. org: 9.2.6
  3. Centaur emacs version: at commit e2bdca7 ("Update shackle rules.")
  4. custom.el at
;; For Emacs devel
;; (setq package-user-dir (locate-user-emacs-file (format "elpa-%s" emacs-major-version)))
;; (setq desktop-base-file-name (format ".emacs-%s.desktop" emacs-major-version))
;; (setq desktop-base-lock-name (format ".emacs-%s.desktop.lock" emacs-major-version))

;; Fonts
(when (display-graphic-p)
  ;; Set default font
  (catch 'loop
    (dolist (font '("SF Mono" "Hack" "Source Code Pro" "Fira Code"
                    "Menlo" "Monaco" "DejaVu Sans Mono" "Consolas"))
      (when (member font (font-family-list))
        (set-face-attribute 'default nil :font font :height (cond
                                                             (sys/mac-x-p 130)
                                                             (sys/win32p 110)
                                                             (t 150)))
        (throw 'loop t))))

  ;; Specify font for all unicode characters
  (catch 'loop
    (dolist (font '("Symbola" "Apple Symbols" "Symbol"))
      (when (member font (font-family-list))
        (set-fontset-font t 'unicode font nil 'prepend)
        (throw 'loop t))))

  ;; Specify font for Chinese characters
  (catch 'loop
    (dolist (font '("WenQuanYi Micro Hei" "Microsoft Yahei"))
      (when (member font (font-family-list))
        (set-fontset-font t '(#x4e00 . #x9fff) font)
        (throw 'loop t)))))

;; Mail
;; (setq message-send-mail-function 'smtpmail-send-it
;;       smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
;;       smtpmail-auth-credentials '(("smtp.gmail.com" 587
;;                                    user-mail-address nil))
;;       smtpmail-default-smtp-server "smtp.gmail.com"
;;       smtpmail-smtp-server "smtp.gmail.com"
;;       smtpmail-smtp-service 587)

;; Misc.
(setq confirm-kill-emacs 'y-or-n-p)

(require 'ox-beamer)
(require 'ox-publish)

(org-babel-do-load-languages
 'org-babel-load-languages
 '(
   (R . t)
   (dot . t)
   (ruby . t)
   (ditaa . t)
   (python . t)
   (octave . t)
   (sqlite . t)
   (perl . t)
   (C . t)
   ))

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-safe-themes
   (quote
    ("9e31aff9afe3c20a33dd966b4c54c6a5151f07659362e4b06bde38ded5370dae" "428754d8f3ed6449c1078ed5b4335f4949dc2ad54ed9de43c56ea9b803375c23" "7356632cebc6a11a87bc5fcffaa49bae528026a78637acd03cae57c091afd9b9" default)))
 '(jdee-db-active-breakpoint-face-colors (cons "#282a36" "#57c7ff"))
 '(jdee-db-requested-breakpoint-face-colors (cons "#282a36" "#5af78e"))
 '(jdee-db-spec-breakpoint-face-colors (cons "#282a36" "#848688"))
 '(objed-cursor-color "#ff5c57"))

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(all-the-icons-dired-dir-face ((t (:foreground nil))))
 '(aw-leading-char-face ((t (:inherit font-lock-keyword-face :bold t :height 3.0))))
 '(aw-mode-line-face ((t (:inherit mode-line-emphasis :bold t))))
 '(diff-hl-change ((t (:foreground "#fc20bb"))))
 '(git-timemachine-minibuffer-author-face ((t (:inherit success))))
 '(git-timemachine-minibuffer-detail-face ((t (:inherit warning))))
 '(hl-line ((t (:extend t))))
 '(ivy-minibuffer-match-face-1 ((t (:inherit font-lock-doc-face :foreground nil))))
 '(macrostep-expansion-highlight-face ((t (:background "#1b1d1e"))))
 '(org-ellipsis ((t (:foreground nil))))
 '(org-pomodoro-mode-line ((t (:inherit warning))))
 '(org-pomodoro-mode-line-break ((t (:inherit success))))
 '(org-pomodoro-mode-line-overtime ((t (:inherit error))))
 '(symbol-overlay-default-face ((t (:inherit (quote region)))))
 '(symbol-overlay-face-1 ((t (:inherit (quote highlight)))))
 '(symbol-overlay-face-2 ((t (:inherit (quote font-lock-builtin-face) :inverse-video t))))
 '(symbol-overlay-face-3 ((t (:inherit (quote warning) :inverse-video t))))
 '(symbol-overlay-face-4 ((t (:inherit (quote font-lock-constant-face) :inverse-video t))))
 '(symbol-overlay-face-5 ((t (:inherit (quote error) :inverse-video t))))
 '(symbol-overlay-face-6 ((t (:inherit (quote dired-mark) :inverse-video t :bold nil))))
 '(symbol-overlay-face-7 ((t (:inherit (quote success) :inverse-video t))))
 '(symbol-overlay-face-8 ((t (:inherit (quote dired-symlink) :inverse-video t :bold nil))))
 '(ztreep-arrow-face ((t (:inherit font-lock-comment-face))))
 '(ztreep-diff-header-face ((t (:inherit (diff-header bold)))))
 '(ztreep-diff-header-small-face ((t (:inherit diff-file-header))))
 '(ztreep-diff-model-add-face ((t (:inherit diff-nonexistent))))
 '(ztreep-diff-model-diff-face ((t (:inherit diff-removed))))
 '(ztreep-diff-model-ignored-face ((t (:inherit font-lock-doc-face :strike-through t))))
 '(ztreep-diff-model-normal-face ((t (:inherit font-lock-doc-face))))
 '(ztreep-expand-sign-face ((t (:inherit font-lock-function-name-face))))
 '(ztreep-header-face ((t (:inherit diff-header))))
 '(ztreep-leaf-face ((t (:inherit diff-index))))
 '(ztreep-node-face ((t (:inherit font-lock-variable-name-face)))))

;;; custom.el ends here

  1. Reproduce steps:
    Just open a org file, like emacs new.org
  2. warning:
Warning (server): Unable to start the Emacs server.
There is an existing Emacs server, named "server".
To start the server in this Emacs process, stop the existing
server or call ‘M-x server-force-delete’ to forcibly disconnect it.

message:

Loading /home/bladrome/.emacs.d/custom.el (source)...
Debug on Error enabled globally
Loading /home/bladrome/.emacs.d/custom.el (source)...done
Set package archives to ‘tuna’
Transient menu for ‘rg’ enabled with key binding: C-c s
[yas] Prepared just-in-time loading of snippets successfully.
ad-handle-definition: ‘easy-mark’ got redefined
Loading /home/bladrome/.emacs.d/recentf...done
Cleaning up the recentf list...done (0 removed)
For information about GNU Emacs and the GNU system, type C-h C-a.
Turning on magit-auto-revert-mode...done
Starting new Ispell process aspell with default dictionary...
Entering debugger...
Error in post-command-hook (#[0 "\303\304\301\242\305#\210\300\306�!\205�\0r\211q\210
?\205�\0\307\310\311 \")\207" [#<buffer org-indent.el> (#0) eglot--managed-mode remove-hook post-command-hook nil buffer-live-p apply eglot--connect eglot--guess-contact] 4]): (error "[eglot] Couldn't guess for `emacs-lisp-mode'!")
Error in post-command-hook (#[0 "\303\304\301\242\305#\210\300\306�!\205�\0r\211q\210
?\205�\0\307\310\311 \")\207" [#<buffer Makefile> (#0) eglot--managed-mode remove-hook post-command-hook nil buffer-live-p apply eglot--connect eglot--guess-contact] 4]): (error "[eglot] Couldn't guess for `makefile-gmake-mode'!")
Back to top level
Entering debugger...
Updating buffer list...
Formats have changed, recompiling...done
Updating buffer list...done
ibuffer-projectile: groups set
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Error running timer ‘org-indent-initialize-agent’: (void-function org-time-add) [8 times]
Mark set
Error running timer ‘org-indent-initialize-agent’: (void-function org-time-add) [3 times]
Mark set
Error running timer ‘org-indent-initialize-agent’: (void-function org-time-add) [6 times]
Mark set
Error running timer ‘org-indent-initialize-agent’: (void-function org-time-add) [5 times]
C-x C-g is undefined
Error running timer ‘org-indent-initialize-agent’: (void-function org-time-add)
Updating buffer list...done
ibuffer-projectile: groups set
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Error running timer ‘org-indent-initialize-agent’: (void-function org-time-add) [8 times]
Mark set

@seagle0128
Copy link
Owner

I believe this issue is caused by your personal configurations below.

(require 'ox-beamer)
(require 'ox-publish)

(org-babel-do-load-languages
 'org-babel-load-languages
 '(
   (R . t)
   (dot . t)
   (ruby . t)
   (ditaa . t)
   (python . t)
   (octave . t)
   (sqlite . t)
   (perl . t)
   (C . t)
   ))

You should put the snippet in (with-eval-after-load 'org).

@bladrome
Copy link
Author

Thanks for your kindness, it works.

@jcguu95
Copy link

jcguu95 commented Mar 1, 2020

I had the same issue, but the solution above did not solve my problem. For those who want try, I added (org-reload) at the end of my config, which solved my problem.

@liar666
Copy link

liar666 commented Mar 29, 2021

I had the same issue, but the solution above did not solve my problem. For those who want try, I added (org-reload) at the end of my config, which solved my problem.

Your problem is probably the same as mine: you have both the builtin version of org-mode and a more recent one. The problem comes from the fact that parts of both versions are loaded together. Using (org-reload) at the end of the config works, but is a dirty solution.

The correct solution (found here: https://emacs.stackexchange.com/questions/55324/how-to-install-latest-version-of-org-mode/63909#63909) is to load the latest version first and only:
At the very beginning of your ~/.emacs, put something like:

(add-to-list 'load-path "~/.emacs.d/elpa/org-latest")
(require 'org-loaddefs)

; previous lines must be BEFORE any usage (thus loading) of org-mode, like the following:
(org-babel-load-file
 (expand-file-name
  "config.org"
  user-emacs-directory))

In my case, ~/.emacs.d/elpa/org-latest is a link to the actual directory. It's not the best solution as I have to recreate it everytime I upgrade my Emacs packages :{ Any cleaner solution is welcome!

@dianrob
Copy link

dianrob commented May 12, 2021

I had the same issue, but the solution above did not solve my problem. For those who want try, I added (org-reload) at the end of my config, which solved my problem.

Thanks, mate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants