emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: agenda interaction with org-agenda-dim-blocked-tasks, org-agenda-max-entries and org-enforce-todo-dependencies [8.3beta (release_8.3beta-785-gb5d9f4 @ /Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)]
@ 2015-02-02 20:55 Yuri Niyazov
  2015-02-03 21:13 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Yuri Niyazov @ 2015-02-02 20:55 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 3084 bytes --]

Consider the following org file:
* Tasks
** Ordered Tasks
:PROPERTIES:
:ORDERED:  t
:END:
*** TODO Module 1
**** TODO Item 1
SCHEDULED: <2015-02-01 Sun>
**** TODO Item 2
SCHEDULED: <2015-02-01 Sun>
*** TODO Module 2
**** TODO Item 3
SCHEDULED: <2015-02-01 Sun>
**** TODO Item 4
SCHEDULED: <2015-02-01 Sun>
** Other Tasks
*** TODO Random Task 1
SCHEDULED: <2015-02-01 Sun>
*** TODO Random Task 2
SCHEDULED: <2015-02-01 Sun>

What I would expect to happen: loading up the agenda shows four items:
Item 1, Item 2, Random Task 1, Random Task 2

What actually happens: The agenda shows only two items:
Item 1, Item 2.

This starts happening when org-agenda-dim-blocked-tasks is set to
invisible. What seems to happen is that the blocked tasks, even though
they are invisible, are still counted towards org-agenda-max-entries.


Emacs  : GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS
apple-appkit-1265.21)
 of 2014-10-22 on burry.local
Package: Org-mode version 8.3beta (release_8.3beta-785-gb5d9f4 @
/Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)

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-max-entries 4
 org-default-notes-file "Capture.org"
 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-agenda-dim-blocked-tasks 'invisible
 org-mode-hook '(org-clock-load
                 #[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
                 auto-indent-turn-on-org-indent)
 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-directory "~/dotfiles/org.emacs.d/org-files-debug/"
 org-enforce-todo-dependencies t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-hide-inline-tasks 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-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-agenda-files '("~/dotfiles/org.emacs.d/org-files-debug/")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

