On Tue, Jan 18 2011, Carsten Dominik wrote: > Otherwise, if would continue to use whatever value you set with your > latest view change and keep this until you change it again. > > > So what was your issue with this part?
My issue is that I use a default value of 14 days (you know I'm weird). If I change the current span by pressing `d', `w', `m', I've only one way to go back to my default 14 days view: close the agenda and reopen it. […] > So there you have your command to go back to the default > span. Yes, but: > If you think we do need an extra command for this, you > could do that under the "v" dispatcher in the agenda. > Maybe "v SPACE"? This is exactly what I meant! :-) I'd like to not to have to do `C-a a' once again to reset my view. Here's a patch for that.
From f48b89a683f9ff36d164b20c1df44ca6e6aefd7e Mon Sep 17 00:00:00 2001 From: Julien Danjou <jul...@danjou.info> Date: Tue, 18 Jan 2011 10:59:13 +0100 Subject: [PATCH] org-agenda: add a binding to reset the view * 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 <jul...@danjou.info> --- lisp/org-agenda.el | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 241ed30..138165f 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6157,11 +6157,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 [space]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)) @@ -6183,6 +6184,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." -- 1.7.2.3
-- Julien Danjou ❱ http://julien.danjou.info
pgpf4Fbko23Vy.pgp
Description: PGP signature
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode