emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Agenda: Sorting TODOs (with tags) by effort does not work [8.3.6 (8.3.6-7-g4d7d52-elpaplus @ /home/luke/.emacs.d/elpa/org-plus-contrib-20161010/)]
       [not found] <731855708.9597170.1476354491314.ref@mail.yahoo.com>
@ 2016-10-13 10:28 ` Luke
  2016-10-16 19:32   ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Luke @ 2016-10-13 10:28 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

I have the following custom agenda command set up:

===================================================
(setq org-agenda-custom-commands
      '(("x" "TODOs sorted by effort" todo "TODO"
     ((org-agenda-sorting-strategy
       '(effort-down))))))
===================================================

I would expect this to show me all my current TODOs, sorted by the
EFFORT property (in descending order).

I also have the following org-mode file:

===================================================
* TASKS
** TODO Task 1
   :PROPERTIES:
   :Effort:   0:02
   :END:
** TODO Task 2
   :PROPERTIES:
   :Effort:   0:10
   :END:
** TODO Task 3
   :PROPERTIES:
   :Effort:   0:30
   :END:
** TODO Task 4
   :PRyOPERTIES:
   :Effort:   0:05
   :END:
===================================================

When I execute the agenda command (M-x org-agenda RET x), then I get the
following result (as expected):

===================================================
Global list of TODO items of type: TODO
Available with `N r': (0)[ALL] (1)TODO (2)DONE
  gtd:        TODO Task 3
  gtd:        TODO Task 2
  gtd:        TODO Task 4
  gtd:        TODO Task 1
===================================================

*However*, then I add some tags to the TODO items, such as the
following:
 
===================================================
* TASKS
** TODO Task 1
   :PROPERTIES:
   :Effort:   0:02
   :END:
** TODO Task 2                :MY_TAG:
   :PROPERTIES:
   :Effort:   0:10
   :END:
** TODO Task 3
   :PROPERTIES:
   :Effort:   0:30
   :END:
** TODO Task 4                :@ONLINE:
   :PROPERTIES:
   :Effort:   0:05
   :END:
===================================================

Now when I execute the same agenda command I get the following:

===================================================
Global list of TODO items of type: TODO
Available with `N r': (0)[ALL] (1)TODO (2)DONE
  gtd:        TODO Task 2               :MY_TAG:
  gtd:        TODO Task 4               :@ONLINE:
  gtd:        TODO Task 3
  gtd:        TODO Task 1
===================================================


I wouldn't expect the order of items in the agenda to change. However,
even though I haven't specified any tag-based sorting strategy, it seemsas if the tags are still having some effect on the way that the agenda
is sorted.

I tried this same exercise with an older version of Org (built in to
Emacs 24.5.1) and that version didn't exhibit the same unexpected
behaviour.


Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-17 on lgw01-04, modified by Debian
Package: Org-mode version 8.3.6 (8.3.6-7-g4d7d52-elpaplus @ /home/luke/.emacs.d/elpa/org-plus-contrib-20161010/)

current state:
==============
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe
              org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-custom-commands '(("x" "TODOs sorted by effort" todo "TODO"
                   ((org-agenda-sorting-strategy (quote (effort-down)))))
                  )
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
           [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
         #[nil "\300\301\302\303\304$\207"
           [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
         org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines
          org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-files '("~/gtd/gtd.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: Agenda: Sorting TODOs (with tags) by effort does not work [8.3.6 (8.3.6-7-g4d7d52-elpaplus @ /home/luke/.emacs.d/elpa/org-plus-contrib-20161010/)]
  2016-10-13 10:28 ` Bug: Agenda: Sorting TODOs (with tags) by effort does not work [8.3.6 (8.3.6-7-g4d7d52-elpaplus @ /home/luke/.emacs.d/elpa/org-plus-contrib-20161010/)] Luke
@ 2016-10-16 19:32   ` Nicolas Goaziou
  2016-10-17 10:44     ` Luke
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-10-16 19:32 UTC (permalink / raw)
  To: Luke; +Cc: emacs-orgmode@gnu.org

Hello,

Luke <mideniko1234-org@yahoo.co.uk> writes:

> I have the following custom agenda command set up:
>
> ===================================================
> (setq org-agenda-custom-commands
>       '(("x" "TODOs sorted by effort" todo "TODO"
>      ((org-agenda-sorting-strategy
>        '(effort-down))))))
> ===================================================
>
> I would expect this to show me all my current TODOs, sorted by the
> EFFORT property (in descending order).
>
> I also have the following org-mode file:
>
> ===================================================
> * TASKS
> ** TODO Task 1
>    :PROPERTIES:
>    :Effort:   0:02
>    :END:
> ** TODO Task 2
>    :PROPERTIES:
>    :Effort:   0:10
>    :END:
> ** TODO Task 3
>    :PROPERTIES:
>    :Effort:   0:30
>    :END:
> ** TODO Task 4
>    :PRyOPERTIES:
>    :Effort:   0:05
>    :END:
> ===================================================
>
> When I execute the agenda command (M-x org-agenda RET x), then I get the
> following result (as expected):
>
> ===================================================
> Global list of TODO items of type: TODO
> Available with `N r': (0)[ALL] (1)TODO (2)DONE
>   gtd:        TODO Task 3
>   gtd:        TODO Task 2
>   gtd:        TODO Task 4
>   gtd:        TODO Task 1
> ===================================================
>
> *However*, then I add some tags to the TODO items, such as the
> following:
>  
> ===================================================
> * TASKS
> ** TODO Task 1
>    :PROPERTIES:
>    :Effort:   0:02
>    :END:
> ** TODO Task 2                :MY_TAG:
>    :PROPERTIES:
>    :Effort:   0:10
>    :END:
> ** TODO Task 3
>    :PROPERTIES:
>    :Effort:   0:30
>    :END:
> ** TODO Task 4                :@ONLINE:
>    :PROPERTIES:
>    :Effort:   0:05
>    :END:
> ===================================================
>
> Now when I execute the same agenda command I get the following:
>
> ===================================================
> Global list of TODO items of type: TODO
> Available with `N r': (0)[ALL] (1)TODO (2)DONE
>   gtd:        TODO Task 2               :MY_TAG:
>   gtd:        TODO Task 4               :@ONLINE:
>   gtd:        TODO Task 3
>   gtd:        TODO Task 1
> ===================================================
>
>
> I wouldn't expect the order of items in the agenda to change. However,
> even though I haven't specified any tag-based sorting strategy, it seemsas if the tags are still having some effect on the way that the agenda
> is sorted.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: Agenda: Sorting TODOs (with tags) by effort does not work [8.3.6 (8.3.6-7-g4d7d52-elpaplus @ /home/luke/.emacs.d/elpa/org-plus-contrib-20161010/)]
  2016-10-16 19:32   ` Nicolas Goaziou
@ 2016-10-17 10:44     ` Luke
  2016-10-17 15:47       ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Luke @ 2016-10-17 10:44 UTC (permalink / raw)
  To: emacs-orgmode

On 16/10/16 20:32, Nicolas Goaziou wrote:
> Fixed. Thank you.

Thanks for that. Unfortunately, it doesn't seem to fix the issue I reported.

Provided the TODOs have no tags assigned, then I can sort them no 
problem. However, when I add tags to some of the TODOs, all the TODOs 
with tags appear at the top of the agenda. It's as if the tags are 
somehow overriding the sorting strategy.

Regards,
-- 
Luke

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: Agenda: Sorting TODOs (with tags) by effort does not work [8.3.6 (8.3.6-7-g4d7d52-elpaplus @ /home/luke/.emacs.d/elpa/org-plus-contrib-20161010/)]
  2016-10-17 10:44     ` Luke
@ 2016-10-17 15:47       ` Nicolas Goaziou
  2016-10-17 22:02         ` Luke
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-10-17 15:47 UTC (permalink / raw)
  To: Luke; +Cc: emacs-orgmode

Hello,

Luke <mideniko1234-org@yahoo.co.uk> writes:

> On 16/10/16 20:32, Nicolas Goaziou wrote:
>> Fixed. Thank you.
>
> Thanks for that. Unfortunately, it doesn't seem to fix the issue
> I reported.

Are you using development version? The fix landed there.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: Agenda: Sorting TODOs (with tags) by effort does not work [8.3.6 (8.3.6-7-g4d7d52-elpaplus @ /home/luke/.emacs.d/elpa/org-plus-contrib-20161010/)]
  2016-10-17 15:47       ` Nicolas Goaziou
@ 2016-10-17 22:02         ` Luke
  0 siblings, 0 replies; 5+ messages in thread
From: Luke @ 2016-10-17 22:02 UTC (permalink / raw)
  To: emacs-orgmode

On 17/10/16 16:47, Nicolas Goaziou wrote:
> Hello,
>
> Luke <mideniko1234-org@yahoo.co.uk> writes:
>
>> On 16/10/16 20:32, Nicolas Goaziou wrote:
>>> Fixed. Thank you.
>>
>> Thanks for that. Unfortunately, it doesn't seem to fix the issue
>> I reported.
>
> Are you using development version? The fix landed there.
>
> Regards,
>

My apologies, I incorrectly thought that the org-mode.org/elpa archive 
tracked the development version.

After using the git archive instead, everything seems to work correctly. 
Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-17 22:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <731855708.9597170.1476354491314.ref@mail.yahoo.com>
2016-10-13 10:28 ` Bug: Agenda: Sorting TODOs (with tags) by effort does not work [8.3.6 (8.3.6-7-g4d7d52-elpaplus @ /home/luke/.emacs.d/elpa/org-plus-contrib-20161010/)] Luke
2016-10-16 19:32   ` Nicolas Goaziou
2016-10-17 10:44     ` Luke
2016-10-17 15:47       ` Nicolas Goaziou
2016-10-17 22:02         ` Luke

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