[-- Attachment #2: Type: text/html, Size: 4253 bytes --]

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

* Re: Bug: agenda interaction with org-agenda-dim-blocked-tasks, org-agenda-max-entries and org-enforce-todo-dependencies [8.3beta (release_8.3beta-785-gb5d9f4 @ /Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)]
  2015-02-02 20:55 Bug: agenda interaction with org-agenda-dim-blocked-tasks, org-agenda-max-entries and org-enforce-todo-dependencies [8.3beta (release_8.3beta-785-gb5d9f4 @ /Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)] Yuri Niyazov
@ 2015-02-03 21:13 ` Nicolas Goaziou
  2015-02-03 21:49   ` Yuri Niyazov
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-02-03 21:13 UTC (permalink / raw)
  To: Yuri Niyazov; +Cc: emacs-orgmode@gnu.org

Hello,

Yuri Niyazov <yuri.niyazov@gmail.com> writes:

> This starts happening when org-agenda-dim-blocked-tasks is set to
> invisible. What seems to happen is that the blocked tasks, even though
> they are invisible, are still counted towards org-agenda-max-entries.

AFAIU, even though they are invisible, the entries are somewhere in the
agenda view, and logically add up to the total. 

You may want to skip altogether blocked tasks instead.


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: agenda interaction with org-agenda-dim-blocked-tasks, org-agenda-max-entries and org-enforce-todo-dependencies [8.3beta (release_8.3beta-785-gb5d9f4 @ /Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)]
  2015-02-03 21:13 ` Nicolas Goaziou
@ 2015-02-03 21:49   ` Yuri Niyazov
  2015-02-03 22:12     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Yuri Niyazov @ 2015-02-03 21:49 UTC (permalink / raw)
  To: Yuri Niyazov, emacs-orgmode@gnu.org

On Tue, Feb 3, 2015 at 1:13 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> > This starts happening when org-agenda-dim-blocked-tasks is set to
> > invisible. What seems to happen is that the blocked tasks, even though
> > they are invisible, are still counted towards org-agenda-max-entries.
>
> AFAIU, even though they are invisible, the entries are somewhere in the
> agenda view, and logically add up to the total.

Yes, that seems to me the behavior I am seeing. Are you saying that
this is not a bug? It is certainly very surprising behavior. I had the
"make blocked tasks invisible" setting for months, and then only
recently started limiting the number of entries, so it took me quite
some time to figure out why I was seeing only, for example, 4 items in
the agenda when I was expecting to see 10 (which is where the
org-agenda-max-entries setting is) - the two settings are not
obviously related.

Also, this is inconsistent with other settings like
org-agenda-skip-deadline-if-done and
org-agenda-skip-deadline-prewarning-if-scheduled, which actively
remove items from the agenda view. I understand that the setting has
the verb "skip" rather than "dim" in it, but that's not enough of an
indicator up front to know that the two settings work differently when
it comes to counting towards the total.

> You may want to skip altogether blocked tasks instead.

What do you mean by that?

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

* Re: Bug: agenda interaction with org-agenda-dim-blocked-tasks, org-agenda-max-entries and org-enforce-todo-dependencies [8.3beta (release_8.3beta-785-gb5d9f4 @ /Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)]
  2015-02-03 21:49   ` Yuri Niyazov
@ 2015-02-03 22:12     ` Nicolas Goaziou
  2015-02-03 22:39       ` Yuri Niyazov
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-02-03 22:12 UTC (permalink / raw)
  To: Yuri Niyazov; +Cc: emacs-orgmode@gnu.org

Yuri Niyazov <yuri.niyazov@gmail.com> writes:

> Yes, that seems to me the behavior I am seeing. Are you saying that
> this is not a bug?

It doesn't look like one.

> It is certainly very surprising behavior. I had the "make blocked
> tasks invisible" setting for months, and then only recently started
> limiting the number of entries, so it took me quite some time to
> figure out why I was seeing only, for example, 4 items in the agenda
> when I was expecting to see 10 (which is where the
> org-agenda-max-entries setting is) - the two settings are not
> obviously related.

Documentation (e.g., docstrings) may be improved, then. Would you want
to suggest such an improvement?

> Also, this is inconsistent with other settings like
> org-agenda-skip-deadline-if-done and
> org-agenda-skip-deadline-prewarning-if-scheduled, which actively
> remove items from the agenda view. I understand that the setting has
> the verb "skip" rather than "dim" in it, but that's not enough of an
> indicator up front to know that the two settings work differently when
> it comes to counting towards the total.
>
>> You may want to skip altogether blocked tasks instead.
>
> What do you mean by that?

As you noticed, skipping is not the same as dimming. The latter is
purely visual. See `org-agenda-skip-function' to really skip tasks from
agenda, and probably `org-entry-blocked-p' to ignore blocked tasks.


Regards,

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

* Re: Bug: agenda interaction with org-agenda-dim-blocked-tasks, org-agenda-max-entries and org-enforce-todo-dependencies [8.3beta (release_8.3beta-785-gb5d9f4 @ /Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)]
  2015-02-03 22:12     ` Nicolas Goaziou
@ 2015-02-03 22:39       ` Yuri Niyazov
  2015-02-03 22:52         ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Yuri Niyazov @ 2015-02-03 22:39 UTC (permalink / raw)
  To: Yuri Niyazov, emacs-orgmode@gnu.org

On Tue, Feb 3, 2015 at 2:12 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Documentation (e.g., docstrings) may be improved, then. Would you want
> to suggest such an improvement?

In the docstring for "org-agenda-dim-blocked-tasks"

"Because dimming is not the same as skipping, items dimmed to
invisible count against the limits specified by org-agenda-max-*"

In the docstring for entries like org-agenda-max-entries and
org-agenda-max-todos

"If org-agenda-dim-blocked-tasks is set to invisible, those entries
will still count towards the limits specified by this setting."

> As you noticed, skipping is not the same as dimming. The latter is
> purely visual. See `org-agenda-skip-function' to really skip tasks from
> agenda, and probably `org-entry-blocked-p' to ignore blocked tasks.

I now think that having the ability to dim to invisible is a feature
mistake. I'm having a difficult time seeing when a user would want to
dim to invisible purely visually, rather than really skipping a
blocked task. There's no visual difference between dimming to
invisible and skipping, but they have subtly different and
non-intuitive differences in behavior. A better fix would be to create
a org-agenda-skip-blocked-tasks setting (which would be implemented
much like other skip settings) and in the docstring in dim to
invisible setting explain the difference and point to the new setting,
and maybe eventually deprecate dim to invisible.

If you think that is an acceptable direction, I am happy to start
working on a patch.

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

* Re: Bug: agenda interaction with org-agenda-dim-blocked-tasks, org-agenda-max-entries and org-enforce-todo-dependencies [8.3beta (release_8.3beta-785-gb5d9f4 @ /Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)]
  2015-02-03 22:39       ` Yuri Niyazov
@ 2015-02-03 22:52         ` Nicolas Goaziou
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2015-02-03 22:52 UTC (permalink / raw)
  To: Yuri Niyazov; +Cc: emacs-orgmode@gnu.org

Yuri Niyazov <yuri.niyazov@gmail.com> writes:

> I now think that having the ability to dim to invisible is a feature
> mistake. I'm having a difficult time seeing when a user would want to
> dim to invisible purely visually, rather than really skipping a
> blocked task. There's no visual difference between dimming to
> invisible and skipping, but they have subtly different and
> non-intuitive differences in behavior. A better fix would be to create
> a org-agenda-skip-blocked-tasks setting (which would be implemented
> much like other skip settings) and in the docstring in dim to
> invisible setting explain the difference and point to the new setting,
> and maybe eventually deprecate dim to invisible.
>
> If you think that is an acceptable direction, I am happy to start
> working on a patch.

Sounds good. Please go ahead.

Regards,

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

end of thread, other threads:[~2015-02-03 22:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 20:55 Bug: agenda interaction with org-agenda-dim-blocked-tasks, org-agenda-max-entries and org-enforce-todo-dependencies [8.3beta (release_8.3beta-785-gb5d9f4 @ /Users/yn/dotfiles/org.emacs.d/org-mode/lisp/)] Yuri Niyazov
2015-02-03 21:13 ` Nicolas Goaziou
2015-02-03 21:49   ` Yuri Niyazov
2015-02-03 22:12     ` Nicolas Goaziou
2015-02-03 22:39       ` Yuri Niyazov
2015-02-03 22:52         ` Nicolas Goaziou

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