[SOLVED] Re: commit "328c9a1af * bad org.el: Enhance menus" caused error
Bastien writes: > Hi Stardiviner, > > I fixed this in master, thanks for reporting this bug. > > Best, Thanks Bastien, You're very active recently. I saw you fixed lot of issues and new patches. Thanks, really. -- [ 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
Re: commit "328c9a1af * bad org.el: Enhance menus" caused error
Hi Stardiviner, I fixed this in master, thanks for reporting this bug. Best, -- Bastien
Re: commit "328c9a1af * bad org.el: Enhance menus" caused error
Bastien writes: > Hi, > > stardiviner writes: > >> BTW, the function ~org-insert-dblock-bindings~ is from package >> =orgtbl-aggregate=. > > I don't know this function and this package. > > Can you share the minimal Emacs config with which you reproduce > the problem? Besides of package =orgtbl-aggregate=, seems another package =orgtbl-ascii-plot= use same code to define menu too. Here is its code: #+begin_src emacs-lisp ;;;###autoload (defun orgtbl-ascii-plot-bindings () (org-defkey org-mode-map "\C-c\"a" 'orgtbl-ascii-plot) (org-defkey org-mode-map "\C-c\"g" 'org-plot/gnuplot) (easy-menu-add-item org-tbl-menu '("Column") ["Ascii plot" orgtbl-ascii-plot t])) ;;;###autoload (if (functionp 'org-defkey) (orgtbl-ascii-plot-bindings) ;; org-mode already loaded (setq org-load-hook;; org-mode will be loaded later (cons 'orgtbl-ascii-plot-bindings (if (boundp 'org-load-hook) org-load-hook #+end_src Bastien, might consider add a hook after loaded org menus? Like named ~org-menu-after-loaded-hook~ or something else? So third libraries can define menu entries with function added on the hook. I think those packages will have to updated with patches? -- [ 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
Re: commit "328c9a1af * bad org.el: Enhance menus" caused error
Bastien writes: > Hi, > > stardiviner writes: > >> BTW, the function ~org-insert-dblock-bindings~ is from package >> =orgtbl-aggregate=. > > I don't know this function and this package. > > Can you share the minimal Emacs config with which you reproduce > the problem? Start =emacs -q=, and load Org from source code. Then load package =orgtbl-aggregate=. #+begin_src emacs-lisp (use-package orgtbl-aggregate :ensure t :commands (org-insert-dblock org-insert-dblock:aggregate) :config ;; add `orgtbl-aggregate' dynamic blocks into list. (org-dynamic-block-define "columnview" 'org-insert-dblock:columnview) (org-dynamic-block-define "aggregate" 'org-insert-dblock:aggregate) (org-dynamic-block-define "invoice" 'org-insert-dblock:invoice) (org-dynamic-block-define "join" 'org-insert-dblock:join) (org-dynamic-block-define "org-gantt" 'org-insert-dblock:org-gantt) (org-dynamic-block-define "propview" 'org-insert-dblock:propview) (org-dynamic-block-define "transpose" 'org-insert-dblock:transpose)) #+end_src Actually, it is because this package contains following code cause this problem: #+begin_src emacs-lisp ;;;###autoload (defun org-insert-dblock-bindings () (org-defkey org-mode-map "\C-c\C-xi" 'org-insert-dblock) (easy-menu-add-item org-org-menu '() ["Insert Dynamic Block" org-insert-dblock t] "Agenda Command...")) ;;;###autoload (if (functionp 'org-defkey) (org-insert-dblock-bindings) ;; org-mode already loaded (setq org-load-hook;; org-mode will be loaded later (cons 'org-insert-dblock-bindings (if (boundp 'org-load-hook) org-load-hook #+end_src Maybe because I just use =use-package= autoload for =orgtbl-aggregate= instead of fully required? I tested that now by removing ~:commands~ part so that use-package will not load delayed. Still has this error. -- [ 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
Re: commit "328c9a1af * bad org.el: Enhance menus" caused error
Hi, stardiviner writes: > BTW, the function ~org-insert-dblock-bindings~ is from package > =orgtbl-aggregate=. I don't know this function and this package. Can you share the minimal Emacs config with which you reproduce the problem? -- Bastien
commit "328c9a1af * bad org.el: Enhance menus" caused error
I use magit-bisect on the latest (currently latest commit is "b14a14c9e") org-mode repo. The commit "328c9a1af * bad org.el: Enhance menus" caused bellowing error. I confirmed with a minimal Emacs config testing. #+begin_example Debugger entered--Lisp error: (void-variable org-org-menu) org-insert-dblock-bindings() run-hooks(org-load-hook) eval-buffer(# nil "/home/stardiviner/Code/Emacs/org-mode/lisp/org.el" nil t) ; Reading at buffer position 832102 load-with-code-conversion("/home/stardiviner/Code/Emacs/org-mode/lisp/org.el" "/home/stardiviner/Code/Emacs/org-mode/lisp/org.el" nil t) require(org) eval-buffer(# nil "/home/stardiviner/.config/emacs/elpa/org-20190211/..." nil t) ; Reading at buffer position 1257 load-with-code-conversion("/home/stardiviner/.config/emacs/elpa/org-20190211/..." "/home/stardiviner/.config/emacs/elpa/org-20190211/..." t t) require(org-info nil t) (not (require 'org-info nil t)) (if (not (require 'org-info nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-info) :error)) (prog1 (if (not (require 'org-info nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-info) :error)) (let ((elapsed (float-time (time-subtract (current-time) now (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package org-info" elapsed) (message "%s...done" "Loading package org-info" (let ((now (current-time))) (message "%s..." "Loading package org-info") (prog1 (if (not (require 'org-info nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-info) :error)) (let ((elapsed (float-time (time-subtract (current-time) now (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package org-info" elapsed) (message "%s...done" "Loading package org-info") (condition-case err (let ((now (current-time))) (message "%s..." "Loading package org-info") (prog1 (if (not (require 'org-info nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-info) :error)) (let ((elapsed (float-time (time-subtract ... now (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package org-info" elapsed) (message "%s...done" "Loading package org-info") ((debug error) (funcall use-package--warning152 :catch err))) eval-buffer(# nil "/home/stardiviner/.config/emacs/init/org-mode/init..." nil t) ; Reading at buffer position 6453 load-with-code-conversion("/home/stardiviner/.config/emacs/init/org-mode/init..." "/home/stardiviner/.config/emacs/init/org-mode/init..." nil t) require(init-org-hyperlink) eval-buffer(# nil "/home/stardiviner/.config/emacs/init/org-mode/init..." nil t) ; Reading at buffer position 518 load-with-code-conversion("/home/stardiviner/.config/emacs/init/org-mode/init..." "/home/stardiviner/.config/emacs/init/org-mode/init..." nil t) require(init-org-mode) eval-buffer(# nil "/home/stardiviner/.config/emacs/init.el" nil t) ; Reading at buffer position 3704 load-with-code-conversion("/home/stardiviner/.config/emacs/init.el" "/home/stardiviner/.config/emacs/init.el" t t) load("/home/stardiviner/.config/emacs/init" noerror nomessage) startup--load-user-init-file(#f(compiled-function () #) #f(compiled-function () #) t) command-line() normal-top-level() #+end_example -- [ 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
Re: commit "328c9a1af * bad org.el: Enhance menus" caused error
BTW, the function ~org-insert-dblock-bindings~ is from package =orgtbl-aggregate=. -- [ 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