summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-01-20 11:43:52 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2010-01-20 11:43:52 +0100
commit566dac98b31180514aa14c24c60a20ffd8e10fc2 (patch)
tree967b7b0f6f56cd7b1b18e9253c80534dfe4a77e0
parentcae0c63c488067e93b665e9110dc74a634c52529 (diff)
downloadorg-mode-566dac98b31180514aa14c24c60a20ffd8e10fc2.tar.gz
Autoload org-datetree-find-create-date
Stephen Eglen writes > Within the agenda buffer, if I type 'i j' to jump to the current date I > get: > > Debugger entered--Lisp error: (void-function org-datetree-find-date-create) > org-datetree-find-date-create((1 20 2010)) > org-agenda-diary-entry-in-org-file() > org-agenda-diary-entry() > call-interactively(org-agenda-diary-entry nil nil) > > If I then do M-x load-library org-datetree > > and repeat 'i j', it works. Should this function be autoloaded?
-rwxr-xr-xlisp/ChangeLog5
-rw-r--r--lisp/org-agenda.el1
-rw-r--r--lisp/org-datetree.el1
3 files changed, 7 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0710476..3a86187 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2010-01-20 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-agenda.el (org-agenda-diary-entry-in-org-file): Make sure
+ org-datetree.el is loaded.
+
+ * org-datetree.el: autoload `org-datetree-find-day-create'
+
* org-latex.el (org-export-latex-hyperref-format): New option.
(org-export-latex-links): Use `org-export-latex-hyperref-format'.
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index a20bec5..9a76563 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6832,6 +6832,7 @@ The cursor may be at a date in the calendar, or in the Org agenda."
((equal char ?j)
(org-switch-to-buffer-other-window
(find-file-noselect org-agenda-diary-file))
+ (require 'org-datetree)
(org-datetree-find-date-create d1)
(org-reveal t))
(t (error "Invalid selection character `%c'" char)))))
diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el
index 23372b3..3115e5f 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -39,6 +39,7 @@ This is normally one, but if the buffer has an entry with a DATE_TREE
property, the date tree will become a subtree under that entry, so the
base level will be properly adjusted.")
+;;;###autoload
(defun org-datetree-find-date-create (date &optional keep-restriction)
"Find or create an entry for DATE.
If KEEP-RESTRICTION is non-nil, do not widen the buffer.