From: Kyle Meyer <kyle@kyleam.com>
To: Axel Kielhorn <org-mode@axelkielhorn.de>, emacs-orgmode@gnu.org
Subject: [PATCH 3/4] Autoload dynamic block definitions
Date: Tue, 5 May 2020 00:15:21 -0400 [thread overview]
Message-ID: <20200505041522.30222-4-kyle@kyleam.com> (raw)
In-Reply-To: <20200505041522.30222-1-kyle@kyleam.com>
* 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>
<id:3CE37EF0-6C7A-4CC0-AFEE-2B82296D63E1@axelkielhorn.de>
---
lisp/org-clock.el | 5 ++++-
lisp/org-colview.el | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index a95c85437..690ba05b2 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2068,7 +2068,10 @@ (defun org-clock-report (&optional arg)
(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 e967154ab..3569b231b 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1550,7 +1550,10 @@ (defun org-columns-insert-dblock ()
(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)))
\f
;;; Column view in the agenda
--
2.26.1
next prev parent reply other threads:[~2020-05-05 4:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-03 7:05 Manual 7.5.3 Capturing column view outdated Axel Kielhorn
2020-05-05 4:15 ` [PATCH 0/4] dynamic block-related fixes Kyle Meyer
2020-05-05 4:15 ` [PATCH 1/4] manual: Remove stale information about dynamic block bindings Kyle Meyer
2020-05-05 4:15 ` [PATCH 2/4] orgcard: Update binding for org-columns-insert-dblock Kyle Meyer
2020-05-05 7:18 ` Axel Kielhorn
2020-05-05 12:39 ` Kyle Meyer
2020-05-05 4:15 ` Kyle Meyer [this message]
2020-05-05 4:15 ` [PATCH 4/4] org: Retain prefix arg when dispatching dynamic block commands Kyle Meyer
2020-05-06 2:48 ` [PATCH 0/4] dynamic block-related fixes Kyle Meyer
2020-05-23 9:26 ` Manual 7.5.3 Capturing column view outdated Bastien
2020-05-23 15:49 ` Kyle Meyer
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=20200505041522.30222-4-kyle@kyleam.com \
--to=kyle@kyleam.com \
--cc=emacs-orgmode@gnu.org \
--cc=org-mode@axelkielhorn.de \
/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).