emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
@ 2020-08-15 16:07 Dinnyés Dániel
  2020-08-15 16:45 ` Kyle Meyer
  0 siblings, 1 reply; 9+ messages in thread
From: Dinnyés Dániel @ 2020-08-15 16:07 UTC (permalink / raw)
  To: emacs-orgmode

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

While in the Org Agenda, and navigating to the end of line for a given item
(assuming more than one todo items), and calling org-agenda-todo (with
keybindings t, or C-c C-t)... this result in the call being applied to the
next line item, instead of the one the cursor is on.

This only happens when the cursor is at the end of the line.

I would consider this to be a bug.

Regards,
Daniel

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

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

* Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2020-08-15 16:07 Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)] Dinnyés Dániel
@ 2020-08-15 16:45 ` Kyle Meyer
  2020-08-16 11:37   ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Kyle Meyer @ 2020-08-15 16:45 UTC (permalink / raw)
  To: Dinnyés Dániel; +Cc: emacs-orgmode

Dinnyés Dániel writes:

> While in the Org Agenda, and navigating to the end of line for a given item
> (assuming more than one todo items), and calling org-agenda-todo (with
> keybindings t, or C-c C-t)... this result in the call being applied to the
> next line item, instead of the one the cursor is on.
>
> This only happens when the cursor is at the end of the line.
>
> I would consider this to be a bug.

I tried using the following content as the agenda file:

    * TODO A
    * TODO B

Using Emacs 26.3 with a vanilla configuration and the Org repo checked
out at 5e4542d69 (the commit reported in the subject line), I didn't see
the behavior you describe.  With point at the end of the agenda line for
A, the state was changed for A.

I also can't trigger the behavior with the master branch checked out.


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

* Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2020-08-15 16:45 ` Kyle Meyer
@ 2020-08-16 11:37   ` Ihor Radchenko
  2020-08-16 15:01     ` Dinnyés Dániel
  2020-08-18  2:16     ` Kyle Meyer
  0 siblings, 2 replies; 9+ messages in thread
From: Ihor Radchenko @ 2020-08-16 11:37 UTC (permalink / raw)
  To: Kyle Meyer, Dinnyés Dániel; +Cc: emacs-orgmode

> Using Emacs 26.3 with a vanilla configuration and the Org repo checked
> out at 5e4542d69 (the commit reported in the subject line), I didn't see
> the behavior you describe.  With point at the end of the agenda line for
> A, the state was changed for A.

I think that may happen when you have agenda filter active and an entry
hidden by filter is between the current and next line.

Best,
Ihor


Kyle Meyer <kyle@kyleam.com> writes:

> Dinnyés Dániel writes:
>
>> While in the Org Agenda, and navigating to the end of line for a given item
>> (assuming more than one todo items), and calling org-agenda-todo (with
>> keybindings t, or C-c C-t)... this result in the call being applied to the
>> next line item, instead of the one the cursor is on.
>>
>> This only happens when the cursor is at the end of the line.
>>
>> I would consider this to be a bug.
>
> I tried using the following content as the agenda file:
>
>     * TODO A
>     * TODO B
>
> Using Emacs 26.3 with a vanilla configuration and the Org repo checked
> out at 5e4542d69 (the commit reported in the subject line), I didn't see
> the behavior you describe.  With point at the end of the agenda line for
> A, the state was changed for A.
>
> I also can't trigger the behavior with the master branch checked out.


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

* Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2020-08-16 11:37   ` Ihor Radchenko
@ 2020-08-16 15:01     ` Dinnyés Dániel
  2020-08-16 15:34       ` Dinnyés Dániel
  2020-08-18  2:45       ` Kyle Meyer
  2020-08-18  2:16     ` Kyle Meyer
  1 sibling, 2 replies; 9+ messages in thread
From: Dinnyés Dániel @ 2020-08-16 15:01 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Ihor Radchenko

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

I have tried reproducing it with a minimal example, and this seems to work
for me:

* FOO
** TODO baz1
SCHEDULED: <2020-08-16 Sun>

some text

* BAR
** TODO baz2
SCHEDULED: <2020-08-16 Sun>
*** DONE baz3
SCHEDULED: <2020-08-16 Sun>
*** TODO baz4
SCHEDULED: <2020-08-16 Sun>

When in the agenda, on the front line of item baz, setting it to DONE state
works fine.
OTOH, when going to the end of the line on the item baz, trying to set it
to DONE results in the error message:
TODO state change from TODO to DONE blocked (by "TODO baz4")

Also, I have (org-enforce-todo-dependencies t), which causes the blocking,
and (org-agenda-dim-blocked-tasks (quote invisible)), which hides baz2 from
the agenda... because of this baz1 is followed directly by baz4 in my
agenda window.

Just for completeness, this my lengthy org configuration:

(use-package org
  :init
  (defun org-archive-done-tasks ()
    "Archive all DONE and CANCELED tasks in the subtree of the current
entry"
    (interactive)
    (org-map-entries
     (lambda ()
       (org-archive-subtree)
       (setq org-map-continue-from (outline-previous-heading)))
     "//DONE|CANCELED" 'agenda))
  :bind
  (("C-c a" . org-agenda)
   ("C-c k" . org-capture)
   :map org-mode-map
   ("C-c H" . org-archive-done-tasks)
   ("C-c e" . org-babel-execute-src-block))
  :hook
  (text-mode . visual-line-mode)
  :config
  (custom-set-variables
   '(org-agenda-span 'day)
   '(org-startup-indented t)
   '(org-startup-folded nil)
   '(org-directory "~/Workspace/org/")
   '(org-agenda-files (list org-directory))
   '(org-archive-location "archives.org::datetree/* %s")
   '(org-agenda-diary-file (concat org-directory "diary.org"))
   '(org-agenda-include-diary t)
   '(org-deadline-warning-days 7)
   '(org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
   '(org-agenda-skip-scheduled-if-deadline-is-shown t)
   '(org-agenda-skip-scheduled-if-done t)
   '(org-agenda-todo-ignore-scheduled 'future)
   '(org-agenda-tags-todo-honor-ignore-options t)
   ;; set SCHEDULED and DEADLINE leaders in agenda view
   '(org-agenda-deadline-leaders (quote ("Deadline!  " "In %d days: " "Late
%d days: ")))
   '(org-agenda-scheduled-leaders (quote ("Scheduled! " "For %d days: ")))
   '(org-agenda-window-setup 'only-window)
   '(org-todo-keywords
     (quote ((sequence "TODO(t!)" "ONGOING(o!)" "WAITING(w@)" "|" "DONE(d@)"
"CANCELED(c@)"))))
   '(org-todo-keyword-faces
     (quote (("WAITING" . "purple")
    ("ONGOING" . "orange")
    ("CANCELED" . "firebrick"))))
   ;; set ARCHIVE tag when todo state is set to CANCELED, and remove when
reset to TODO
   `(org-todo-state-tags-triggers
     (quote
      ((todo . ((,org-archive-tag . nil)))
       ("CANCELED" . ((,org-archive-tag . t))))))
   '(org-tag-persistent-alist
     '(("TARGET" . ?t)))
   '(org-tags-exclude-from-inheritance (quote ("TARGET")))
   ;; REFILE BEHAVIOUR
   '(org-refile-targets
     '((nil . (:level . 1))
       (nil . (:tag . "TARGET"))))
   '(org-refile-use-outline-path t)
   '(org-goto-interface 'outline-path-completion)
   '(org-outline-path-complete-in-steps t)
   ;; prefer in-steps that ido for refile completion
   ;; '(org-completion-use-ido t)
   '(org-reverse-note-order t)

   ;; LOGGING
   ;; todo state changes should be logged into drawer
   '(org-log-into-drawer t)
   ;; log when schedule or deadline changes
   '(org-log-redeadline (quote time))
   '(org-log-reschedule (quote time))
   ;;'(org-log-refile (quote time)) ; logs even when refiled during capture

   ;; PRIORITIES
   '(org-priority-start-cycle-with-default t)
   '(org-default-priority 70)
   '(org-lowest-priority 70)
   '(org-highest-priority 65)
   '(org-agenda-sorting-strategy
     '((agenda time-up todo-state-down priority-down)
       (todo category-up priority-down)
       (tags category-up priority-down)
       (search category-up)))

   ;; DEPENDENCIES
   '(org-enforce-todo-dependencies t)
   '(org-enforce-todo-checkbox-dependencies t)
   '(org-agenda-dim-blocked-tasks (quote invisible))

   ;; CUSTOM COMMANDS
   '(org-agenda-custom-commands
     '(("c" . "Custom commands")
       ("cb" "Backlog (tasks not scheduled)" todo "TODO"
((org-agenda-skip-function
 '(org-agenda-skip-entry-if 'scheduled))))
       ("cc" . "Filter tasks by CATEGORY")
       ("cci" "INBOX tasks"
((alltodo ""))
((org-agenda-category-filter-preset '("+INBOX"))))
       ("ccf" "INFRA tasks"
((alltodo ""))
((org-agenda-category-filter-preset '("+INFRA"))))
       ("ccr" "ROLES tasks"
((alltodo ""))
((org-agenda-category-filter-preset '("+ROLES"))))))

   ;; CAPTURE TEMPLATES
   '(org-capture-templates
     (quote
      (("t" "Task")
       ("tt" "Task (Scheduled)" entry
(file+headline "tasks.org" "INBOX")
"* TODO %^{Title}\nSCHEDULED: %t\n%?")
       ("td" "Task (Scheduled, with Deadline)" entry
(file+headline "tasks.org" "INBOX")
"* TODO %^{Title}\nSCHEDULED: %^{Schedule}t DEADLINE: %^{Deadline}t\n%?")
       ("e" "Event")
       ("et" "Event (with single datetime)" entry
(file+headline "events.org" "INBOX")
"* %^{Title}\n%^T\n%?")
       ("er" "Event (with date range)" entry
(file+headline "events.org" "INBOX")
"* %^{Title}\n%^t--%^t\n%?")
       ("m" "Memo" entry
(file+headline "memo.org" "INBOX")
"* %?\n%T\n")
       ("x" "Example" entry
(file+headline "example.org" "INBOX")
"* %?\n%^t\n"))))))

Regards,
Daniel

On Sun, 16 Aug 2020 at 12:38, Ihor Radchenko <yantar92@gmail.com> wrote:

> > Using Emacs 26.3 with a vanilla configuration and the Org repo checked
> > out at 5e4542d69 (the commit reported in the subject line), I didn't see
> > the behavior you describe.  With point at the end of the agenda line for
> > A, the state was changed for A.
>
> I think that may happen when you have agenda filter active and an entry
> hidden by filter is between the current and next line.
>
> Best,
> Ihor
>
>
> Kyle Meyer <kyle@kyleam.com> writes:
>
> > Dinnyés Dániel writes:
> >
> >> While in the Org Agenda, and navigating to the end of line for a given
> item
> >> (assuming more than one todo items), and calling org-agenda-todo (with
> >> keybindings t, or C-c C-t)... this result in the call being applied to
> the
> >> next line item, instead of the one the cursor is on.
> >>
> >> This only happens when the cursor is at the end of the line.
> >>
> >> I would consider this to be a bug.
> >
> > I tried using the following content as the agenda file:
> >
> >     * TODO A
> >     * TODO B
> >
> > Using Emacs 26.3 with a vanilla configuration and the Org repo checked
> > out at 5e4542d69 (the commit reported in the subject line), I didn't see
> > the behavior you describe.  With point at the end of the agenda line for
> > A, the state was changed for A.
> >
> > I also can't trigger the behavior with the master branch checked out.
>

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

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

* Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2020-08-16 15:01     ` Dinnyés Dániel
@ 2020-08-16 15:34       ` Dinnyés Dániel
  2020-08-18  2:45       ` Kyle Meyer
  1 sibling, 0 replies; 9+ messages in thread
From: Dinnyés Dániel @ 2020-08-16 15:34 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Ihor Radchenko

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

Made some corrections in the text below (marked with red).
Also, removed the unnecessary "some text" from the body of baz1 item, as
the issue can reproduce without it.

On Sun, 16 Aug 2020 at 16:01, Dinnyés Dániel <dinnyesd@gmail.com> wrote:

> I have tried reproducing it with a minimal example, and this works for me:
>
> * FOO
> ** TODO baz1
> SCHEDULED: <2020-08-16 Sun>
>

>
* BAR
> ** TODO baz2
> SCHEDULED: <2020-08-16 Sun>
> *** DONE baz3
> SCHEDULED: <2020-08-16 Sun>
> *** TODO baz4
> SCHEDULED: <2020-08-16 Sun>
>
> When in the agenda, on the front line of item baz1, setting it to DONE
> state works fine.
> OTOH, when going to the end of the line on the item baz1, trying to set
> it to DONE results in the error message:
> TODO state change from TODO to DONE blocked (by "TODO baz4")
>

>
Also, I have (org-enforce-todo-dependencies t), which causes the blocking,
> and (org-agenda-dim-blocked-tasks (quote invisible)), which hides baz2
> from the agenda... because of this baz1 is followed directly by baz4 in
> my agenda window.
>

> Since baz4 is not a direct / transitive dependency to baz1, this blocking
> shouldn't happen.
>
I assume this happening has something to do with their closeness in the
> agenda ordering, and the cursor position.
>
Maybe the org-agenda-todo function somehow gets "confused" by running it at
> the end of the line in the agenda.
>


Just for completeness, this is a snapshot of my lengthy org configuration:
> (use-package org
>   :init
>   (defun org-archive-done-tasks ()
>     "Archive all DONE and CANCELED tasks in the subtree of the current
> entry"
>     (interactive)
>     (org-map-entries
>      (lambda ()
>        (org-archive-subtree)
>        (setq org-map-continue-from (outline-previous-heading)))
>      "//DONE|CANCELED" 'agenda))
>   :bind
>   (("C-c a" . org-agenda)
>    ("C-c k" . org-capture)
>    :map org-mode-map
>    ("C-c H" . org-archive-done-tasks)
>    ("C-c e" . org-babel-execute-src-block))
>   :hook
>   (text-mode . visual-line-mode)
>   :config
>   (custom-set-variables
>    '(org-agenda-span 'day)
>    '(org-startup-indented t)
>    '(org-startup-folded nil)
>    '(org-directory "~/Workspace/org/")
>    '(org-agenda-files (list org-directory))
>    '(org-archive-location "archives.org::datetree/* %s")
>    '(org-agenda-diary-file (concat org-directory "diary.org"))
>    '(org-agenda-include-diary t)
>    '(org-deadline-warning-days 7)
>    '(org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
>    '(org-agenda-skip-scheduled-if-deadline-is-shown t)
>    '(org-agenda-skip-scheduled-if-done t)
>    '(org-agenda-todo-ignore-scheduled 'future)
>    '(org-agenda-tags-todo-honor-ignore-options t)
>    ;; set SCHEDULED and DEADLINE leaders in agenda view
>    '(org-agenda-deadline-leaders (quote ("Deadline!  " "In %d days: "
> "Late %d days: ")))
>    '(org-agenda-scheduled-leaders (quote ("Scheduled! " "For %d days: ")))
>    '(org-agenda-window-setup 'only-window)
>    '(org-todo-keywords
>      (quote ((sequence "TODO(t!)" "ONGOING(o!)" "WAITING(w@)" "|" "DONE(d@)"
> "CANCELED(c@)"))))
>    '(org-todo-keyword-faces
>      (quote (("WAITING" . "purple")
>     ("ONGOING" . "orange")
>     ("CANCELED" . "firebrick"))))
>    ;; set ARCHIVE tag when todo state is set to CANCELED, and remove when
> reset to TODO
>    `(org-todo-state-tags-triggers
>      (quote
>       ((todo . ((,org-archive-tag . nil)))
>        ("CANCELED" . ((,org-archive-tag . t))))))
>    '(org-tag-persistent-alist
>      '(("TARGET" . ?t)))
>    '(org-tags-exclude-from-inheritance (quote ("TARGET")))
>    ;; REFILE BEHAVIOUR
>    '(org-refile-targets
>      '((nil . (:level . 1))
>        (nil . (:tag . "TARGET"))))
>    '(org-refile-use-outline-path t)
>    '(org-goto-interface 'outline-path-completion)
>    '(org-outline-path-complete-in-steps t)
>    ;; prefer in-steps that ido for refile completion
>    ;; '(org-completion-use-ido t)
>    '(org-reverse-note-order t)
>
>    ;; LOGGING
>    ;; todo state changes should be logged into drawer
>    '(org-log-into-drawer t)
>    ;; log when schedule or deadline changes
>    '(org-log-redeadline (quote time))
>    '(org-log-reschedule (quote time))
>    ;;'(org-log-refile (quote time)) ; logs even when refiled during capture
>
>    ;; PRIORITIES
>    '(org-priority-start-cycle-with-default t)
>    '(org-default-priority 70)
>    '(org-lowest-priority 70)
>    '(org-highest-priority 65)
>    '(org-agenda-sorting-strategy
>      '((agenda time-up todo-state-down priority-down)
>        (todo category-up priority-down)
>        (tags category-up priority-down)
>        (search category-up)))
>
>    ;; DEPENDENCIES
>    '(org-enforce-todo-dependencies t)
>    '(org-enforce-todo-checkbox-dependencies t)
>    '(org-agenda-dim-blocked-tasks (quote invisible))
>
>    ;; CUSTOM COMMANDS
>    '(org-agenda-custom-commands
>      '(("c" . "Custom commands")
>        ("cb" "Backlog (tasks not scheduled)" todo "TODO"
> ((org-agenda-skip-function
>  '(org-agenda-skip-entry-if 'scheduled))))
>        ("cc" . "Filter tasks by CATEGORY")
>        ("cci" "INBOX tasks"
> ((alltodo ""))
> ((org-agenda-category-filter-preset '("+INBOX"))))
>        ("ccf" "INFRA tasks"
> ((alltodo ""))
> ((org-agenda-category-filter-preset '("+INFRA"))))
>        ("ccr" "ROLES tasks"
> ((alltodo ""))
> ((org-agenda-category-filter-preset '("+ROLES"))))))
>
>    ;; CAPTURE TEMPLATES
>    '(org-capture-templates
>      (quote
>       (("t" "Task")
>        ("tt" "Task (Scheduled)" entry
> (file+headline "tasks.org" "INBOX")
> "* TODO %^{Title}\nSCHEDULED: %t\n%?")
>        ("td" "Task (Scheduled, with Deadline)" entry
> (file+headline "tasks.org" "INBOX")
> "* TODO %^{Title}\nSCHEDULED: %^{Schedule}t DEADLINE: %^{Deadline}t\n%?")
>        ("e" "Event")
>        ("et" "Event (with single datetime)" entry
> (file+headline "events.org" "INBOX")
> "* %^{Title}\n%^T\n%?")
>        ("er" "Event (with date range)" entry
> (file+headline "events.org" "INBOX")
> "* %^{Title}\n%^t--%^t\n%?")
>        ("m" "Memo" entry
> (file+headline "memo.org" "INBOX")
> "* %?\n%T\n")
>        ("x" "Example" entry
> (file+headline "example.org" "INBOX")
> "* %?\n%^t\n"))))))
>
> Regards,
> Daniel
>
> On Sun, 16 Aug 2020 at 12:38, Ihor Radchenko <yantar92@gmail.com> wrote:
>
>> > Using Emacs 26.3 with a vanilla configuration and the Org repo checked
>> > out at 5e4542d69 (the commit reported in the subject line), I didn't see
>> > the behavior you describe.  With point at the end of the agenda line for
>> > A, the state was changed for A.
>>
>> I think that may happen when you have agenda filter active and an entry
>> hidden by filter is between the current and next line.
>>
>> Best,
>> Ihor
>>
>>
>> Kyle Meyer <kyle@kyleam.com> writes:
>>
>> > Dinnyés Dániel writes:
>> >
>> >> While in the Org Agenda, and navigating to the end of line for a given
>> item
>> >> (assuming more than one todo items), and calling org-agenda-todo (with
>> >> keybindings t, or C-c C-t)... this result in the call being applied to
>> the
>> >> next line item, instead of the one the cursor is on.
>> >>
>> >> This only happens when the cursor is at the end of the line.
>> >>
>> >> I would consider this to be a bug.
>> >
>> > I tried using the following content as the agenda file:
>> >
>> >     * TODO A
>> >     * TODO B
>> >
>> > Using Emacs 26.3 with a vanilla configuration and the Org repo checked
>> > out at 5e4542d69 (the commit reported in the subject line), I didn't see
>> > the behavior you describe.  With point at the end of the agenda line for
>> > A, the state was changed for A.
>> >
>> > I also can't trigger the behavior with the master branch checked out.
>>
>

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

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

* Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2020-08-16 11:37   ` Ihor Radchenko
  2020-08-16 15:01     ` Dinnyés Dániel
@ 2020-08-18  2:16     ` Kyle Meyer
  2020-08-18  2:43       ` Ihor Radchenko
  1 sibling, 1 reply; 9+ messages in thread
From: Kyle Meyer @ 2020-08-18  2:16 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode, Dinnyés Dániel

Ihor Radchenko writes:

>> Using Emacs 26.3 with a vanilla configuration and the Org repo checked
>> out at 5e4542d69 (the commit reported in the subject line), I didn't see
>> the behavior you describe.  With point at the end of the agenda line for
>> A, the state was changed for A.
>
> I think that may happen when you have agenda filter active and an entry
> hidden by filter is between the current and next line.

Thanks.  With 9.1.9 (5e4542d69), that indeed does look to be an issue.

    * TODO a
    * TODO b                                                               :drop:
    * TODO c

List those in the agenda, exclude drop, and, with point on a's line, hit
M-e (move-end-of-line).  Point is then at the end of the invisible b,
and calling org-agenda-todo acts on b rather than a.

However, as of v9.3.3, specifically a2b69c58f (org-agenda.el: Add
`org-agenda-end-of-line', 2020-02-02), move-end-of-line is remapped and
point ends up at the end of a, avoiding the issue.

Are you able to trigger this "act on invisible entry" behavior with
bound navigation commands in recent Org versions?


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

* Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2020-08-18  2:16     ` Kyle Meyer
@ 2020-08-18  2:43       ` Ihor Radchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Ihor Radchenko @ 2020-08-18  2:43 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode, Dinnyés Dániel

> Are you able to trigger this "act on invisible entry" behavior with
> bound navigation commands in recent Org versions?

The org version of the move-end-of-line works fine on master. Though Org
remapping does not affect my key binding setup (I use alternative
version of move-end-of-line) and I had to redefine the command manually.

Best,
Ihor


Kyle Meyer <kyle@kyleam.com> writes:

> Ihor Radchenko writes:
>
>>> Using Emacs 26.3 with a vanilla configuration and the Org repo checked
>>> out at 5e4542d69 (the commit reported in the subject line), I didn't see
>>> the behavior you describe.  With point at the end of the agenda line for
>>> A, the state was changed for A.
>>
>> I think that may happen when you have agenda filter active and an entry
>> hidden by filter is between the current and next line.
>
> Thanks.  With 9.1.9 (5e4542d69), that indeed does look to be an issue.
>
>     * TODO a
>     * TODO b                                                               :drop:
>     * TODO c
>
> List those in the agenda, exclude drop, and, with point on a's line, hit
> M-e (move-end-of-line).  Point is then at the end of the invisible b,
> and calling org-agenda-todo acts on b rather than a.
>
> However, as of v9.3.3, specifically a2b69c58f (org-agenda.el: Add
> `org-agenda-end-of-line', 2020-02-02), move-end-of-line is remapped and
> point ends up at the end of a, avoiding the issue.
>
> Are you able to trigger this "act on invisible entry" behavior with
> bound navigation commands in recent Org versions?


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

* Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2020-08-16 15:01     ` Dinnyés Dániel
  2020-08-16 15:34       ` Dinnyés Dániel
@ 2020-08-18  2:45       ` Kyle Meyer
  2020-10-18  5:16         ` Daniel Dinnyes
  1 sibling, 1 reply; 9+ messages in thread
From: Kyle Meyer @ 2020-08-18  2:45 UTC (permalink / raw)
  To: Dinnyés Dániel; +Cc: emacs-orgmode, Ihor Radchenko

Dinnyés Dániel writes:

> I have tried reproducing it with a minimal example, and this seems to work
> for me:
>
> * FOO
> ** TODO baz1
> SCHEDULED: <2020-08-16 Sun>
>
> some text
>
> * BAR
> ** TODO baz2
> SCHEDULED: <2020-08-16 Sun>
> *** DONE baz3
> SCHEDULED: <2020-08-16 Sun>
> *** TODO baz4
> SCHEDULED: <2020-08-16 Sun>
>
> When in the agenda, on the front line of item baz, setting it to DONE state
> works fine.
> OTOH, when going to the end of the line on the item baz, trying to set it
> to DONE results in the error message:
> TODO state change from TODO to DONE blocked (by "TODO baz4")
>
> Also, I have (org-enforce-todo-dependencies t), which causes the blocking,
> and (org-agenda-dim-blocked-tasks (quote invisible)), which hides baz2 from
> the agenda... because of this baz1 is followed directly by baz4 in my
> agenda window.

Thanks for the minimal example and configuration.  I can trigger the
issue using that file and

    (setq org-enforce-todo-dependencies t)
    (setq org-agenda-dim-blocked-tasks 'invisible)

with commit 5e4542d69 checked out.

The issue doesn't happen with the current release (v9.3.7) or the master
branch.  It went away with 27e4d7ce4 (Prevent infinite loop when showing
new time in agenda, 2020-02-14).  I haven't taken a closer look, though.



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

* Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2020-08-18  2:45       ` Kyle Meyer
@ 2020-10-18  5:16         ` Daniel Dinnyes
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Dinnyes @ 2020-10-18  5:16 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode, Ihor Radchenko

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

I am currently on the master branch, and it seems to have been fixed indeed!

On Tue, 18 Aug 2020 at 03:45, Kyle Meyer <kyle@kyleam.com> wrote:

> Dinnyés Dániel writes:
>
> > I have tried reproducing it with a minimal example, and this seems to
> work
> > for me:
> >
> > * FOO
> > ** TODO baz1
> > SCHEDULED: <2020-08-16 Sun>
> >
> > some text
> >
> > * BAR
> > ** TODO baz2
> > SCHEDULED: <2020-08-16 Sun>
> > *** DONE baz3
> > SCHEDULED: <2020-08-16 Sun>
> > *** TODO baz4
> > SCHEDULED: <2020-08-16 Sun>
> >
> > When in the agenda, on the front line of item baz, setting it to DONE
> state
> > works fine.
> > OTOH, when going to the end of the line on the item baz, trying to set it
> > to DONE results in the error message:
> > TODO state change from TODO to DONE blocked (by "TODO baz4")
> >
> > Also, I have (org-enforce-todo-dependencies t), which causes the
> blocking,
> > and (org-agenda-dim-blocked-tasks (quote invisible)), which hides baz2
> from
> > the agenda... because of this baz1 is followed directly by baz4 in my
> > agenda window.
>
> Thanks for the minimal example and configuration.  I can trigger the
> issue using that file and
>
>     (setq org-enforce-todo-dependencies t)
>     (setq org-agenda-dim-blocked-tasks 'invisible)
>
> with commit 5e4542d69 checked out.
>
> The issue doesn't happen with the current release (v9.3.7) or the master
> branch.  It went away with 27e4d7ce4 (Prevent infinite loop when showing
> new time in agenda, 2020-02-14).  I haven't taken a closer look, though.
>
>

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

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

end of thread, other threads:[~2020-10-18  5:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-15 16:07 Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)] Dinnyés Dániel
2020-08-15 16:45 ` Kyle Meyer
2020-08-16 11:37   ` Ihor Radchenko
2020-08-16 15:01     ` Dinnyés Dániel
2020-08-16 15:34       ` Dinnyés Dániel
2020-08-18  2:45       ` Kyle Meyer
2020-10-18  5:16         ` Daniel Dinnyes
2020-08-18  2:16     ` Kyle Meyer
2020-08-18  2:43       ` Ihor Radchenko

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