From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen 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 Message-ID: <878x9cti6h.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IBZq2-0000Nm-1a for emacs-orgmode@gnu.org; Thu, 19 Jul 2007 13:30:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IBZq0-0000Mf-U6 for emacs-orgmode@gnu.org; Thu, 19 Jul 2007 13:30:53 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IBZq0-0000MN-MM for emacs-orgmode@gnu.org; Thu, 19 Jul 2007 13:30:52 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IBZq0-00059v-65 for emacs-orgmode@gnu.org; Thu, 19 Jul 2007 13:30:52 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IBZpt-0003rW-Jr for emacs-orgmode@gnu.org; Thu, 19 Jul 2007 19:30:45 +0200 Received: from cpe000102d0fe75-cm0012256ecbde.cpe.net.cable.rogers.com ([74.119.210.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jul 2007 19:30:45 +0200 Received: from bernt by cpe000102d0fe75-cm0012256ecbde.cpe.net.cable.rogers.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jul 2007 19:30:45 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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