diff options
author | Julien Danjou <julien@danjou.info> | 2011-01-18 15:00:39 +0000 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2011-01-18 11:14:20 +0100 |
commit | dc55710b60cc660d48d3373c61ba7bbcd7c1f24c (patch) | |
tree | 2d38cf0b196766fceb67fbb2fa6f6a7c0f9785fe | |
parent | 1abfaf49172f23f4c03fecdc7ba83f6b125c2e1c (diff) | |
download | org-mode-dc55710b60cc660d48d3373c61ba7bbcd7c1f24c.tar.gz |
Add command to reset agenda time span
* org-agenda.el (org-agenda-reset-view): New function.
(org-agenda-view-mode-dispatch): Bind space to org-agenda-reset-view.
Signed-off-by: Julien Danjou <julien@danjou.info>
* doc/org.texi (Agenda commands): Document `v SPC'.
* doc/orgcard.tex: Document v SPC
-rw-r--r-- | doc/org.texi | 23 | ||||
-rw-r--r-- | doc/orgcard.tex | 2 | ||||
-rw-r--r-- | lisp/org-agenda.el | 7 |
3 files changed, 20 insertions, 12 deletions
diff --git a/doc/org.texi b/doc/org.texi index 7c3b0c0..c494f38 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -7643,16 +7643,19 @@ Delete other windows. @xorgcmdkskc{v w,w,org-aganda-day-view} @xorgcmd{v m,org-agenda-month-view} @xorgcmd{v y,org-agenda-month-year} -Switch to day/week/month/year view. When switching to day or week view, -this setting becomes the default for subsequent agenda commands. Since -month and year views are slow to create, they do not become the default. -A numeric prefix argument may be used to jump directly to a specific day -of the year, ISO week, month, or year, respectively. For example, -@kbd{32 d} jumps to February 1st, @kbd{9 w} to ISO week number 9. When -setting day, week, or month view, a year may be encoded in the prefix -argument as well. For example, @kbd{200712 w} will jump to week 12 in -2007. If such a year specification has only one or two digits, it will -be mapped to the interval 1938-2037. +@xorgcmd{v SPC,org-agenda-reset-view} +@vindex org-agenda-span +Switch to day/week/month/year view. When switching to day or week view, this +setting becomes the default for subsequent agenda refreshes. Since month and +year views are slow to create, they do not become the default. A numeric +prefix argument may be used to jump directly to a specific day of the year, +ISO week, month, or year, respectively. For example, @kbd{32 d} jumps to +February 1st, @kbd{9 w} to ISO week number 9. When setting day, week, or +month view, a year may be encoded in the prefix argument as well. For +example, @kbd{200712 w} will jump to week 12 in 2007. If such a year +specification has only one or two digits, it will be mapped to the interval +1938-2037. @kbd{v @key{SPC}} will reset to what is set in +@code{org-agenda-span}. @c @orgcmd{f,org-agenda-later} Go forward in time to display the following @code{org-agenda-current-span} days. diff --git a/doc/orgcard.tex b/doc/orgcard.tex index c55c55d..67cbac2 100644 --- a/doc/orgcard.tex +++ b/doc/orgcard.tex @@ -586,7 +586,7 @@ after ``{\tt :}'', and dictionary words elsewhere. \key{delete other windows}{o} \key{view mode dispatcher}{v} -\key{switch to day/week/month/year view}{d w vm vy} +\key{switch to day/week/month/year/def view}{d w vm vy vSP} \key{toggle diary entries / time grid / habits}{D / G / K} \key{toggle entry text / clock report}{E / R} \key{toggle display of logbook entries}{l / v l/L} diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index f431a42..4f06eb0 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6154,11 +6154,12 @@ With prefix ARG, go backward that many times the current span." (defun org-agenda-view-mode-dispatch () "Call one of the view mode commands." (interactive) - (message "View: [d]ay [w]eek [m]onth [y]ear [q]uit/abort + (message "View: [d]ay [w]eek [m]onth [y]ear [SPC]reset [q]uit/abort time[G]rid [[]inactive [f]ollow [l]og [L]og-all [E]ntryText [a]rch-trees [A]rch-files clock[R]eport include[D]iary") (let ((a (read-char-exclusive))) (case a + (?\ (call-interactively 'org-agenda-reset-view)) (?d (call-interactively 'org-agenda-day-view)) (?w (call-interactively 'org-agenda-week-view)) (?m (call-interactively 'org-agenda-month-view)) @@ -6180,6 +6181,10 @@ With prefix ARG, go backward that many times the current span." (?q (message "Abort")) (otherwise (error "Invalid key" ))))) +(defun org-agenda-reset-view () + "Switch to default view for agenda." + (interactive) + (org-agenda-change-time-span (or org-agenda-ndays org-agenda-span))) (defun org-agenda-day-view (&optional day-of-year) "Switch to daily view for agenda. With argument DAY-OF-YEAR, switch to that day of the year." |