Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-19 Thread peter . frings
Good morning gents,

I think you nailed it. Thanks!


* Summary
Having the todo list in a daily view is very convenient, but not provided 
out-of-the-box. The enabling of it used to be relatively simply with a single 
variable, but in more recent version it’s now reserved for org-savvy people. 
Hooray for http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html


* What the problem was
In Emacs 7.7, the variable org-agenda-include-all-todo no longer affects the 
daily/weekly view as documented. 

** org-agenda-include-all-todo no longer works
The docstrings states:

 docstring 
Set  means weekly/daily agenda will always contain all TODO entries.
The TODO entries will be listed at the top of the agenda, before
the entries for specific days.
This option is deprecated, it is better to define a block agenda instead.


Note that it says it’s deprecated, but it’s still present and describes the 
behavior I was used to. But it doesn’t. Which is in-line what what Puneeth 
mentioned (commit 770c2ddfba5c173d1b33e7b247b49a8188994f76).


** Terminology
Notice that org-agenda-include-all-todo’s docstring mentions ‘block agenda’, as 
does the ‘Agenda View’ chapter in the manual. But that term is nowhere to be 
found in Org’s customization options. You must first find ‘Agenda Custom 
Commands’, but there the docstring mentions “You can also define a set of 
commands, to create a __composite agenda__ buffer.” So there is a problem of 
terminology here.


* Thoughts
I do question this change a bit. I find it very convenient to have my to-do’s 
(scheduled or not) in my day view. Now, I must make a block agenda to get this. 
OK, I can handle that. However, out-of-the box behavior should suit beginners, 
and asking them to make a block agenda as the first thing to do is a bit heavy, 
no? (Have you seen the customization page for that? Frightening!)

So, to get what I used to have[1] I need to define a custom view like this:

