summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-05-04 23:13:25 -0400
committerKyle Meyer <kyle@kyleam.com>2020-05-05 22:31:43 -0400
commit8368c38e0121511805b91b434d740a02365e9ee8 (patch)
treef69d5f5b1a8faf42b7c80ee9cba7b9158222b1c0
parentc53ff9b251363a629af97e56c4b1948a8031e2cc (diff)
downloadorg-mode-8368c38e0121511805b91b434d740a02365e9ee8.tar.gz
Autoload dynamic block definitions
* lisp/org-clock.el: * lisp/org-colview.el: Autoload call to org-dynamic-block-define. The dynamic block dispatcher added in 34b71a0ca (Add a dispatcher command for inserting dynamic blocks, 2018-12-23) offers an entry for "clocktable" and "columnview" only after the corresponding library is loaded. However, before that commit, the autoloaded org-clock-report and org-columns-insert-dblock commands were accessible via plain key bindings. Restore the ability to access these commands before the associated library is loaded. Reported-by: Axel Kielhorn <org-mode@axelkielhorn.de> <3CE37EF0-6C7A-4CC0-AFEE-2B82296D63E1@axelkielhorn.de>
-rw-r--r--lisp/org-clock.el5
-rw-r--r--lisp/org-colview.el5
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index a95c854..690ba05 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2068,7 +2068,10 @@ in the buffer and update it."
(start (goto-char start)))
(org-update-dblock))
-(org-dynamic-block-define "clocktable" #'org-clock-report)
+;;;###autoload
+(eval-after-load 'org
+ '(progn
+ (org-dynamic-block-define "clocktable" #'org-clock-report)))
(defun org-day-of-week (day month year)
"Return the day of the week as an integer."
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index e967154..3569b23 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1550,7 +1550,10 @@ PARAMS is a property list of parameters:
(id)))))
(org-update-dblock))
-(org-dynamic-block-define "columnview" #'org-columns-insert-dblock)
+;;;###autoload
+(eval-after-load 'org
+ '(progn
+ (org-dynamic-block-define "columnview" #'org-columns-insert-dblock)))
;;; Column view in the agenda