Re: [O] Bug: problem with org-agenda and categories [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2018-07-11 Thread Nick Dokos
PSA:

This was discussed on the list and the outcome was that it is not a bug.
The OP misused the CATEGORY keyword in a way that has been deprecated since 
2008.
Here's a version of the OP's file that behaves as expected.

More details about the CATEGORY changes and the deprecation can be found at

https://code.orgmode.org/bzg/org-mode/src/master/etc/ORG-NEWS#L1642

N.B. There are CATEGORY properties under each heading (and since
property drawers are only recognized immediately after a heading
(modulo scheduling information), the new headings are mandatory:

--8<---cut here---start->8---
* the world cup on my agenda

** group stage
:PROPERTIES:
:CATEGORY: groups
:END:
%%(diary-block 6 22 2018 6 22 2018) 7:00 wc: brazil - costa rica (sans 
petersburgo){GE2}
%%(diary-block 6 22 2018 6 22 2018) 10:00 wc: nigeria - islanda 
(volgogrado){GD2}
%%(diary-block 6 22 2018 6 22 2018) 13:00 wc: serbia - suiza (kaliningrado){GE2}
%%(diary-block 6 23 2018 6 23 2018) 07:00 wc: belgica - tunez (otkrytiye, 
moscu){GG2}
%%(diary-block 6 23 2018 6 23 2018) 10:00 wc: mexico - korea (rostov){GF2}
%%(diary-block 6 23 2018 6 23 2018) 13:00 wc: alemania - suecia (sochi){GF2}
%%(diary-block 6 24 2018 6 24 2018) 07:00 wc: inglaterra - panama (nizhny){GG2}
%%(diary-block 6 24 2018 6 24 2018) 10:00 wc: japon - senegal 
(ekaterimburgo){GH2}
%%(diary-block 6 24 2018 6 24 2018) 13:00 wc: colombia - polonia (kazán){GH2}
%%(diary-block 6 25 2018 6 25 2018) 09:00 wc: uruguay - rusia (samara){GA3}
%%(diary-block 6 25 2018 6 25 2018) 09:00 wc: egipto - arabia (volgogrado){GA3}
%%(diary-block 6 25 2018 6 25 2018) 13:00 wc: portugal - iran (saransk){GB3}
%%(diary-block 6 25 2018 6 25 2018) 13:00 wc: espanha - marruecos 
(kaliningrado){GB3}
%%(diary-block 6 26 2018 6 26 2018) 09:00 wc: Dinamarca - francia (luzhniki, 
moscu){GC3}
%%(diary-block 6 26 2018 6 26 2018) 09:00 wc: PERÙ - australia (sochi){GC3}
%%(diary-block 6 26 2018 6 26 2018) 13:00 wc: argentina - nigeria (san 
petersburgo){GD3}
%%(diary-block 6 26 2018 6 26 2018) 13:00 wc: croacia - islandia (rostov){GD3}
%%(diary-block 6 27 2018 6 27 2018) 09:00 wc: corea - alemania (kazán){GF3}
%%(diary-block 6 27 2018 6 27 2018) 09:00 wc: mexico - suecia 
(ekaterimburgo){GF3}
%%(diary-block 6 27 2018 6 27 2018) 13:00 wc: brazil - serbia (otkrytiye, 
moscu){GE3}
%%(diary-block 6 27 2018 6 27 2018) 13:00 wc: suiza - costa rica  (nizhny){GE3}
%%(diary-block 6 28 2018 6 28 2018) 09:00 wc: polonia - japon (volgogrado){GH3}
%%(diary-block 6 28 2018 6 28 2018) 09:00 wc: colombia - senegal (samara){GH3}
%%(diary-block 6 28 2018 6 28 2018) 13:00 wc: inglaterra - belgica 
(kaliningrado){GG3}
%%(diary-block 6 28 2018 6 28 2018) 13:00 wc: panama - tunez (saransk){GG3}

** 16
:PROPERTIES:
:CATEGORY: 8
:END:
%%(diary-block 6 30 2018 6 30 2018) 09:00 wc: 1cFrancia - 2dArgentina 
(kazán){16}
%%(diary-block 6 30 2018 6 30 2018) 13:00 wc: 1aUruguay -2bPortugal (sochi){16}
%%(diary-block 7 01 2018 7 01 2018) 09:00 wc: 2aRusia - 1bEspaña (moscu){16}
%%(diary-block 7 01 2018 7 01 2018) 13:00 wc: 2cDinamarca - 1dCroacia 
(nizhny){16}
%%(diary-block 7 02 2018 7 02 2018) 09:00 wc: 1eBrazil - 2fMexico (samara){16}
%%(diary-block 7 02 2018 7 02 2018) 13:00 wc: 1gBelgica - 2hJapon (rostov){16}
%%(diary-block 7 03 2018 7 03 2018) 09:00 wc: 2eSuiza - 1fSuecia (san 
petersburgo){16}
%%(diary-block 7 03 2018 7 03 2018) 13:00 wc: 2gInglaterra - 1hColombia 
(moscu){16}

** 8
:PROPERTIES:
:CATEGORY: 4
:END:
%%(diary-block 7 06 2018 7 06 2018) 09:00 wc: 1qfFrancia - 2qfUruguay 
(nizhny){4}
%%(diary-block 7 06 2018 7 06 2018) 13:00 wc: 5qfBrasil - 6qfBelgica (kazán){4}
%%(diary-block 7 07 2018 7 07 2018) 09:00 wc: 7qfRusia - 8qfCrocia (samara){4}
%%(diary-block 7 07 2018 7 07 2018) 13:00 wc: 3qfSuecia - 4qfInglaterra 
(sochi){4}

** Semifinal
:PROPERTIES:
:CATEGORY: semi-final
:END:
%%(diary-block 7 10 2018 7 10 2018) 09:00 wc: 1sf - 2sf (san petersburgo){SF}
%%(diary-block 7 11 2018 7 11 2018) 09:00 wc: 3sf - 4sf (moscu){SF}

** Final
:PROPERTIES:
:CATEGORY: final
:END:
%%(diary-block 7 14 2018 7 14 2018) 09:00 wc: 1p - 2p (san petersburgo){F}
%%(diary-block 7 15 2018 7 15 2018) 09:00 wc: 1f - 2f (luzhniki, moscu){F}
--8<---cut here---end--->8---

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




[O] Bug: problem with org-agenda and categories [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2018-07-11 Thread rrandresf


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


When evaluating the snippet below:
--8<---cut here---start->8---
(eval-after-load "org"
  '(progn
 overwrite some settings
 (setq org-startup-folded nil ;unfolded
   org-agenda-show-all-dates t
   org-confirm-elisp-link-function nil ;; 4 the scratch call
   org-agenda-include-diary t
   org-agenda-include-all-todo t
   )
 (when (file-directory-p "~/docs/org/deft/")
   (setq org-agenda-files (directory-files "~/docs/org/deft/" t 
".*agendatest\.org$"))
   )
 (define-key org-mode-map (kbd "M-a") nil)
 ))

(require 'org)

(funcall 'org-agenda-list)
--8<---cut here---end--->8---

I am getting (which is not fine):
--8<---cut here---start->8---
Week-agenda (W27):
Monday  2 July 2018 W27
  final:   9:00.. wc: 1eBrazil - 2fMexico (samara){16}
  final:  13:00.. wc: 1gBelgica - 2hJapon (rostov){16}
Tuesday 3 July 2018
  final:   9:00.. wc: 2eSuiza - 1fSuecia (san petersburgo){16}
  final:  13:00.. wc: 2gInglaterra - 1hColombia (moscu){16}
Wednesday   4 July 2018
  Diary:  Independence Day
Thursday5 July 2018
Friday  6 July 2018
   0:38.. now - - - - - - - - - - - - - - - - - - - - - - - - -
   8:00.. 
  final:   9:00.. wc: 1qfFrancia - 2qfUruguay (nizhny){4}
  10:00.. 
  12:00.. 
  final:  13:00.. wc: 5qfBrasil - 6qfBelgica (kazán){4}
  14:00.. 
  16:00.. 
  18:00.. 
  20:00.. 
Saturday7 July 2018
  final:   9:00.. wc: 7qfRusia - 8qfCrocia (samara){4}
  final:  13:00.. wc: 3qfSuecia - 4qfInglaterra (sochi){4}
Sunday  8 July 2018
--8<---cut here---end--->8---

the output should be:
--8<---cut here---start->8---
Week-agenda (W27):
Monday  2 July 2018 W27
  8:   9:00.. wc: 1eBrazil - 2fMexico (samara){16}
  8:  13:00.. wc: 1gBelgica - 2hJapon (rostov){16}
Tuesday 3 July 2018
  8:   9:00.. wc: 2eSuiza - 1fSuecia (san petersburgo){16}
  8:  13:00.. wc: 2gInglaterra - 1hColombia (moscu){16}
Wednesday   4 July 2018
  Diary:  Independence Day
Thursday5 July 2018
Friday  6 July 2018
  4:   9:00.. wc: 1qfFrancia - 2qfUruguay (nizhny){4}
  4:  13:00.. wc: 5qfBrasil - 6qfBelgica (kazán){4}
Saturday7 July 2018
  4:   9:00.. wc: 7qfRusia - 8qfCrocia (samara){4}
  4:  13:00.. wc: 3qfSuecia - 4qfInglaterra (sochi){4}
Sunday  8 July 2018
--8<---cut here---end--->8---

the file ~/docs/org/deft/jl-diary.agendatest.org:
--8<---cut here---start->8---
* the world cup on my agenda
#+CATEGORY: groups
%%(diary-block 6 22 2018 6 22 2018) 7:00 wc: brazil - costa rica (sans 
petersburgo){GE2}
%%(diary-block 6 22 2018 6 22 2018) 10:00 wc: nigeria - islanda 
(volgogrado){GD2}
%%(diary-block 6 22 2018 6 22 2018) 13:00 wc: serbia - suiza (kaliningrado){GE2}
%%(diary-block 6 23 2018 6 23 2018) 07:00 wc: belgica - tunez (otkrytiye, 
moscu){GG2}
%%(diary-block 6 23 2018 6 23 2018) 10:00 wc: mexico - korea (rostov){GF2}
%%(diary-block 6 23 2018 6 23 2018) 13:00 wc: alemania - suecia (sochi){GF2}
%%(diary-block 6 24 2018 6 24 2018) 07:00 wc: inglaterra - panama (nizhny){GG2}
%%(diary-block 6 24 2018 6 24 2018) 10:00 wc: japon - senegal 
(ekaterimburgo){GH2}
%%(diary-block 6 24 2018 6 24 2018) 13:00 wc: colombia - polonia (kazán){GH2}
%%(diary-block 6 25 2018 6 25 2018) 09:00 wc: uruguay - rusia (samara){GA3}
%%(diary-block 6 25 2018 6 25 2018) 09:00 wc: egipto - arabia (volgogrado){GA3}
%%(diary-block 6 25 2018 6 25 2018) 13:00 wc: portugal - iran (saransk){GB3}
%%(diary-block 6 25 2018 6 25 2018) 13:00 wc: espanha - marruecos 
(kaliningrado){GB3}
%%(diary-block 6 26 2018 6 26 2018) 09:00 wc: Dinamarca - francia (luzhniki, 
moscu){GC3}
%%(diary-block 6 26 2018 6 26 2018) 09:00 wc: PERÙ - australia (sochi){GC3}
%%(diary-block 6 26 2018 6 26 2018) 13:00 wc: argentina - nigeria (san 
petersburgo){GD3}
%%(diary-block 6 26 2018 6 26 2018) 13:00 wc: croacia - islandia (rostov){GD3}
%%(diary-block 6 27 2018 6 27 2018) 09:00 wc: corea - alemania (kazán){GF3}
%%(diary-block 6 27 2018 6 27 2018) 09:00 wc: mexico - suecia 
(ekaterimburgo){GF3}
%%(diary-block 6 27 2018 6 27