[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [PATCH] Add org-agenda-goto-date - prompt for and display the
[Orgmode] [PATCH] Add org-agenda-goto-date - prompt for and display the agenda for an arbitrary date
Thu, 19 Jul 2007 13:30:30 -0400
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)
Thanks so much for this wonderful tool. I moved from planner-mode to
org-mode about a year ago and org-mode is a pleasure to work with.
One thing I've been finding that I want to do is to view my agenda for
some arbitrary date in the future. I can't find any good way to display
the agenda for say Dec 12, 2007. The best I can come up with is to
create a date link in an org file and then C-c C-o on that to get to the
date I want and then delete the org file date link since all I wanted
it for was to get to the agenda view but this is a bit tedious.
Using the agenda view to manually page forwards (by month or week) isn't
convenient if the date is too far away.
It would be nice to have a function (maybe org-agenda-goto-date or
something) that prompts for the date and then displays the agenda with
that date without having to edit the date into an org file first.
Is there a good way to do this today that I'm just not aware of?
At this point I went away and started hacking on the lisp code.
Here's a patch that implements this function in case you find it
PS. This is my first ever Lisp contribution! :D Hopefully it's okay :)
Subject: [PATCH] Add org-agenda-goto-date - prompt for and display the agenda
for an arbitrary date
Prompt for and display the agenda for an arbitrary date.
Bind "j" (jump) in the agenda view to this function.
org.el | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/org.el b/org.el
index 22bc3f1..b30a9e1 100644
@@ -15868,6 +15868,7 @@ The following commands are available:
(org-defkey org-agenda-mode-map "a" 'org-agenda-toggle-archive-tag)
(org-defkey org-agenda-mode-map ":" 'org-agenda-set-tags)
(org-defkey org-agenda-mode-map "." 'org-agenda-goto-today)
+(org-defkey org-agenda-mode-map "j" 'org-agenda-goto-date)
(org-defkey org-agenda-mode-map "d" 'org-agenda-day-view)
(org-defkey org-agenda-mode-map "w" 'org-agenda-week-view)
(org-defkey org-agenda-mode-map "m" 'org-agenda-month-view)
@@ -18366,6 +18367,11 @@ When this is the global TODO list, a prefix argument
will be interpreted."
+(defun org-agenda-goto-date ()
+ "Prompt for a date and display the agenda for that date"
+ (org-agenda-list nil (org-read-date)))
(defun org-agenda-goto-today ()
"Go to today."
- [Orgmode] [PATCH] Add org-agenda-goto-date - prompt for and display the agenda for an arbitrary date,
Bernt Hansen <=