From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Danjou Subject: Re: Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)] Date: Tue, 18 Jan 2011 11:00:39 +0100 Message-ID: References: <87ei9a30tx.fsf@norang.ca> <87k4j2e1bb.fsf@noorul.maa.corp.collab.net> <87y67i0z5c.fsf@norang.ca> <87zkr3h3qv.fsf@norang.ca> <257A79BB-86AC-43E5-AE9D-132168283FFB@gmail.com> <87k4i7gz5a.fsf@norang.ca> <8739ord2r4.fsf@norang.ca> <97009C4F-F6B7-4C54-BF3C-B3DE5EF15547@gmail.com> <10856187-1F13-4E34-90AE-B25B2C6EFC83@gmail.com> <320B5333-BD2A-40B2-8FE7-972BFC72C32F@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0604477405==" Return-path: Received: from [140.186.70.92] (port=47682 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pf8Mn-0004z0-UU for emacs-orgmode@gnu.org; Tue, 18 Jan 2011 05:00:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pf8Ml-0001Ud-G9 for emacs-orgmode@gnu.org; Tue, 18 Jan 2011 05:00:45 -0500 Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]:51696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pf8Mk-0001TH-Bk for emacs-orgmode@gnu.org; Tue, 18 Jan 2011 05:00:43 -0500 In-Reply-To: <320B5333-BD2A-40B2-8FE7-972BFC72C32F@gmail.com> (Carsten Dominik's message of "Tue, 18 Jan 2011 10:43:23 +0100") 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: Carsten Dominik Cc: Bernt Hansen , Org Mode , Noorul Islam K M --===============0604477405== Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. [=E2=80=A6] > 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org-agenda-add-a-binding-to-reset-the-view.patch Content-Transfer-Encoding: quoted-printable From=20f48b89a683f9ff36d164b20c1df44ca6e6aefd7e Mon Sep 17 00:00:00 2001 From: Julien Danjou 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 =2D-- 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 =2D-- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6157,11 +6157,12 @@ With prefix ARG, go backward that many times the cu= rrent span." (defun org-agenda-view-mode-dispatch () "Call one of the view mode commands." (interactive) =2D (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/ab= ort 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 cur= rent span." (?q (message "Abort")) (otherwise (error "Invalid key" ))))) =20 +(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." =2D-=20 1.7.2.3 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =2D-=20 Julien Danjou =E2=9D=B1 http://julien.danjou.info --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk01ZMgACgkQpGK1HsL+5c0JpQCePljHo1ACnf50CsraI9nJ4sQG 1t8AoLN09Rv0F4jqRGJF3eTX/rejQpMA =GYcf -----END PGP SIGNATURE----- --==-=-=-- --===============0604477405== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0604477405==--