summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-08-03 21:45:45 -0400
committerKyle Meyer <kyle@kyleam.com>2018-08-03 21:45:45 -0400
commit441ca9662eba57bc8b876b98d285072fe68c771e (patch)
tree3b818f7700b41045707042f2a0f966d1839c60d3
parent47027856ac6d96b693a14a3aee4b1f977442ff97 (diff)
downloademacs.d-441ca9662eba57bc8b876b98d285072fe68c771e.tar.gz
Overload org-agenda-goto-today
...to behave as beginning-of-buffer in non-agenda org-agenda-mode buffers.
-rw-r--r--init.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/init.el b/init.el
index d556acd..97dfc6c 100644
--- a/init.el
+++ b/init.el
@@ -266,6 +266,12 @@
(org-agenda-overriding-header "Unscheduled TODO entries: ")))
("p" "Past timestamps" tags "TIMESTAMP<=\"<now>\"")))
+ (advice-add 'org-agenda-goto-today :around
+ (lambda (fn &rest args)
+ (if (org-agenda-check-type nil 'agenda)
+ (apply fn args)
+ (goto-char (point-min)))))
+
(bind-keys :map org-agenda-mode-map
;; Bind `org-agenda-follow-mode' to same key as
;; `next-error-follow-minor-mode'.