* [PATCH] Add org-agenda-goto-date - prompt for and display the agenda for an arbitrary date
@ 2007-07-19 17:30 Bernt Hansen
2007-07-20 9:35 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Bernt Hansen @ 2007-07-19 17:30 UTC (permalink / raw)
To: emacs-orgmode
Hi Carsten,
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.
Great job!
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
useful.
PS. This is my first ever Lisp contribution! :D Hopefully it's okay :)
Regards,
Bernt
----
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
--- a/org.el
+++ b/org.el
@@ -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."
(goto-line line)
(recenter window-line)))
+(defun org-agenda-goto-date ()
+ "Prompt for a date and display the agenda for that date"
+ (interactive)
+ (org-agenda-list nil (org-read-date)))
+
(defun org-agenda-goto-today ()
"Go to today."
(interactive)
--
1.5.2.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add org-agenda-goto-date - prompt for and display the agenda for an arbitrary date
2007-07-19 17:30 [PATCH] Add org-agenda-goto-date - prompt for and display the agenda for an arbitrary date Bernt Hansen
@ 2007-07-20 9:35 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2007-07-20 9:35 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
Hi Bernt,
On Jul 19, 2007, at 19:30, Bernt Hansen wrote:
> One thing I've been finding that I want to do is to view my agenda for
> some arbitrary date in the future.
Agreed.
> Is there a good way to do this today that I'm just not aware of?
No, and this is truly an important omission.
> Here's a patch that implements this function in case you find it
> useful.
>
> PS. This is my first ever Lisp contribution! :D Hopefully it's okay :)
The patch is great, I only modified it so that you could call the
function
also in a non-interactive way, and added a menu entry for it.
You even got the key binding right, I would have made the same choice.
Thanks.
- Carsten
--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-20 12:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19 17:30 [PATCH] Add org-agenda-goto-date - prompt for and display the agenda for an arbitrary date Bernt Hansen
2007-07-20 9:35 ` Carsten Dominik
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).