Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-02-01 Thread Bastien
Julien Danjou jul...@danjou.info writes:

 On Fri, Jan 28 2011, Giovanni Ridolfi wrote:

 I suppose that Bastien made a mistake, since there were two patches
 with the same subject one after the other, and the newest patch
 has been accepted.

Yes, my bad.

 Probably. I unarchived it and set it state to 'New' again, since it
 seems I have the right to do that in the interface.
 I hope it's the good thing to do.

It is, thanks for this.

I've applied this patch now.

Thanks,

-- 
 Bastien

___
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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-28 Thread Julien Danjou
On Mon, Jan 17 2011, Julien Danjou wrote:

This patch has not been installed, and it should be since the problem is
still here.

 I've followed but not sure I understood what the bug is. But from my
 various tries, I found a bug: when pressing 'j', the current span is
 discarded.

 Attached is a patch that should fix that, even for future use of
 `org-agenda-list' with the span unspecified. :)


 From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
 From: Julien Danjou jul...@danjou.info
 Date: Mon, 17 Jan 2011 16:05:28 +0100
 Subject: [PATCH] Fix agenda span on date jump

 * org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
 possible default span if it is set.

 Signed-off-by: Julien Danjou jul...@danjou.info
 ---
  lisp/org-agenda.el |5 -
  1 files changed, 4 insertions(+), 1 deletions(-)

 diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
 index 0cd620c..0d695b5 100644
 --- a/lisp/org-agenda.el
 +++ b/lisp/org-agenda.el
 @@ -3450,7 +3450,10 @@ given in `org-agenda-start-on-weekday'.