(setq org-agenda-custom-commands
   '((h All to-do's and Agenda
  ((alltodo)
   (agenda )

[1] It’s not identical because of the block headers, but that might be 
something that is customizable. Haven’t checked it yet. 

Also, in the older version you could type `d’ or `w' to switch to day or week 
view from anywhere in the buffer; now you must make sure the cursor is on the 
agenda black and not in the todo black. This is a bit annoying.



* Example
Using GNU Emacs 23.3.1

The example uses the todo list from Suvayu’s mail:
 ~/planning/minimal.org 
 * TODO Plumber to fix leak
  2011-08-04 Thu
 
 * TODO RooStats tutorial
  SCHEDULED: 2011-01-25 Tue 09:00
 
 * TODO Analysis deadline
  DEADLINE: 2011-08-19 Fri 15:00

 * TODO Read Dune
  The above 3 entries show up in the agenda, but this one doesn’t.


And a minimal emacs init  file:
 ~/.emacs-minimal 
(add-to-list 'auto-mode-alist '(\\.\\(org\\  |org_archive\\|txt\\)$ . 
org-mode))
(setq org-agenda-files '(~/planning/minimal.org))
(require 'org-install)
(require 'org-habit)

(global-set-key \C-ca 'org-agenda)


Start with
/Applications/Emacs.app/Contents/MacOS/Emacs --debug-init -Q -l ~/.emacs-minimal


** Behavior with Org 6.33x
Org-mode 6.33x as version with Emacs 23)

*** ‘out of the box’ setup

Do `C-c a a’

Weekly agenda shows=
Week-agenda (W33):
Monday 15 August 2011 W33
Tuesday16 August 2011
Wednesday  17 August 2011
Thursday   18 August 2011
Friday 19 August 2011
   8:00.. 
  10:00.. 
  12:00.. 
  14:00.. 
  minimal:15:00.. Deadline:   TODO Analysis deadline
  16:00.. 
  18:00.. 
  20:00.. 
  minimal:Sched.207x:  TODO RooStats tutorial
Saturday   20 August 2011
Sunday 21 August 2011
-

Daily agenda shows=
Day-agenda (W33):
Friday 19 August 2011
   8:00.. 
  10:00.. 
  12:00.. 
  14:00.. 
  minimal:15:00.. Deadline:   TODO Analysis deadline
  16:00.. 
  18:00.. 
  20:00.. 
  minimal:Sched.207x:  TODO RooStats tutorial


*** To include the TODO items
Add this to the init file (or evaluate):

(setq org-agenda-include-all-todo t)


Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-19 Thread Carsten Dominik

On Aug 19, 2011, at 11:02 AM, peter.fri...@agfa.com wrote:

 Good morning gents,
 
 I think you nailed it. Thanks!
 
 
 * Summary
 Having the todo list in a daily view is very convenient, but not provided 
 out-of-the-box. The enabling of it used to be relatively simply with a single 
 variable, but in more recent version it’s now reserved for org-savvy people. 
 Hooray for 
 http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html


OK, I am attaching a patch proposal which will clean this up a bit.
It does:

- Clean up the variable name include-all, which is confusing
  for readers of the code
- Make `org-agenda-custom-commands' have a default value,
  which is a block that does put agenda and TODO list into
  one view.  Note that I have changed the sequence from Peter's
  proposal, I am putting the agenda first - this makes more sense,
  I think, and also reduces the likelihood that the cursor will be
  in the TODO list when you are trying to move through time.
- I have *not* changes the problem that trying to change time views
  in the TODO block will not work - this would have required
  more coding and would create undefined behavior in some block
  agendas.

HTH, please give me feed back.  Bastien, let me know if/when
I should push this change.

Cheers

- Carsten



agenda-include-all.patch
Description: Binary data

 
 
 * What the problem was
 In Emacs 7.7, the variable org-agenda-include-all-todo no longer affects the 
 daily/weekly view as documented. 
 
 ** org-agenda-include-all-todo no longer works
 The docstrings states:
 
  docstring 
 Set  means weekly/daily agenda will always contain all TODO entries.
 The TODO entries will be listed at the top of the agenda, before
 the entries for specific days.
 This option is deprecated, it is better to define a block agenda instead.
 
 
 Note that it says it’s deprecated, but it’s still present and describes the 
 behavior I was used to. But it doesn’t. Which is in-line what what Puneeth 
 mentioned (commit 770c2ddfba5c173d1b33e7b247b49a8188994f76).
 
 
 ** Terminology
 Notice that org-agenda-include-all-todo’s docstring mentions ‘block agenda’, 
 as does the ‘Agenda View’ chapter in the manual. But that term is nowhere to 
 be found in Org’s customization options. You must first find ‘Agenda Custom 
 Commands’, but there the docstring mentions “You can also define a set of 
 commands, to create a __composite agenda__ buffer.” So there is a problem of 
 terminology here.
 
 
 * Thoughts
 I do question this change a bit. I find it very convenient to have my to-do’s 
 (scheduled or not) in my day view. Now, I must make a block agenda to get 
 this. OK, I can handle that. However, out-of-the box behavior should suit 
 beginners, and asking them to make a block agenda as the first thing to do is 
 a bit heavy, no? (Have you seen the customization page for that? Frightening!)
 
 So, to get what I used to have[1] I need to define a custom view like this:
 
 (setq org-agenda-custom-commands
   '((h All to-do's and Agenda
  ((alltodo)
  (agenda )
 
 [1] It’s not identical because of the block headers, but that might be 
 something that is customizable. Haven’t checked it yet. 
 
 Also, in the older version you could type `d’ or `w' to switch to day or week 
 view from anywhere in the buffer; now you must make sure the cursor is on the 
 agenda black and not in the todo black. This is a bit annoying.
 
 
 
 * Example
 Using GNU Emacs 23.3.1
 
 The example uses the todo list from Suvayu’s mail:
  ~/planning/minimal.org 
 * TODO Plumber to fix leak
  2011-08-04 Thu
 
 * TODO RooStats tutorial
  SCHEDULED: 2011-01-25 Tue 09:00
 
 * TODO Analysis deadline
  DEADLINE: 2011-08-19 Fri 15:00
 
 * TODO Read Dune
  The above 3 entries show up in the agenda, but this one doesn’t.
 
 
 And a minimal emacs init  file:
  ~/.emacs-minimal 
 (add-to-list 'auto-mode-alist '(\\.\\(org\\  |org_archive\\|txt\\)$ . 
 org-mode))
 (setq org-agenda-files '(~/planning/minimal.org))
 (require 'org-install)
 (require 'org-habit)
 
 (global-set-key \C-ca 'org-agenda)
 
 
 Start with
 /Applications/Emacs.app/Contents/MacOS/Emacs --debug-init -Q -l 
 ~/.emacs-minimal
 
 
 ** Behavior with Org 6.33x
 Org-mode 6.33x as version with Emacs 23)
 
 *** ‘out of the box’ setup
 
 Do `C-c a a’
 
 Weekly agenda shows=
 Week-agenda (W33):
 Monday 15 August 2011 W33
 Tuesday16 August 2011
 Wednesday  17 August 2011
 Thursday   18 August 2011
 Friday 19 August 2011
   8:00.. 
  10:00.. 
  12:00.. 
  

Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-19 Thread Peter Frings
Hello Carsten,


On 19 Aug 2011, at 11:59, Carsten Dominik wrote:

 The two main issues you are having are these:
 
 1. There is no simple way for beginners to get both TODO and agenda in one 
 view
 2. Moving through time does not work in a block view when the cursor is in 
 the TODO list.

A third one would be the docstring of org-agenda-include-all-todo set, 
suggesting that it still works. If there is no intention to revive it, I’d 
suggest to simply remove the entire variable.

About issue 1, there could be a standard, ready-for-use custom command. But 
don’t bother if I’m the only one that finds it convenient.

Fixing 2 would be great. Maybe there are other keystrokes that can be delegated 
to other blocks (e.g. in order of appearance) if the currently-focussed block 
doesn’t handle them?



Cheers,
Peter.
-- 
c++; // this makes c bigger but returns the old value




Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-19 Thread Bastien
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com writes:

 OK, I am attaching a patch proposal which will clean this up a bit.

Thanks for tackling these issues -- I can't read the patch thourh, 
as it is just two lines long, can you resent it? 

 It does:

 - Clean up the variable name include-all, which is confusing
   for readers of the code
 - Make `org-agenda-custom-commands' have a default value,
   which is a block that does put agenda and TODO list into
   one view.  Note that I have changed the sequence from Peter's
   proposal, I am putting the agenda first - this makes more sense,
   I think, and also reduces the likelihood that the cursor will be
   in the TODO list when you are trying to move through time.
 - I have *not* changes the problem that trying to change time views
   in the TODO block will not work - this would have required
   more coding and would create undefined behavior in some block
   agendas.

 HTH, please give me feed back.  Bastien, let me know if/when
 I should push this change.

I'll test it this afternoon.

Best,

-- 
 Bastien



Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-19 Thread Carsten Dominik

On Aug 19, 2011, at 3:08 PM, Bastien wrote:

 Hi Carsten,
 
 Carsten Dominik carsten.domi...@gmail.com writes:
 
 OK, I am attaching a patch proposal which will clean this up a bit.
 
 Thanks for tackling these issues -- I can't read the patch thourh, 
 as it is just two lines long, can you resent it? 


Strange.  Here it is again:



agenda-include-all.patch
Description: Binary data




 
 It does:
 
 - Clean up the variable name include-all, which is confusing
  for readers of the code
 - Make `org-agenda-custom-commands' have a default value,
  which is a block that does put agenda and TODO list into
  one view.  Note that I have changed the sequence from Peter's
  proposal, I am putting the agenda first - this makes more sense,
  I think, and also reduces the likelihood that the cursor will be
  in the TODO list when you are trying to move through time.
 - I have *not* changes the problem that trying to change time views
  in the TODO block will not work - this would have required
  more coding and would create undefined behavior in some block
  agendas.
 
 HTH, please give me feed back.  Bastien, let me know if/when
 I should push this change.
 
 I'll test it this afternoon.
 
 Best,
 
 -- 
 Bastien

- Carsten





Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-19 Thread Bastien
Carsten Dominik carsten.domi...@gmail.com writes:

 Strange.  Here it is again:

Thanks -- please go ahead!

(Good to get rid of include-all, I stumbled on this while 
debugging the agenda a while ago...)

Best,

-- 
 Bastien



Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-19 Thread Viktor Rosenfeld
Carsten Dominik wrote:

 2. Moving through time does not work in a block view when the cursor is in 
 the TODO list.
 
 Maybe we can find ways to address these two issues?  For example, including a 
 built-in command
 for this double view, or seeding org-agenda-custom-commands with this 
 particular block?
 
 The 2. issue comes about because in a bock agenda, org only update the
 local block to save time, and in a TODO list it does not make sense to
 move through time.  This could be fixed by checking for an agenda
 block and updating that one instead.  I will take a look at this and
 make a proposal.

This would be very nice indeed. Right now, one has to jump back to the
beginning of the buffer, which is somewhat irritating.

Cheers,
Viktor



Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-18 Thread suvayu ali
Hi Peter,

This is quite an extensive setup. What do you get with only the
following options:

(setq org-agenda-files
  '(~/planning/planning.org ~/planning/todo.org
~/planning/notes.org ~/planning/time-sheet.org)
  org-agenda-include-diary t
  org-todo-keywords
  '((sequence TODO(t) BUSY(b) WAITING(w) |
  DONE(d) CANCELLED(c) POSTPONED(p

I think your best bet is to try to isolate which part of your setup is
interfering. I would start with the most basic setup and systematically
add more until I hit the problem.

GL

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-18 Thread peter . frings
Hi Suvayu,

 This is quite an extensive setup. What do you get with only the
 following options:
[remainder at end]

I have removed all customizations, started with an empty org-agenda-files list, 
opened my main planning file and added it to the agenda list. That’s about the 
most basic setup I can get. I do have the logged work now, that is already 
something, but still no TODO items on the current day (in day view). Oh, BTW, 
the Agenda TODO list shows all todo items… go figure!

I switched on 'Org Agenda Include All Todo’, although the description says I 
should better use a block agenda. However, the ‘out of the box’ agenda should 
show the TODO items, no?


I restored my previous set-up and voila, all was there. Grrr. Note that I 
mistakenly reported org-mode’s version of previous setup (with Carbon Emacs) as 
6.6; it’s actually 7.4.


I’ll compare the two set-ups to see if there’s anything obvious (I did that 
already, but having a second look never hurts).

Thanks,
Peter.


[Remainder…]
 
 (setq org-agenda-files
  '(~/planning/planning.org ~/planning/todo.org
   ~/planning/notes.org ~/planning/time-sheet.org)
  org-agenda-include-diary t
  org-todo-keywords
  '((sequence TODO(t) BUSY(b) WAITING(w) |
  DONE(d) CANCELLED(c) POSTPONED(p
 
 I think your best bet is to try to isolate which part of your setup is
 interfering. I would start with the most basic setup and systematically
 add more until I hit the problem.
 
 GL
 
 -- 
 Suvayu
 
 Open source is the future. It sets us free.




Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-18 Thread suvayu ali
Hello Peter,

On Thu, Aug 18, 2011 at 6:36 PM,  peter.fri...@agfa.com wrote:
 I have removed all customizations, started with an empty
 org-agenda-files list, opened my main planning file and added it to
 the agenda list. That’s about the most basic setup I can get. I do
 have the logged work now, that is already something, but still no TODO
 items on the current day (in day view). Oh, BTW, the Agenda TODO list
 shows all todo items… go figure!


It might be helpful to know how your TODO entries are formatted. Maybe
its not the setup, but how the agenda files are formatted that was
causing the issue?

In any case, good to hear it is resolved now.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-18 Thread peter . frings
Hi Suvayu,

On 18 Aug 2011, at 18:44, suvayu ali wrote:

 It might be helpful to know how your TODO entries are formatted. Maybe
 its not the setup, but how the agenda files are formatted that was
 causing the issue?
 
 In any case, good to hear it is resolved now.

That’s the problem, the issue is *not* resolved… the todo items show up in the 
global todo list, but still not in the daily agenda view.

So I believe the TODO items are formatted `according to spec’ :-).
E.g., “** TODO Fix the daily agenda view”.

I tried the really minimal set-up, as documented on worg [1], and as it is it 
is not showing TODO items in the agenda, either. But when I switch on 'Org 
Agenda Include All Todo’, it does! With the same agenda files (thus I really 
assume they’re properly formatted). So, one step closer… but no cigar.

I’m now comparing the org settings between the two set-ups (as included in the 
org bug report facility), but I don’t notice anything obvious… it’s 
frustrating! But tomorrow is another day, and maybe with a fresh mind… who 
knows?


Thanks!
Peter.

[1] http://orgmode.org/worg/org-faq.html


Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-18 Thread Puneeth Chaganti
On Thu, Aug 18, 2011 at 11:11 PM,  peter.fri...@agfa.com wrote:
 Hi Suvayu,

 On 18 Aug 2011, at 18:44, suvayu ali wrote:

 It might be helpful to know how your TODO entries are formatted. Maybe
 its not the setup, but how the agenda files are formatted that was
 causing the issue?

 In any case, good to hear it is resolved now.

 That’s the problem, the issue is *not* resolved… the todo items show up in 
 the global todo list, but still not in the daily agenda view.

As far as I understand, this has been changed. Agenda view doesn't
show the TODO list anymore, by default.  Look at the following commit
for details.

--
commit 770c2ddfba5c173d1b33e7b247b49a8188994f76
Author: Bernt Hansen be...@norang.ca
Date:   Tue Apr 5 01:05:43 2011 +

Remove obsolete functionality to add todo list in front of agenda

* lisp/org-agenda.el: Remove obsolete code for adding todo list in front
of the agenda

Todo lists should be built with the TODO list or a block agenda instead.

This code was triggered for C-u R in block agendas which is used to
limit the clock report to the current tags filter applied to the
agenda.


HTH,
Puneeth



Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-18 Thread Sebastien Vauban
Hi Peter and Puneeth,

Puneeth Chaganti wrote:
 On Thu, Aug 18, 2011 at 11:11 PM,  peter.fri...@agfa.com wrote:
 Hi Suvayu,

 On 18 Aug 2011, at 18:44, suvayu ali wrote:

 It might be helpful to know how your TODO entries are formatted. Maybe
 its not the setup, but how the agenda files are formatted that was
 causing the issue?

 In any case, good to hear it is resolved now.

 That’s the problem, the issue is *not* resolved… the todo items show up in
 the global todo list, but still not in the daily agenda view.

 As far as I understand, this has been changed. Agenda view doesn't
 show the TODO list anymore, by default.  Look at the following commit
 for details.

Are we talking of SCHEDULED TODO's or not?

Peter, can you provide a minimal but complete example of what are your source
files, and your current vs expected agenda view?

Just one or two items should be sufficient to express your point, and let
people really understand your problem. I mean, I'm not totally sure to
understand the real problem you experience.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] missing todo's in agenda after emacs/org upgrade

2011-08-18 Thread suvayu ali
Hi Peter,

On Thu, Aug 18, 2011 at 7:41 PM,  peter.fri...@agfa.com wrote:
 So I believe the TODO items are formatted `according to spec’ :-).
 E.g., “** TODO Fix the daily agenda view”.

I don't think the present version of org will show an entry in the
agenda unless you have an active timestamp. To give you an example:


* TODO Plumber to fix leak
  2011-08-04 Thu

* TODO RooStats tutorial
  SCHEDULED: 2011-01-25 Tue 09:00

* TODO Analysis deadline
  DEADLINE: 2011-08-19 Fri 15:00

* TODO Read Dune
  The above 3 entries show up in the agenda, but this one doesn't.


Actually to show up in the agenda, the TODO keyword is not necessary. It
depends solely on the timestamp and you get reminders based on whether
its a regular timestamp, SCHEDULED timestamp or a DEADLINE.

I hope this helps. If you still have issues, please follow what Seb
suggested and post a minimal example which demonstrates the behaviour
you describe.

GL

-- 
Suvayu

Open source is the future. It sets us free.