From: Carsten Dominik <carsten.dominik@gmail.com>
To: Julien Danjou <julien@danjou.info>
Cc: Bernt Hansen <bernt@norang.ca>, Org Mode <emacs-orgmode@gnu.org>,
Noorul Islam K M <noorul@noorul.com>
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:15:30 +0100 [thread overview]
Message-ID: <11FE107E-7777-4D43-99B7-891FF75463DE@gmail.com> (raw)
In-Reply-To: <sa37he24jlk.fsf@cigue.easter-eggs.fr>
On Jan 18, 2011, at 11:00 AM, Julien Danjou wrote:
> 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.
I applied the patch, with minor modifications and added documentation.
Thanks.
- Carsten
> From f48b89a683f9ff36d164b20c1df44ca6e6aefd7e Mon Sep 17 00:00:00 2001
> From: Julien Danjou <julien@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 <julien@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
- Carsten
next prev parent reply other threads:[~2011-01-18 10:15 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-22 4:09 Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)] Bernt Hansen
2010-12-22 7:03 ` Noorul Islam K M
2010-12-22 12:29 ` Bernt Hansen
2011-01-14 12:34 ` Carsten Dominik
2011-01-14 16:03 ` Bernt Hansen
2011-01-14 17:29 ` Carsten Dominik
2011-01-14 17:42 ` Bernt Hansen
2011-01-17 14:27 ` Bernt Hansen
2011-01-17 14:39 ` Carsten Dominik
2011-01-17 15:08 ` Julien Danjou
2011-01-17 16:34 ` Julien Danjou
2011-01-17 16:43 ` Carsten Dominik
2011-01-17 16:46 ` Julien Danjou
2011-01-18 9:43 ` Carsten Dominik
2011-01-18 10:00 ` Julien Danjou
2011-01-18 10:15 ` Carsten Dominik [this message]
2011-01-17 16:47 ` Bernt Hansen
2011-01-17 16:54 ` Julien Danjou
2011-01-17 17:00 ` Bernt Hansen
2011-01-17 17:04 ` Julien Danjou
2011-01-17 17:01 ` Carsten Dominik
2011-01-17 17:11 ` Julien Danjou
2011-01-17 17:14 ` Bernt Hansen
2011-01-17 18:27 ` [Accepted] " Bastien Guerry
2011-01-28 15:18 ` Julien Danjou
2011-01-28 15:43 ` Giovanni Ridolfi
2011-01-28 16:10 ` Julien Danjou
2011-02-01 11:52 ` Bastien
2011-02-01 11:52 ` [Accepted] " Bastien Guerry
2011-02-05 1:20 ` Matt Lundin
2011-02-05 8:56 ` Julien Danjou
2011-02-07 11:39 ` Julien Danjou
2011-02-08 17:05 ` [Accepted] " Bastien Guerry
2011-02-09 16:37 ` Bastien
2011-02-10 9:20 ` Carsten Dominik
2011-02-10 10:51 ` Julien Danjou
2011-02-10 11:50 ` Carsten Dominik
2011-02-10 12:00 ` Julien Danjou
2011-02-10 14:35 ` Bastien
2011-02-10 21:21 ` Michael Brand
2011-02-17 13:57 ` Carsten Dominik
2011-02-17 14:43 ` Bastien
2011-02-18 14:19 ` Bastien
2011-02-18 14:46 ` Gábor Melis
2011-02-18 16:42 ` Carsten Dominik
2011-02-19 9:36 ` Bastien
2011-02-10 11:18 ` Michael Brand
2011-02-10 11:55 ` Carsten Dominik
2011-02-24 14:38 ` Matt Lundin
2011-02-24 15:01 ` Matt Lundin
2011-02-25 0:11 ` Bastien
2011-02-25 0:15 ` Bastien
2011-03-06 15:40 ` Bastien
2011-03-06 16:47 ` Michael Brand
2011-03-06 17:15 ` Bastien
2011-03-06 18:26 ` Michael Brand
2011-03-06 18:35 ` Bastien
2011-03-07 18:26 ` Matt Lundin
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=11FE107E-7777-4D43-99B7-891FF75463DE@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
--cc=julien@danjou.info \
--cc=noorul@noorul.com \
/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).