(setq org-agenda-last-arguments (list include-all start-day span))
(org-compile-prefix-format 'agenda)
(org-set-sorting-strategy 'agenda)
 -  (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays 
 org-agenda-span)))
 +  (let* ((span (org-agenda-ndays-to-span (or span
 +  org-agenda-current-span
 +  org-agenda-ndays
 +  org-agenda-span)))
(today (org-today))
(sd (or start-day today))
(ndays (org-agenda-span-to-ndays span sd))
 -- 
 1.7.2.3

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpAizRI5FKIP.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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-28 Thread Giovanni Ridolfi
Julien Danjou jul...@danjou.info writes:

 On Mon, Jan 17 2011, Julien Danjou wrote:

 This patch has not been installed, and it should be since the problem is
 still here.

It is patch number 543:
http://patchwork.newartisans.com/patch/543/

and it has been rejected
(see:
http://patchwork.newartisans.com/project/org-mode/list/?state=4archive=true 
)

I suppose that Bastien made a mistake, since there were two patches
with the same subject one after the other, and the newest patch
has been accepted.

Cheers,
Giovanni


 From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
 From: Julien Danjou jul...@danjou.info
 Date: Mon, 17 Jan 2011 16:05:28 +0100
 Subject: [PATCH] Fix agenda span on date jump

 * org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
 possible default span if it is set.

 Signed-off-by: Julien Danjou jul...@danjou.info
 ---
  lisp/org-agenda.el |5 -
  1 files changed, 4 insertions(+), 1 deletions(-)

 diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
 index 0cd620c..0d695b5 100644
 --- a/lisp/org-agenda.el
 +++ b/lisp/org-agenda.el
 @@ -3450,7 +3450,10 @@ given in `org-agenda-start-on-weekday'.
(setq org-agenda-last-arguments (list include-all start-day span))
(org-compile-prefix-format 'agenda)
(org-set-sorting-strategy 'agenda)
 -  (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays 
 org-agenda-span)))
 +  (let* ((span (org-agenda-ndays-to-span (or span
 + org-agenda-current-span
 + org-agenda-ndays
 + org-agenda-span)))
   (today (org-today))
   (sd (or start-day today))
   (ndays (org-agenda-span-to-ndays span sd))
 -- 
 1.7.2.3

___
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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-28 Thread Julien Danjou
On Fri, Jan 28 2011, Giovanni Ridolfi wrote:

 I suppose that Bastien made a mistake, since there were two patches
 with the same subject one after the other, and the newest patch
 has been accepted.

Probably. I unarchived it and set it state to 'New' again, since it
seems I have the right to do that in the interface.
I hope it's the good thing to do.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpx0fJTID8Q1.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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-18 Thread Julien Danjou
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-filesclock[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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-18 Thread Carsten Dominik


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 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-filesclock[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




___
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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Julien Danjou
On Mon, Jan 17 2011, Carsten Dominik wrote:

 have you been following this thread?  I think this has to do with your
 rewrite of the dagenda span stuff.  Maybe you can find out better and
 faster that I why this goes wrong?  Please read the entire thread.

I've followed but not sure I understood what the bug is. But from my
various tries, I found a bug: when pressing 'j', the current span is
discarded.

Attached is a patch that should fix that, even for future use of
`org-agenda-list' with the span unspecified. :)

From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
From: Julien Danjou jul...@danjou.info
Date: Mon, 17 Jan 2011 16:05:28 +0100
Subject: [PATCH] Fix agenda span on date jump

* org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
possible default span if it is set.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-agenda.el |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 0cd620c..0d695b5 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3450,7 +3450,10 @@ given in `org-agenda-start-on-weekday'.
   (setq org-agenda-last-arguments (list include-all start-day span))
   (org-compile-prefix-format 'agenda)
   (org-set-sorting-strategy 'agenda)
-  (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays org-agenda-span)))
+  (let* ((span (org-agenda-ndays-to-span (or span
+	 org-agenda-current-span
+	 org-agenda-ndays
+	 org-agenda-span)))
 	 (today (org-today))
 	 (sd (or start-day today))
 	 (ndays (org-agenda-span-to-ndays span sd))
-- 
1.7.2.3


-- 
Julien Danjou
❱ http://julien.danjou.info


pgpzMOJh3HmBL.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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Julien Danjou
On Mon, Jan 17 2011, Julien Danjou wrote:

 Attached is a patch that should fix that, even for future use of
 `org-agenda-list' with the span unspecified. :)

This patch has a side effect for me: my org-agenda-span is set to 14,
and I've no way to reset it without quitting the agenda and requesting
it again.

I think we miss a keybinding to reset org-agenda-current-span to nil so
org-agenda-span get used again.

What do you think? Which key would be fine to reset the span?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpMeDCrNXroG.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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Carsten Dominik


On Jan 17, 2011, at 5:34 PM, Julien Danjou wrote:


On Mon, Jan 17 2011, Julien Danjou wrote:


Attached is a patch that should fix that, even for future use of
`org-agenda-list' with the span unspecified. :)


This patch has a side effect for me: my org-agenda-span is set to 14,
and I've no way to reset it without quitting the agenda and requesting
it again.

I think we miss a keybinding to reset org-agenda-current-span to nil  
so

org-agenda-span get used again.

What do you think? Which key would be fine to reset the span?


This should not be done with a key, but automatically in a clever  
way.  It used to work.


- Carsten

___
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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Julien Danjou
On Mon, Jan 17 2011, Carsten Dominik wrote:

 This should not be done with a key, but automatically in a clever way.  It
 used to work.

Well, it used to work very bad, that's why I rewrote that thing
initially. It was resetting too often to the default without any reason.

So could you define the clever way to me? :-)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpBMX1NWeXKX.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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Bernt Hansen
Julien Danjou jul...@danjou.info writes:

 On Mon, Jan 17 2011, Carsten Dominik wrote:

 have you been following this thread?  I think this has to do with your
 rewrite of the dagenda span stuff.  Maybe you can find out better and
 faster that I why this goes wrong?  Please read the entire thread.

 I've followed but not sure I understood what the bug is. But from my
 various tries, I found a bug: when pressing 'j', the current span is
 discarded.

 Attached is a patch that should fix that, even for future use of
 `org-agenda-list' with the span unspecified. :)

Hi Julien,

Thanks for this patch.  I think this fixes the issue I was having with
'j' in the agenda switching from week-view back to single-day view when
org-agenda-ndays is set to 1.

There is still a (new?) problem with jumping to today.

Set the following variable

(setq org-agenda-start-on-weekday 6)

| Key Sequence | Notes  |
|--+|
| C-c a a  | Display weekly agenda  |
| f| Go forward a week  |
| d| Display day agenda |
| .| Go to to day - but it goes to Saturday instead |

This should go to today and not the first day of the week.

Regards,
Bernt




 From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
 From: Julien Danjou jul...@danjou.info
 Date: Mon, 17 Jan 2011 16:05:28 +0100
 Subject: [PATCH] Fix agenda span on date jump

 * org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
 possible default span if it is set.

 Signed-off-by: Julien Danjou jul...@danjou.info
 ---
  lisp/org-agenda.el |5 -
  1 files changed, 4 insertions(+), 1 deletions(-)

 diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
 index 0cd620c..0d695b5 100644
 --- a/lisp/org-agenda.el
 +++ b/lisp/org-agenda.el
 @@ -3450,7 +3450,10 @@ given in `org-agenda-start-on-weekday'.
(setq org-agenda-last-arguments (list include-all start-day span))
(org-compile-prefix-format 'agenda)
(org-set-sorting-strategy 'agenda)
 -  (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays 
 org-agenda-span)))
 +  (let* ((span (org-agenda-ndays-to-span (or span
 +  org-agenda-current-span
 +  org-agenda-ndays
 +  org-agenda-span)))
(today (org-today))
(sd (or start-day today))
(ndays (org-agenda-span-to-ndays span sd))
 -- 
 1.7.2.3

___
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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Julien Danjou
On Mon, Jan 17 2011, Bernt Hansen wrote:

 This should go to today and not the first day of the week.

It does go on today. I cannot reproduce this problem (git version).

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpc5IrwFnPpi.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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Bernt Hansen
Julien Danjou jul...@danjou.info writes:

 On Mon, Jan 17 2011, Bernt Hansen wrote:

 This should go to today and not the first day of the week.

 It does go on today. I cannot reproduce this problem (git version).

This consistently does not work for me with the following setup:

~/bin/minimal.emacs
--8---cut here---start-8---
#!/bin/sh
TESTEL=
TESTFILE=/tmp/test.el
if test -e $TESTFILE
then
  TESTEL=-l /tmp/test.el
fi
emacs -q -l ~/minimal.emacs $TESTEL 
--8---cut here---end---8---

/tmp/test.el
--8---cut here---start-8---
(setq org-agenda-start-on-weekday 6)
--8---cut here---end---8---

~/minimal.emacs
--8---cut here---start-8---
(add-to-list 'load-path (expand-file-name ~/git/org-mode/lisp))
(add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . org-mode))
(require 'org-install)

(global-set-key \C-cl 'org-store-link)
(global-set-key \C-ca 'org-agenda)
(global-set-key \C-cb 'org-iswitchb)
--8---cut here---end---8---

Key sequence

$ minimal-emacs
| Key |
|-|
| C-c a a |
| f   |
| d   |
| .   |

Gives me

,
| Day-agenda (W02):
| Saturday   15 January 2011
`

Org-mode version 7.4 (release_7.4.203.g970db)
GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11
on raven, modified by Debian

Regards,
Bernt

___
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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Carsten Dominik


On Jan 17, 2011, at 5:54 PM, Julien Danjou wrote:


On Mon, Jan 17 2011, Bernt Hansen wrote:


This should go to today and not the first day of the week.


It does go on today. I cannot reproduce this problem (git version).


Bent has set org-agenda-start-on-weekday to 6

- Carsten


___
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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Julien Danjou
On Mon, Jan 17 2011, Bernt Hansen wrote:

 This consistently does not work for me with the following setup:

Ok, with org-agenda-span set to 'week, I've a strange behavior too.
I'll try to debug.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpKE7cqjTgAS.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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Julien Danjou
On Mon, Jan 17 2011, Bernt Hansen wrote:

 Thanks for this patch.  I think this fixes the issue I was having with
 'j' in the agenda switching from week-view back to single-day view when
 org-agenda-ndays is set to 1.

 There is still a (new?) problem with jumping to today.

 Set the following variable

 (setq org-agenda-start-on-weekday 6)

 | Key Sequence | Notes  |
 |--+|
 | C-c a a  | Display weekly agenda  |
 | f| Go forward a week  |
 | d| Display day agenda |
 | .| Go to to day - but it goes to Saturday instead |

 This should go to today and not the first day of the week.

Attached is a fix for that.

From f566a5612560f997f4760144ca850dda5c06bc5e Mon Sep 17 00:00:00 2001
From: Julien Danjou jul...@danjou.info
Date: Mon, 17 Jan 2011 18:09:30 +0100
Subject: [PATCH] Fix org-agenda-goto-today not respecting the current span.

* org-agenda.el (org-agenda-goto-today): Respect current span.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-agenda.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 0d695b5..241ed30 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6104,7 +6104,7 @@ Negative selection means regexp must not match for selection of an entry.
  (tdpos (goto-char tdpos))
  ((eq org-agenda-type 'agenda)
   (let* ((sd (org-agenda-compute-starting-span
-		  (org-today) (or org-agenda-ndays org-agenda-span)))
+		  (org-today) (or org-agenda-current-span org-agenda-ndays org-agenda-span)))
 	 (org-agenda-overriding-arguments org-agenda-last-arguments))
 	(setf (nth 1 org-agenda-overriding-arguments) sd)
 	(org-agenda-redo)
-- 
1.7.2.3


-- 
Julien Danjou
❱ http://julien.danjou.info


pgpHux5o3eAgP.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


Re: [Orgmode] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Bernt Hansen
Julien Danjou jul...@danjou.info writes:

 On Mon, Jan 17 2011, Bernt Hansen wrote:

 Thanks for this patch.  I think this fixes the issue I was having with
 'j' in the agenda switching from week-view back to single-day view when
 org-agenda-ndays is set to 1.

 There is still a (new?) problem with jumping to today.

 Set the following variable

 (setq org-agenda-start-on-weekday 6)

 | Key Sequence | Notes  |
 |--+|
 | C-c a a  | Display weekly agenda  |
 | f| Go forward a week  |
 | d| Display day agenda |
 | .| Go to to day - but it goes to Saturday instead |

 This should go to today and not the first day of the week.

 Attached is a fix for that.

Thanks Julien,

I think that fixes this issue for me.

Regards,
Bernt

___
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