From: Bernt Hansen <bernt@alumni.uwaterloo.ca>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Add org-agenda-goto-date - prompt for and display the agenda for an arbitrary date
Date: Thu, 19 Jul 2007 13:30:30 -0400 [thread overview]
Message-ID: <878x9cti6h.fsf@gollum.intra.norang.ca> (raw)
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
next reply other threads:[~2007-07-19 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 17:30 Bernt Hansen [this message]
2007-07-20 9:35 ` [PATCH] Add org-agenda-goto-date - prompt for and display the agenda for an arbitrary date Carsten Dominik
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=878x9cti6h.fsf@gollum.intra.norang.ca \
--to=bernt@alumni.uwaterloo.ca \
--cc=emacs-orgmode@gnu.org \
/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).